@rindo/core 1.17.4 → 2.5.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.
- package/LICENSE.md +27 -27
- package/bin/cli.ts +20 -0
- package/bin/rindo +51 -56
- package/cli/index.cjs +1263 -0
- package/cli/index.d.ts +1 -1
- package/cli/index.js +1232 -495
- package/cli/package.json +9 -4
- package/compiler/lib.d.ts +24 -0
- package/compiler/lib.dom.d.ts +20230 -0
- package/compiler/lib.dom.iterable.d.ts +351 -0
- package/compiler/lib.es2015.collection.d.ts +89 -0
- package/compiler/lib.es2015.core.d.ts +517 -0
- package/compiler/lib.es2015.d.ts +30 -0
- package/compiler/lib.es2015.generator.d.ts +79 -0
- package/compiler/lib.es2015.iterable.d.ts +505 -0
- package/compiler/lib.es2015.promise.d.ts +150 -0
- package/compiler/lib.es2015.proxy.d.ts +41 -0
- package/compiler/lib.es2015.reflect.d.ts +123 -0
- package/compiler/lib.es2015.symbol.d.ts +48 -0
- package/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/compiler/lib.es2016.array.include.d.ts +118 -0
- package/compiler/lib.es2016.d.ts +22 -0
- package/compiler/lib.es2016.full.d.ts +25 -0
- package/compiler/lib.es2017.d.ts +26 -0
- package/compiler/lib.es2017.full.d.ts +25 -0
- package/compiler/lib.es2017.intl.d.ts +32 -0
- package/compiler/lib.es2017.object.d.ts +51 -0
- package/compiler/lib.es2017.sharedmemory.d.ts +137 -0
- package/compiler/lib.es2017.string.d.ts +47 -0
- package/compiler/lib.es2017.typedarrays.d.ts +55 -0
- package/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
- package/compiler/lib.es2018.asynciterable.d.ts +45 -0
- package/compiler/lib.es2018.d.ts +26 -0
- package/compiler/lib.es2018.full.d.ts +25 -0
- package/compiler/lib.es2018.intl.d.ts +61 -0
- package/compiler/lib.es2018.promise.d.ts +32 -0
- package/compiler/lib.es2018.regexp.d.ts +39 -0
- package/compiler/lib.es2019.array.d.ts +85 -0
- package/compiler/lib.es2019.d.ts +25 -0
- package/compiler/lib.es2019.full.d.ts +25 -0
- package/compiler/lib.es2019.object.d.ts +35 -0
- package/compiler/lib.es2019.string.d.ts +33 -0
- package/compiler/lib.es2019.symbol.d.ts +26 -0
- package/compiler/lib.es2020.bigint.d.ts +728 -0
- package/compiler/lib.es2020.d.ts +27 -0
- package/compiler/lib.es2020.full.d.ts +25 -0
- package/compiler/lib.es2020.intl.d.ts +310 -0
- package/compiler/lib.es2020.promise.d.ts +50 -0
- package/compiler/lib.es2020.sharedmemory.d.ts +99 -0
- package/compiler/lib.es2020.string.d.ts +30 -0
- package/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/compiler/lib.es5.d.ts +4435 -0
- package/compiler/lib.es6.d.ts +25 -0
- package/compiler/lib.esnext.d.ts +25 -0
- package/compiler/lib.esnext.full.d.ts +25 -0
- package/compiler/lib.esnext.intl.d.ts +32 -0
- package/compiler/lib.esnext.promise.d.ts +43 -0
- package/compiler/lib.esnext.string.d.ts +35 -0
- package/compiler/lib.esnext.weakref.d.ts +75 -0
- package/compiler/lib.scripthost.d.ts +327 -0
- package/compiler/lib.webworker.d.ts +6042 -0
- package/compiler/lib.webworker.importscripts.d.ts +26 -0
- package/compiler/lib.webworker.iterable.d.ts +166 -0
- package/compiler/package.json +3 -3
- package/compiler/rindo.d.ts +0 -16
- package/compiler/rindo.js +42738 -40541
- package/compiler/rindo.min.js +2 -15
- package/dependencies.json +73 -50
- package/dev-server/client/index.js +33 -10
- package/dev-server/client/package.json +3 -3
- package/dev-server/connector.html +3 -3
- package/dev-server/index.d.ts +3 -6
- package/dev-server/index.js +256 -252
- package/dev-server/package.json +3 -3
- package/dev-server/server-process.js +1738 -0
- package/dev-server/server-worker-thread.js +39 -0
- package/dev-server/templates/initial-load.html +160 -160
- package/dev-server/ws.js +1 -1
- package/internal/app-data/{index.cjs.js → index.cjs} +7 -5
- package/internal/app-data/index.d.ts +1 -0
- package/internal/app-data/index.js +7 -6
- package/internal/app-data/package.json +11 -5
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +193 -119
- package/internal/client/package.json +4 -3
- package/internal/client/{patch.js → patch-browser.js} +8 -24
- package/internal/client/patch-esm.js +23 -0
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/polyfills/index.js +34 -34
- package/internal/client/shadow-css.js +9 -3
- package/internal/hydrate/index.js +305 -281
- package/internal/hydrate/package.json +2 -2
- package/internal/hydrate/runner.d.ts +24 -12
- package/internal/hydrate/runner.js +153 -124
- package/internal/hydrate/shadow-css.js +24 -24
- package/internal/package.json +5 -4
- package/internal/rindo-core/index.cjs +1 -0
- package/internal/rindo-core/index.d.ts +51 -2
- package/internal/rindo-core/index.js +15 -1
- package/internal/rindo-ext-modules.d.ts +41 -39
- package/internal/rindo-private.d.ts +93 -148
- package/internal/rindo-public-compiler.d.ts +231 -155
- package/internal/rindo-public-runtime.d.ts +42 -39
- package/internal/testing/index.js +144 -121
- package/internal/testing/package.json +2 -2
- package/internal/testing/shadow-css.js +24 -24
- package/mock-doc/index.cjs +4610 -0
- package/mock-doc/index.d.ts +12 -1
- package/mock-doc/index.js +177 -67
- package/mock-doc/package.json +11 -5
- package/package.json +132 -133
- package/readme.md +21 -95
- package/screenshot/compare/build/app.js +33 -33
- package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
- package/screenshot/connector-base.d.ts +1 -1
- package/screenshot/connector-local.d.ts +1 -1
- package/screenshot/index.js +63 -46
- package/screenshot/package.json +10 -3
- package/screenshot/pixel-match.js +54 -57
- package/screenshot/screenshot-compare.d.ts +1 -1
- package/screenshot/screenshot-fs.d.ts +1 -1
- package/sys/deno/index.js +1785 -0
- package/sys/deno/node-compat.js +2654 -0
- package/sys/deno/worker.js +44 -0
- package/sys/node/autoprefixer.js +8 -1
- package/sys/node/glob.js +1 -1
- package/sys/node/graceful-fs.js +1 -1
- package/sys/node/index.d.ts +1 -1
- package/sys/node/index.js +689 -705
- package/sys/node/node-fetch.js +1 -1
- package/sys/node/package.json +3 -3
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +38 -19
- package/testing/index.d.ts +3 -3
- package/testing/index.js +863 -749
- package/testing/jest/jest-config.d.ts +2 -89
- package/testing/jest/jest-environment.d.ts +1 -1
- package/testing/jest/jest-runner.d.ts +1 -1
- package/testing/jest/jest-screenshot.d.ts +1 -1
- package/testing/jest-preset.js +32 -32
- package/testing/matchers/events.d.ts +1 -1
- package/testing/matchers/screenshot.d.ts +1 -1
- package/testing/mock-fetch.d.ts +1 -1
- package/testing/mocks.d.ts +1 -1
- package/testing/package.json +3 -3
- package/testing/puppeteer/index.d.ts +1 -1
- package/testing/puppeteer/puppeteer-browser.d.ts +2 -2
- package/testing/puppeteer/puppeteer-declarations.d.ts +11 -11
- package/testing/puppeteer/puppeteer-element.d.ts +3 -3
- package/testing/puppeteer/puppeteer-emulate.d.ts +1 -1
- package/testing/puppeteer/puppeteer-events.d.ts +3 -3
- package/testing/puppeteer/puppeteer-page.d.ts +1 -1
- package/testing/puppeteer/puppeteer-screenshot.d.ts +2 -2
- package/testing/reset-build-conditionals.d.ts +1 -1
- package/testing/spec-page.d.ts +1 -1
- package/testing/test-transpile.d.ts +1 -1
- package/testing/testing-logger.d.ts +1 -1
- package/testing/testing-utils.d.ts +1 -1
- package/testing/testing.d.ts +1 -1
- package/cli/index.cjs.js +0 -524
- package/dev-server/content-type-db.json +0 -1
- package/dev-server/server-worker.js +0 -1570
- package/mock-doc/index.cjs.js +0 -4500
|
@@ -43,10 +43,6 @@ export interface ComponentOptions {
|
|
|
43
43
|
* Array of relative links to folders of assets required by the component.
|
|
44
44
|
*/
|
|
45
45
|
assetsDirs?: string[];
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated Use `assetsDirs` instead
|
|
48
|
-
*/
|
|
49
|
-
assetsDir?: string;
|
|
50
46
|
}
|
|
51
47
|
export interface ShadowRootOptions {
|
|
52
48
|
/**
|
|
@@ -81,14 +77,6 @@ export interface PropOptions {
|
|
|
81
77
|
* In this case you can set the `reflect` option to `true`, since it defaults to `false`:
|
|
82
78
|
*/
|
|
83
79
|
reflect?: boolean;
|
|
84
|
-
/** @deprecated: "attr" has been deprecated, please use "attribute" instead. */
|
|
85
|
-
attr?: string;
|
|
86
|
-
/** @deprecated "context" has been deprecated. */
|
|
87
|
-
context?: string;
|
|
88
|
-
/** @deprecated "connect" has been deprecated, please use ES modules and/or dynamic imports instead. */
|
|
89
|
-
connect?: string;
|
|
90
|
-
/** @deprecated "reflectToAttr" has been deprecated, please use "reflect" instead. */
|
|
91
|
-
reflectToAttr?: boolean;
|
|
92
80
|
}
|
|
93
81
|
export interface MethodDecorator {
|
|
94
82
|
(opts?: MethodOptions): CustomMethodDecorator<any>;
|
|
@@ -145,7 +133,7 @@ export interface ListenOptions {
|
|
|
145
133
|
*/
|
|
146
134
|
passive?: boolean;
|
|
147
135
|
}
|
|
148
|
-
export declare type ListenTargetOptions = '
|
|
136
|
+
export declare type ListenTargetOptions = 'body' | 'document' | 'window';
|
|
149
137
|
export interface StateDecorator {
|
|
150
138
|
(): PropertyDecorator;
|
|
151
139
|
}
|
|
@@ -163,9 +151,15 @@ export interface UserBuildConditionals {
|
|
|
163
151
|
* include or exclude code depending on the build.
|
|
164
152
|
*/
|
|
165
153
|
export declare const Build: UserBuildConditionals;
|
|
154
|
+
/**
|
|
155
|
+
* The `Env` object provides access to the "env" object declared in the project's `rindo.config.ts`.
|
|
156
|
+
*/
|
|
157
|
+
export declare const Env: {
|
|
158
|
+
[prop: string]: string | undefined;
|
|
159
|
+
};
|
|
166
160
|
/**
|
|
167
161
|
* The `@Component()` decorator is used to provide metadata about the component class.
|
|
168
|
-
* https://rindojs.
|
|
162
|
+
* https://rindojs.web.app/docs/component
|
|
169
163
|
*/
|
|
170
164
|
export declare const Component: ComponentDecorator;
|
|
171
165
|
/**
|
|
@@ -178,20 +172,20 @@ export declare const Element: ElementDecorator;
|
|
|
178
172
|
* To dispatch Custom DOM events for other components to handle, use the
|
|
179
173
|
* `@Event()` decorator. The Event decorator also makes it easier for Rindo
|
|
180
174
|
* to automatically build types and documentation for the event data.
|
|
181
|
-
* https://rindojs.
|
|
175
|
+
* https://rindojs.web.app/docs/events
|
|
182
176
|
*/
|
|
183
177
|
export declare const Event: EventDecorator;
|
|
184
178
|
/**
|
|
185
179
|
* The `Listen()` decorator is for listening DOM events, including the ones
|
|
186
180
|
* dispatched from `@Events()`.
|
|
187
|
-
* https://rindojs.
|
|
181
|
+
* https://rindojs.web.app/docs/events#listen-decorator
|
|
188
182
|
*/
|
|
189
183
|
export declare const Listen: ListenDecorator;
|
|
190
184
|
/**
|
|
191
185
|
* The `@Method()` decorator is used to expose methods on the public API.
|
|
192
186
|
* Class methods decorated with the @Method() decorator can be called directly
|
|
193
187
|
* from the element, meaning they are intended to be callable from the outside.
|
|
194
|
-
* https://rindojs.
|
|
188
|
+
* https://rindojs.web.app/docs/methods
|
|
195
189
|
*/
|
|
196
190
|
export declare const Method: MethodDecorator;
|
|
197
191
|
/**
|
|
@@ -201,7 +195,7 @@ export declare const Method: MethodDecorator;
|
|
|
201
195
|
* data down from the parent to the child. Components need to explicitly
|
|
202
196
|
* declare the Props they expect to receive using the `@Prop()` decorator.
|
|
203
197
|
* Any value changes to a Prop will cause a re-render.
|
|
204
|
-
* https://rindojs.
|
|
198
|
+
* https://rindojs.web.app/docs/properties
|
|
205
199
|
*/
|
|
206
200
|
export declare const Prop: PropDecorator;
|
|
207
201
|
/**
|
|
@@ -209,7 +203,7 @@ export declare const Prop: PropDecorator;
|
|
|
209
203
|
* This means that a user cannot modify this data from outside the component,
|
|
210
204
|
* but the component can modify it however it sees fit. Any value changes to a
|
|
211
205
|
* `@State()` property will cause the components render function to be called again.
|
|
212
|
-
* https://rindojs.
|
|
206
|
+
* https://rindojs.web.app/docs/state
|
|
213
207
|
*/
|
|
214
208
|
export declare const State: StateDecorator;
|
|
215
209
|
/**
|
|
@@ -217,10 +211,11 @@ export declare const State: StateDecorator;
|
|
|
217
211
|
* called and passed the new value of the prop along with the old value. Watch is
|
|
218
212
|
* useful for validating props or handling side effects. Watch decorator does not
|
|
219
213
|
* fire when a component initially loads.
|
|
220
|
-
* https://rindojs.
|
|
214
|
+
* https://rindojs.web.app/docs/reactive-data#watch-decorator
|
|
221
215
|
*/
|
|
222
216
|
export declare const Watch: WatchDecorator;
|
|
223
217
|
export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
218
|
+
export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
224
219
|
/**
|
|
225
220
|
* `setMode()` is used for libraries which provide multiple "modes" for styles.
|
|
226
221
|
*/
|
|
@@ -264,8 +259,6 @@ export declare function forceUpdate(ref: any): void;
|
|
|
264
259
|
export declare function getRenderingRef(): any;
|
|
265
260
|
export interface HTMLRindoElement extends HTMLElement {
|
|
266
261
|
componentOnReady(): Promise<this>;
|
|
267
|
-
/** @deprecated */
|
|
268
|
-
forceUpdate(): void;
|
|
269
262
|
}
|
|
270
263
|
/**
|
|
271
264
|
* Schedules a DOM-write task. The provided callback will be executed
|
|
@@ -281,6 +274,11 @@ export declare function writeTask(task: RafCallback): void;
|
|
|
281
274
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
282
275
|
*/
|
|
283
276
|
export declare function readTask(task: RafCallback): void;
|
|
277
|
+
/**
|
|
278
|
+
* `setErrorHandler()` can be used to inject a custom global error handler.
|
|
279
|
+
* Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
|
|
280
|
+
*/
|
|
281
|
+
export declare const setErrorHandler: (handler: ErrorHandler) => void;
|
|
284
282
|
/**
|
|
285
283
|
* This file gets copied to all distributions of rindo component collections.
|
|
286
284
|
* - no imports
|
|
@@ -331,13 +329,6 @@ export interface ComponentDidUpdate {
|
|
|
331
329
|
*/
|
|
332
330
|
componentDidUpdate(): void;
|
|
333
331
|
}
|
|
334
|
-
export interface ComponentDidUnload {
|
|
335
|
-
/**
|
|
336
|
-
* The component did unload and the element
|
|
337
|
-
* will be destroyed.
|
|
338
|
-
*/
|
|
339
|
-
componentDidUnload(): void;
|
|
340
|
-
}
|
|
341
332
|
export interface ComponentInterface {
|
|
342
333
|
connectedCallback?(): void;
|
|
343
334
|
disconnectedCallback?(): void;
|
|
@@ -438,28 +429,40 @@ export interface ChildNode {
|
|
|
438
429
|
* Host is a functional component can be used at the root of the render function
|
|
439
430
|
* to set attributes and event listeners to the host element itself.
|
|
440
431
|
*
|
|
441
|
-
* For further information: https://rindojs.
|
|
432
|
+
* For further information: https://rindojs.web.app/docs/host-element
|
|
442
433
|
*/
|
|
443
434
|
export declare const Host: FunctionalComponent<HostAttributes>;
|
|
435
|
+
/**
|
|
436
|
+
* Fragment
|
|
437
|
+
*/
|
|
438
|
+
export declare const Fragment: FunctionalComponent<{}>;
|
|
444
439
|
/**
|
|
445
440
|
* The "h" namespace is used to import JSX types for elements and attributes.
|
|
446
441
|
* It is imported in order to avoid conflicting global JSX issues.
|
|
447
442
|
*/
|
|
448
443
|
export declare namespace h {
|
|
449
444
|
function h(sel: any): VNode;
|
|
450
|
-
function h(sel: Node, data: VNodeData): VNode;
|
|
451
|
-
function h(sel: any, data: VNodeData): VNode;
|
|
445
|
+
function h(sel: Node, data: VNodeData | null): VNode;
|
|
446
|
+
function h(sel: any, data: VNodeData | null): VNode;
|
|
452
447
|
function h(sel: any, text: string): VNode;
|
|
453
448
|
function h(sel: any, children: Array<VNode | undefined | null>): VNode;
|
|
454
|
-
function h(sel: any, data: VNodeData, text: string): VNode;
|
|
455
|
-
function h(sel: any, data: VNodeData, children: Array<VNode | undefined | null>): VNode;
|
|
456
|
-
function h(sel: any, data: VNodeData, children: VNode): VNode;
|
|
449
|
+
function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
450
|
+
function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
451
|
+
function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
457
452
|
namespace JSX {
|
|
458
453
|
interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
|
|
459
454
|
[tagName: string]: any;
|
|
460
455
|
}
|
|
461
456
|
}
|
|
462
457
|
}
|
|
458
|
+
export declare function h(sel: any): VNode;
|
|
459
|
+
export declare function h(sel: Node, data: VNodeData | null): VNode;
|
|
460
|
+
export declare function h(sel: any, data: VNodeData | null): VNode;
|
|
461
|
+
export declare function h(sel: any, text: string): VNode;
|
|
462
|
+
export declare function h(sel: any, children: Array<VNode | undefined | null>): VNode;
|
|
463
|
+
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
464
|
+
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
465
|
+
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
463
466
|
export interface VNode {
|
|
464
467
|
$flags$: number;
|
|
465
468
|
$tag$: string | number | Function;
|
|
@@ -1436,10 +1439,10 @@ export declare namespace JSXBase {
|
|
|
1436
1439
|
onCompositionUpdateCapture?: (event: CompositionEvent) => void;
|
|
1437
1440
|
onFocus?: (event: FocusEvent) => void;
|
|
1438
1441
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1442
|
+
onFocusin?: (event: FocusEvent) => void;
|
|
1443
|
+
onFocusinCapture?: (event: FocusEvent) => void;
|
|
1444
|
+
onFocusout?: (event: FocusEvent) => void;
|
|
1445
|
+
onFocusoutCapture?: (event: FocusEvent) => void;
|
|
1443
1446
|
onBlur?: (event: FocusEvent) => void;
|
|
1444
1447
|
onBlurCapture?: (event: FocusEvent) => void;
|
|
1445
1448
|
onChange?: (event: Event) => void;
|