port runtime

pull/5610/head
divy-work 5 years ago
parent 32b991ee69
commit ab0ee9f469
No known key found for this signature in database
GPG Key ID: 2E03F39A6D1B98A0

@ -1,17 +0,0 @@
**/_actual.js
**/expected.js
_output
test/*/samples/*/output.js
# automatically generated
internal_exports.ts
# output files
animate/*.js
esing/*.js
internal/*.js
motion/*.js
store/*.js
transition/*.js
index.js
compiler.js

@ -1,14 +0,0 @@
module.exports = {
root: true,
extends: '@sveltejs',
settings: {
'import/core-modules': [
'svelte',
'svelte/internal',
'svelte/store',
'svelte/easing',
'estree'
],
'svelte3/compiler': require('./compiler')
}
};

@ -1,14 +0,0 @@
module.exports = {
file: [
'test/test.ts'
],
require: [
'sucrase/register'
]
};
// add coverage options when running 'npx c8 mocha'
if (process.env.NODE_V8_COVERAGE) {
module.exports.fullTrace = true;
module.exports.require.push('source-map-support/register');
}

@ -1,3 +1,3 @@
declare module '*.svelte' {
export { SvelteComponentDev as default } from 'svelte/internal';
export { SvelteComponentDev as default } from './internal/index.ts';
}

@ -1,5 +1,5 @@
import { cubicOut } from 'svelte/easing';
import { is_function } from 'svelte/internal';
import { cubicOut } from '../easing/index.ts';
import { is_function } from '../internal/index.ts';
// todo: same as Transition, should it be shared?
export interface AnimationConfig {

@ -3,7 +3,7 @@ Adapted from https://github.com/mattdesl
Distributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md
*/
export { identity as linear } from 'svelte/internal';
export { identity as linear } from '../internal/index.ts';
export function backInOut(t: number) {
const s = 1.70158 * 1.525;

@ -1,4 +1,4 @@
import './ambient';
import './ambient.ts';
export {
onMount,
@ -10,4 +10,4 @@ export {
tick,
createEventDispatcher,
SvelteComponentDev as SvelteComponent
} from 'svelte/internal';
} from './internal/index.ts';

@ -1,8 +1,8 @@
import { add_render_callback, flush, schedule_update, dirty_components } from './scheduler';
import { current_component, set_current_component } from './lifecycle';
import { blank_object, is_empty, is_function, run, run_all, noop } from './utils';
import { children, detach } from './dom';
import { transition_in } from './transitions';
import { add_render_callback, flush, schedule_update, dirty_components } from './scheduler.ts';
import { current_component, set_current_component } from './lifecycle.ts';
import { blank_object, is_empty, is_function, run, run_all, noop } from './utils.ts';
import { children, detach } from './dom.ts';
import { transition_in } from './transitions.ts';
interface Fragment {
key: string|null;

@ -1,8 +1,8 @@
import { identity as linear, noop } from './utils';
import { now } from './environment';
import { loop } from './loop';
import { create_rule, delete_rule } from './style_manager';
import { AnimationConfig } from '../animate';
import { identity as linear, noop } from './utils.ts';
import { now } from './environment.ts';
import { loop } from './loop.ts';
import { create_rule, delete_rule } from './style_manager.ts';
import { AnimationConfig } from '../animate/index.ts';
//todo: documentation says it is DOMRect, but in IE it would be ClientRect

@ -1,7 +1,7 @@
import { is_promise } from './utils';
import { check_outros, group_outros, transition_in, transition_out } from './transitions';
import { flush } from './scheduler';
import { get_current_component, set_current_component } from './lifecycle';
import { is_promise } from './utils.ts';
import { check_outros, group_outros, transition_in, transition_out } from './transitions.ts';
import { flush } from './scheduler.ts';
import { get_current_component, set_current_component } from './lifecycle.ts';
export function handle_promise(promise, info) {
const token = info.token = {};

@ -1,5 +1,5 @@
import { custom_event, append, insert, detach, listen, attr } from './dom';
import { SvelteComponent } from './Component';
import { custom_event, append, insert, detach, listen, attr } from './dom.ts';
import { SvelteComponent } from './Component.ts';
export function dispatch_dev<T=any>(type: string, detail?: T) {
document.dispatchEvent(custom_event(type, { version: '__VERSION__', ...detail }));

@ -1,4 +1,4 @@
import { has_prop } from './utils';
import { has_prop } from './utils.ts';
export function append(target: Node, node: Node) {
target.appendChild(node);

@ -1,4 +1,4 @@
import { noop } from './utils';
import { noop } from './utils.ts';
export const is_client = typeof window !== 'undefined';

@ -1,15 +1,15 @@
export * from './animations';
export * from './await_block';
export * from './dom';
export * from './environment';
export * from './globals';
export * from './keyed_each';
export * from './lifecycle';
export * from './loop';
export * from './scheduler';
export * from './spread';
export * from './ssr';
export * from './transitions';
export * from './utils';
export * from './Component';
export * from './dev';
export * from './animations.ts';
export * from './await_block.ts';
export * from './dom.ts';
export * from './environment.ts';
export * from './globals.ts';
export * from './keyed_each.ts';
export * from './lifecycle.ts';
export * from './loop.ts';
export * from './scheduler.ts';
export * from './spread.ts';
export * from './ssr.ts';
export * from './transitions.ts';
export * from './utils.ts';
export * from './Component.ts';
export * from './dev.ts';

@ -1,4 +1,4 @@
import { transition_in, transition_out } from './transitions';
import { transition_in, transition_out } from './transitions.ts';
export function destroy_block(block, lookup) {
block.d(1);

@ -1,4 +1,4 @@
import { custom_event } from './dom';
import { custom_event } from './dom.ts';
export let current_component;

@ -1,4 +1,4 @@
import { raf } from './environment';
import { raf } from './environment.ts';
export interface Task { abort(): void; promise: Promise<void> }

@ -1,5 +1,5 @@
import { run_all } from './utils';
import { set_current_component } from './lifecycle';
import { run_all } from './utils.ts';
import { set_current_component } from './lifecycle.ts';
export const dirty_components = [];
export const intros = { enabled: false };

@ -1,6 +1,6 @@
import { set_current_component, current_component } from './lifecycle';
import { run_all, blank_object } from './utils';
import { boolean_attributes } from '../../compiler/compile/render_ssr/handlers/shared/boolean_attributes';
import { set_current_component, current_component } from './lifecycle.ts';
import { run_all, blank_object } from './utils.ts';
import { boolean_attributes } from '../../compiler/compile/render_ssr/handlers/shared/boolean_attributes.ts';
export const invalid_attribute_name_character = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;
// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2

@ -1,5 +1,5 @@
import { element } from './dom';
import { raf } from './environment';
import { element } from './dom.ts';
import { raf } from './environment.ts';
interface ExtendedDoc extends Document {
__svelte_stylesheet: CSSStyleSheet;

@ -1,10 +1,10 @@
import { identity as linear, is_function, noop, run_all } from './utils';
import { now } from './environment';
import { loop } from './loop';
import { create_rule, delete_rule } from './style_manager';
import { custom_event } from './dom';
import { add_render_callback } from './scheduler';
import { TransitionConfig } from '../transition';
import { identity as linear, is_function, noop, run_all } from './utils.ts';
import { now } from './environment.ts';
import { loop } from './loop.ts';
import { create_rule, delete_rule } from './style_manager.ts';
import { custom_event } from './dom.ts';
import { add_render_callback } from './scheduler.ts';
import { TransitionConfig } from '../transition/index.ts';
let promise: Promise<void>|null;

@ -1,4 +1,4 @@
import { Readable } from 'svelte/store';
import { Readable } from '../store/index.ts';
export function noop() {}

@ -1,2 +1,2 @@
export * from './spring';
export * from './tweened';
export * from './spring.ts';
export * from './tweened.ts';

@ -1,5 +1,5 @@
import { Readable, writable } from 'svelte/store';
import { loop, now, Task } from 'svelte/internal';
import { Readable, writable } from '../store/index.ts';
import { loop, now, Task } from '../internal/index.ts';
import { is_date } from './utils';
interface TickContext<T> {

@ -1,7 +1,7 @@
import { Readable, writable } from 'svelte/store';
import { assign, loop, now, Task } from 'svelte/internal';
import { linear } from 'svelte/easing';
import { is_date } from './utils';
import { Readable, writable } from '../store/index.ts';
import { assign, loop, now, Task } from '../internal/index.ts';
import { linear } from '../easing/index.ts';
import { is_date } from './utils.ts';
function get_interpolator(a, b) {
if (a === b || a !== a) return () => a;

@ -1,4 +1,4 @@
import { run_all, subscribe, noop, safe_not_equal, is_function, get_store_value } from 'svelte/internal';
import { run_all, subscribe, noop, safe_not_equal, is_function, get_store_value } from '../internal/index.ts';
/** Callback to inform of a value updates. */
type Subscriber<T> = (value: T) => void;

@ -1,5 +1,5 @@
import { cubicOut, cubicInOut, linear } from 'svelte/easing';
import { assign, is_function } from 'svelte/internal';
import { cubicOut, cubicInOut, linear } from '../easing/index.ts';
import { assign, is_function } from '../internal/index.ts';
type EasingFunction = (t: number) => number;

Loading…
Cancel
Save