svelte 3.59.0 → 3.59.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,225 +0,0 @@
1
- 'use strict';
2
-
3
- var Component = require('./Component-939a9f0a.js');
4
-
5
- /** regex of all html void element names */
6
- const void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;
7
- function is_void(name) {
8
- return void_element_names.test(name) || name.toLowerCase() === '!doctype';
9
- }
10
-
11
- function dispatch_dev(type, detail) {
12
- document.dispatchEvent(Component.custom_event(type, Object.assign({ version: '3.58.0' }, detail), { bubbles: true }));
13
- }
14
- function append_dev(target, node) {
15
- dispatch_dev('SvelteDOMInsert', { target, node });
16
- Component.append(target, node);
17
- }
18
- function append_hydration_dev(target, node) {
19
- dispatch_dev('SvelteDOMInsert', { target, node });
20
- Component.append_hydration(target, node);
21
- }
22
- function insert_dev(target, node, anchor) {
23
- dispatch_dev('SvelteDOMInsert', { target, node, anchor });
24
- Component.insert(target, node, anchor);
25
- }
26
- function insert_hydration_dev(target, node, anchor) {
27
- dispatch_dev('SvelteDOMInsert', { target, node, anchor });
28
- Component.insert_hydration(target, node, anchor);
29
- }
30
- function detach_dev(node) {
31
- dispatch_dev('SvelteDOMRemove', { node });
32
- Component.detach(node);
33
- }
34
- function detach_between_dev(before, after) {
35
- while (before.nextSibling && before.nextSibling !== after) {
36
- detach_dev(before.nextSibling);
37
- }
38
- }
39
- function detach_before_dev(after) {
40
- while (after.previousSibling) {
41
- detach_dev(after.previousSibling);
42
- }
43
- }
44
- function detach_after_dev(before) {
45
- while (before.nextSibling) {
46
- detach_dev(before.nextSibling);
47
- }
48
- }
49
- function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation, has_stop_immediate_propagation) {
50
- const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];
51
- if (has_prevent_default)
52
- modifiers.push('preventDefault');
53
- if (has_stop_propagation)
54
- modifiers.push('stopPropagation');
55
- if (has_stop_immediate_propagation)
56
- modifiers.push('stopImmediatePropagation');
57
- dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
58
- const dispose = Component.listen(node, event, handler, options);
59
- return () => {
60
- dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
61
- dispose();
62
- };
63
- }
64
- function attr_dev(node, attribute, value) {
65
- Component.attr(node, attribute, value);
66
- if (value == null)
67
- dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
68
- else
69
- dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
70
- }
71
- function prop_dev(node, property, value) {
72
- node[property] = value;
73
- dispatch_dev('SvelteDOMSetProperty', { node, property, value });
74
- }
75
- function dataset_dev(node, property, value) {
76
- node.dataset[property] = value;
77
- dispatch_dev('SvelteDOMSetDataset', { node, property, value });
78
- }
79
- function set_data_dev(text, data) {
80
- data = '' + data;
81
- if (text.data === data)
82
- return;
83
- dispatch_dev('SvelteDOMSetData', { node: text, data });
84
- text.data = data;
85
- }
86
- function set_data_contenteditable_dev(text, data) {
87
- data = '' + data;
88
- if (text.wholeText === data)
89
- return;
90
- dispatch_dev('SvelteDOMSetData', { node: text, data });
91
- text.data = data;
92
- }
93
- function set_data_maybe_contenteditable_dev(text, data, attr_value) {
94
- if (~Component.contenteditable_truthy_values.indexOf(attr_value)) {
95
- set_data_contenteditable_dev(text, data);
96
- }
97
- else {
98
- set_data_dev(text, data);
99
- }
100
- }
101
- function validate_each_argument(arg) {
102
- if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
103
- let msg = '{#each} only iterates over array-like objects.';
104
- if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
105
- msg += ' You can use a spread to convert this iterable into an array.';
106
- }
107
- throw new Error(msg);
108
- }
109
- }
110
- function validate_slots(name, slot, keys) {
111
- for (const slot_key of Object.keys(slot)) {
112
- if (!~keys.indexOf(slot_key)) {
113
- console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
114
- }
115
- }
116
- }
117
- function validate_dynamic_element(tag) {
118
- const is_string = typeof tag === 'string';
119
- if (tag && !is_string) {
120
- throw new Error('<svelte:element> expects "this" attribute to be a string.');
121
- }
122
- }
123
- function validate_void_dynamic_element(tag) {
124
- if (tag && is_void(tag)) {
125
- console.warn(`<svelte:element this="${tag}"> is self-closing and cannot have content.`);
126
- }
127
- }
128
- function construct_svelte_component_dev(component, props) {
129
- const error_message = 'this={...} of <svelte:component> should specify a Svelte component.';
130
- try {
131
- const instance = new component(props);
132
- if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {
133
- throw new Error(error_message);
134
- }
135
- return instance;
136
- }
137
- catch (err) {
138
- const { message } = err;
139
- if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {
140
- throw new Error(error_message);
141
- }
142
- else {
143
- throw err;
144
- }
145
- }
146
- }
147
- /**
148
- * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.
149
- *
150
- * Can be used to create strongly typed Svelte components.
151
- *
152
- * ### Example:
153
- *
154
- * You have component library on npm called `component-library`, from which
155
- * you export a component called `MyComponent`. For Svelte+TypeScript users,
156
- * you want to provide typings. Therefore you create a `index.d.ts`:
157
- * ```ts
158
- * import { SvelteComponent } from "svelte";
159
- * export class MyComponent extends SvelteComponent<{foo: string}> {}
160
- * ```
161
- * Typing this makes it possible for IDEs like VS Code with the Svelte extension
162
- * to provide intellisense and to use the component like this in a Svelte file
163
- * with TypeScript:
164
- * ```svelte
165
- * <script lang="ts">
166
- * import { MyComponent } from "component-library";
167
- * </script>
168
- * <MyComponent foo={'bar'} />
169
- * ```
170
- */
171
- class SvelteComponentDev extends Component.SvelteComponent {
172
- constructor(options) {
173
- if (!options || (!options.target && !options.$$inline)) {
174
- throw new Error("'target' is a required option");
175
- }
176
- super();
177
- }
178
- $destroy() {
179
- super.$destroy();
180
- this.$destroy = () => {
181
- console.warn('Component was already destroyed'); // eslint-disable-line no-console
182
- };
183
- }
184
- $capture_state() { }
185
- $inject_state() { }
186
- }
187
- /**
188
- * @deprecated Use `SvelteComponent` instead. See PR for more information: https://github.com/sveltejs/svelte/pull/8512
189
- */
190
- class SvelteComponentTyped extends SvelteComponentDev {
191
- }
192
- function loop_guard(timeout) {
193
- const start = Date.now();
194
- return () => {
195
- if (Date.now() - start > timeout) {
196
- throw new Error('Infinite loop detected');
197
- }
198
- };
199
- }
200
-
201
- exports.SvelteComponentDev = SvelteComponentDev;
202
- exports.SvelteComponentTyped = SvelteComponentTyped;
203
- exports.append_dev = append_dev;
204
- exports.append_hydration_dev = append_hydration_dev;
205
- exports.attr_dev = attr_dev;
206
- exports.construct_svelte_component_dev = construct_svelte_component_dev;
207
- exports.dataset_dev = dataset_dev;
208
- exports.detach_after_dev = detach_after_dev;
209
- exports.detach_before_dev = detach_before_dev;
210
- exports.detach_between_dev = detach_between_dev;
211
- exports.detach_dev = detach_dev;
212
- exports.dispatch_dev = dispatch_dev;
213
- exports.insert_dev = insert_dev;
214
- exports.insert_hydration_dev = insert_hydration_dev;
215
- exports.is_void = is_void;
216
- exports.listen_dev = listen_dev;
217
- exports.loop_guard = loop_guard;
218
- exports.prop_dev = prop_dev;
219
- exports.set_data_contenteditable_dev = set_data_contenteditable_dev;
220
- exports.set_data_dev = set_data_dev;
221
- exports.set_data_maybe_contenteditable_dev = set_data_maybe_contenteditable_dev;
222
- exports.validate_dynamic_element = validate_dynamic_element;
223
- exports.validate_each_argument = validate_each_argument;
224
- exports.validate_slots = validate_slots;
225
- exports.validate_void_dynamic_element = validate_void_dynamic_element;
@@ -1,368 +0,0 @@
1
- 'use strict';
2
-
3
- var Component = require('./Component-aaafe29c.js');
4
-
5
- /** regex of all html void element names */
6
- const void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;
7
-
8
- function is_void(name) {
9
- return void_element_names.test(name) || name.toLowerCase() === '!doctype';
10
- }
11
-
12
- function dispatch_dev(type, detail) {
13
- document.dispatchEvent(Component.custom_event(type, { version: '3.58.0', ...detail }, { bubbles: true }));
14
- }
15
-
16
- function append_dev(target, node) {
17
- dispatch_dev('SvelteDOMInsert', { target, node });
18
- Component.append(target, node);
19
- }
20
-
21
- function append_hydration_dev(target, node) {
22
- dispatch_dev('SvelteDOMInsert', { target, node });
23
- Component.append_hydration(target, node);
24
- }
25
-
26
- function insert_dev(target, node, anchor) {
27
- dispatch_dev('SvelteDOMInsert', { target, node, anchor });
28
- Component.insert(target, node, anchor);
29
- }
30
-
31
- function insert_hydration_dev(target, node, anchor) {
32
- dispatch_dev('SvelteDOMInsert', { target, node, anchor });
33
- Component.insert_hydration(target, node, anchor);
34
- }
35
-
36
- function detach_dev(node) {
37
- dispatch_dev('SvelteDOMRemove', { node });
38
- Component.detach(node);
39
- }
40
-
41
- function detach_between_dev(before, after) {
42
- while (before.nextSibling && before.nextSibling !== after) {
43
- detach_dev(before.nextSibling);
44
- }
45
- }
46
-
47
- function detach_before_dev(after) {
48
- while (after.previousSibling) {
49
- detach_dev(after.previousSibling);
50
- }
51
- }
52
-
53
- function detach_after_dev(before) {
54
- while (before.nextSibling) {
55
- detach_dev(before.nextSibling);
56
- }
57
- }
58
-
59
- function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation, has_stop_immediate_propagation) {
60
- const modifiers = options === true ? [ 'capture' ] : options ? Array.from(Object.keys(options)) : [];
61
- if (has_prevent_default) modifiers.push('preventDefault');
62
- if (has_stop_propagation) modifiers.push('stopPropagation');
63
- if (has_stop_immediate_propagation) modifiers.push('stopImmediatePropagation');
64
-
65
- dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });
66
-
67
- const dispose = Component.listen(node, event, handler, options);
68
- return () => {
69
- dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });
70
- dispose();
71
- };
72
- }
73
-
74
- function attr_dev(node, attribute, value) {
75
- Component.attr(node, attribute, value);
76
-
77
- if (value == null) dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
78
- else dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
79
- }
80
-
81
- function prop_dev(node, property, value) {
82
- node[property] = value;
83
-
84
- dispatch_dev('SvelteDOMSetProperty', { node, property, value });
85
- }
86
-
87
- function dataset_dev(node, property, value) {
88
- node.dataset[property] = value;
89
-
90
- dispatch_dev('SvelteDOMSetDataset', { node, property, value });
91
- }
92
-
93
- function set_data_dev(text, data) {
94
- data = '' + data;
95
- if (text.data === data) return;
96
- dispatch_dev('SvelteDOMSetData', { node: text, data });
97
- text.data = (data );
98
- }
99
-
100
- function set_data_contenteditable_dev(text, data) {
101
- data = '' + data;
102
- if (text.wholeText === data) return;
103
- dispatch_dev('SvelteDOMSetData', { node: text, data });
104
- text.data = (data );
105
- }
106
-
107
- function set_data_maybe_contenteditable_dev(text, data, attr_value) {
108
- if (~Component.contenteditable_truthy_values.indexOf(attr_value)) {
109
- set_data_contenteditable_dev(text, data);
110
- } else {
111
- set_data_dev(text, data);
112
- }
113
- }
114
-
115
- function validate_each_argument(arg) {
116
- if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
117
- let msg = '{#each} only iterates over array-like objects.';
118
- if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
119
- msg += ' You can use a spread to convert this iterable into an array.';
120
- }
121
- throw new Error(msg);
122
- }
123
- }
124
-
125
- function validate_slots(name, slot, keys) {
126
- for (const slot_key of Object.keys(slot)) {
127
- if (!~keys.indexOf(slot_key)) {
128
- console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
129
- }
130
- }
131
- }
132
-
133
- function validate_dynamic_element(tag) {
134
- const is_string = typeof tag === 'string';
135
- if (tag && !is_string) {
136
- throw new Error('<svelte:element> expects "this" attribute to be a string.');
137
- }
138
- }
139
-
140
- function validate_void_dynamic_element(tag) {
141
- if (tag && is_void(tag)) {
142
- console.warn(
143
- `<svelte:element this="${tag}"> is self-closing and cannot have content.`
144
- );
145
- }
146
- }
147
-
148
- function construct_svelte_component_dev(component, props) {
149
- const error_message = 'this={...} of <svelte:component> should specify a Svelte component.';
150
- try {
151
- const instance = new component(props);
152
- if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {
153
- throw new Error(error_message);
154
- }
155
- return instance;
156
- } catch (err) {
157
- const { message } = err;
158
- if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {
159
- throw new Error(error_message);
160
- } else {
161
- throw err;
162
- }
163
- }
164
- }
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
- /**
188
- * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.
189
- *
190
- * Can be used to create strongly typed Svelte components.
191
- *
192
- * ### Example:
193
- *
194
- * You have component library on npm called `component-library`, from which
195
- * you export a component called `MyComponent`. For Svelte+TypeScript users,
196
- * you want to provide typings. Therefore you create a `index.d.ts`:
197
- * ```ts
198
- * import { SvelteComponent } from "svelte";
199
- * export class MyComponent extends SvelteComponent<{foo: string}> {}
200
- * ```
201
- * Typing this makes it possible for IDEs like VS Code with the Svelte extension
202
- * to provide intellisense and to use the component like this in a Svelte file
203
- * with TypeScript:
204
- * ```svelte
205
- * <script lang="ts">
206
- * import { MyComponent } from "component-library";
207
- * </script>
208
- * <MyComponent foo={'bar'} />
209
- * ```
210
- */
211
- class SvelteComponentDev
212
-
213
-
214
-
215
- extends Component.SvelteComponent {
216
- /**
217
- * @private
218
- * For type checking capabilities only.
219
- * Does not exist at runtime.
220
- * ### DO NOT USE!
221
- */
222
-
223
- /**
224
- * @private
225
- * For type checking capabilities only.
226
- * Does not exist at runtime.
227
- * ### DO NOT USE!
228
- */
229
-
230
- /**
231
- * @private
232
- * For type checking capabilities only.
233
- * Does not exist at runtime.
234
- * ### DO NOT USE!
235
- */
236
-
237
-
238
- constructor(options) {
239
- if (!options || (!options.target && !options.$$inline)) {
240
- throw new Error("'target' is a required option");
241
- }
242
-
243
- super();
244
- }
245
-
246
- $destroy() {
247
- super.$destroy();
248
- this.$destroy = () => {
249
- console.warn('Component was already destroyed'); // eslint-disable-line no-console
250
- };
251
- }
252
-
253
- $capture_state() {}
254
-
255
- $inject_state() {}
256
- }
257
-
258
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
259
-
260
-
261
-
262
-
263
-
264
-
265
- /**
266
- * @deprecated Use `SvelteComponent` instead. See PR for more information: https://github.com/sveltejs/svelte/pull/8512
267
- */
268
- class SvelteComponentTyped
269
-
270
-
271
-
272
- extends SvelteComponentDev {}
273
-
274
- /**
275
- * Convenience type to get the type of a Svelte component. Useful for example in combination with
276
- * dynamic components using `<svelte:component>`.
277
- *
278
- * Example:
279
- * ```html
280
- * <script lang="ts">
281
- * import type { ComponentType, SvelteComponent } from 'svelte';
282
- * import Component1 from './Component1.svelte';
283
- * import Component2 from './Component2.svelte';
284
- *
285
- * const component: ComponentType = someLogic() ? Component1 : Component2;
286
- * const componentOfCertainSubType: ComponentType<SvelteComponent<{ needsThisProp: string }>> = someLogic() ? Component1 : Component2;
287
- * </script>
288
- *
289
- * <svelte:component this={component} />
290
- * <svelte:component this={componentOfCertainSubType} needsThisProp="hello" />
291
- * ```
292
- */
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
-
334
-
335
- function loop_guard(timeout) {
336
- const start = Date.now();
337
- return () => {
338
- if (Date.now() - start > timeout) {
339
- throw new Error('Infinite loop detected');
340
- }
341
- };
342
- }
343
-
344
- exports.SvelteComponentDev = SvelteComponentDev;
345
- exports.SvelteComponentTyped = SvelteComponentTyped;
346
- exports.append_dev = append_dev;
347
- exports.append_hydration_dev = append_hydration_dev;
348
- exports.attr_dev = attr_dev;
349
- exports.construct_svelte_component_dev = construct_svelte_component_dev;
350
- exports.dataset_dev = dataset_dev;
351
- exports.detach_after_dev = detach_after_dev;
352
- exports.detach_before_dev = detach_before_dev;
353
- exports.detach_between_dev = detach_between_dev;
354
- exports.detach_dev = detach_dev;
355
- exports.dispatch_dev = dispatch_dev;
356
- exports.insert_dev = insert_dev;
357
- exports.insert_hydration_dev = insert_hydration_dev;
358
- exports.is_void = is_void;
359
- exports.listen_dev = listen_dev;
360
- exports.loop_guard = loop_guard;
361
- exports.prop_dev = prop_dev;
362
- exports.set_data_contenteditable_dev = set_data_contenteditable_dev;
363
- exports.set_data_dev = set_data_dev;
364
- exports.set_data_maybe_contenteditable_dev = set_data_maybe_contenteditable_dev;
365
- exports.validate_dynamic_element = validate_dynamic_element;
366
- exports.validate_each_argument = validate_each_argument;
367
- exports.validate_slots = validate_slots;
368
- exports.validate_void_dynamic_element = validate_void_dynamic_element;
@@ -1,12 +0,0 @@
1
- export declare const name = "ContainerFeature";
2
- export declare const structure: {
3
- name: StringConstructor;
4
- value: string[];
5
- };
6
- export declare function parse(): {
7
- type: string;
8
- loc: any;
9
- name: any;
10
- value: any;
11
- };
12
- export declare function generate(node: any): void;
@@ -1,11 +0,0 @@
1
- export declare const name = "ContainerFeatureRange";
2
- export declare const structure: {
3
- name: StringConstructor;
4
- value: string[];
5
- };
6
- export declare function parse(): {
7
- type: string;
8
- loc: any;
9
- children: any;
10
- };
11
- export declare function generate(node: any): void;