@stencil/core 5.0.0-beta.9 → 5.0.0-rc.0
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/dist/app-data/index.d.ts +1 -1
- package/dist/app-data/index.js +1 -0
- package/dist/{client-BRu0GtRn.mjs → client-ClM4H9-P.mjs} +204 -76
- package/dist/compiler/browser.d.ts +120 -81
- package/dist/compiler/browser.js +964 -402
- package/dist/compiler/index.d.mts +110 -2
- package/dist/compiler/index.mjs +3 -3
- package/dist/compiler/utils/index.d.mts +2 -2
- package/dist/compiler/utils/index.mjs +3 -3
- package/dist/{compiler-wLrjuSOK.mjs → compiler-DFanjq9z.mjs} +5300 -3005
- package/dist/declarations/stencil-public-compiler.d.ts +178 -133
- package/dist/declarations/stencil-public-docs.d.ts +23 -0
- package/dist/declarations/stencil-public-runtime.d.ts +81 -59
- package/dist/{index-BvF31nqP.d.mts → index-DvfFOkiJ.d.mts} +220 -133
- package/dist/{index-BXAcVN2j.d.ts → index-XQHZl0MW.d.ts} +70 -57
- package/dist/{index-BAP9T4CB.d.mts → index-aBMJC5F9.d.mts} +6 -2
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.d.mts +6 -0
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-75gQKkFz.mjs → node-DJP8JuAS.mjs} +42 -48
- package/dist/runtime/client/lazy.js +522 -262
- package/dist/runtime/client/runtime.d.ts +100 -68
- package/dist/runtime/client/runtime.js +522 -262
- package/dist/runtime/index.d.ts +6 -6
- package/dist/runtime/index.js +521 -261
- package/dist/runtime/server/index.d.mts +36 -12
- package/dist/runtime/server/index.mjs +635 -304
- package/dist/runtime/server/runner.d.mts +49 -6
- package/dist/runtime/server/runner.mjs +385 -87
- package/dist/signals/index.d.ts +11 -2
- package/dist/signals/index.js +15 -35
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.mjs +2 -2
- package/dist/testing/index.d.mts +152 -124
- package/dist/testing/index.mjs +535 -269
- package/dist/{util-IKfWWLJo.mjs → util-C-H1H84W.mjs} +8 -1
- package/dist/{validation-DAdGTrys.mjs → validation-ByYYKvnS.mjs} +37 -3
- package/package.json +8 -4
|
@@ -218,6 +218,16 @@ interface SsrDocumentOptions {
|
|
|
218
218
|
* Sets `document.referrer`
|
|
219
219
|
*/
|
|
220
220
|
referrer?: string;
|
|
221
|
+
/**
|
|
222
|
+
* Render into one long-lived mock window, reset between renders, instead of creating a new one
|
|
223
|
+
* for every call. Skips evaluating the whole SSR platform (runtime and every component)
|
|
224
|
+
* on each render: most of the cost of rendering a small fragment, and a good part of a whole page.
|
|
225
|
+
*
|
|
226
|
+
* Applies to HTML string input (not a `Document`). One window per distinct `serializeShadowRoot` value,
|
|
227
|
+
* and renders sharing a window run one at a time.
|
|
228
|
+
* Defaults to `false`, except in the `ssr-wasm` output target, where it defaults to `true`.
|
|
229
|
+
*/
|
|
230
|
+
reuseWindow?: boolean;
|
|
221
231
|
/**
|
|
222
232
|
* Removes every `<script>` element found in the `document`. Defaults to `false`.
|
|
223
233
|
*/
|
|
@@ -298,7 +308,7 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
298
308
|
* Note that this is "approximate", in that HTML may often not be able
|
|
299
309
|
* to be split at an exact line width. Additionally, new lines created
|
|
300
310
|
* is where HTML naturally already has whitespace, such as before an
|
|
301
|
-
* attribute or spaces between words. Defaults to `100
|
|
311
|
+
* attribute or spaces between words. Defaults to no wrapping (`100` when prerendering).
|
|
302
312
|
*/
|
|
303
313
|
approximateLineWidth?: number;
|
|
304
314
|
/**
|
|
@@ -316,12 +326,12 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
316
326
|
prettyHtml?: boolean;
|
|
317
327
|
/**
|
|
318
328
|
* Remove quotes from attribute values when possible.
|
|
319
|
-
* Defaults to `true
|
|
329
|
+
* Defaults to `false` (`true` when prerendering).
|
|
320
330
|
*/
|
|
321
331
|
removeAttributeQuotes?: boolean;
|
|
322
332
|
/**
|
|
323
333
|
* Remove the `=""` from standardized `boolean` attributes,
|
|
324
|
-
* such as `hidden` or `checked`. Defaults to `true
|
|
334
|
+
* such as `hidden` or `checked`. Defaults to `false` (`true` when prerendering).
|
|
325
335
|
*/
|
|
326
336
|
removeBooleanAttributeQuotes?: boolean;
|
|
327
337
|
/**
|
|
@@ -330,7 +340,7 @@ interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
|
330
340
|
*/
|
|
331
341
|
removeEmptyAttributes?: boolean;
|
|
332
342
|
/**
|
|
333
|
-
* Remove HTML comments. Defaults to `true
|
|
343
|
+
* Remove HTML comments. Defaults to `false` (`true` when prerendering).
|
|
334
344
|
*/
|
|
335
345
|
removeHtmlComments?: boolean;
|
|
336
346
|
/**
|
|
@@ -349,6 +359,12 @@ interface SsrFactoryOptions extends SerializeDocumentOptions {
|
|
|
349
359
|
serializeToHtml: boolean;
|
|
350
360
|
destroyWindow: boolean;
|
|
351
361
|
destroyDocument: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* A canonical key for `serializeShadowRoot`, set by the renderer. Renders with the same key
|
|
364
|
+
* render every component the same way, so they can share an SSR platform.
|
|
365
|
+
* @internal
|
|
366
|
+
*/
|
|
367
|
+
serializeShadowRootKey?: string;
|
|
352
368
|
}
|
|
353
369
|
interface Diagnostic {
|
|
354
370
|
absFilePath?: string | undefined;
|
|
@@ -440,6 +456,8 @@ interface HostElement extends HTMLElement {
|
|
|
440
456
|
host?: Element;
|
|
441
457
|
forceUpdate?: () => void;
|
|
442
458
|
__s_ghr?: () => HostRef;
|
|
459
|
+
/** attaches the component's shadow root if it needs one and doesn't have one yet */
|
|
460
|
+
__attachShadow?: () => void;
|
|
443
461
|
/**
|
|
444
462
|
* Unique stencil id for this element
|
|
445
463
|
*/
|
|
@@ -794,7 +812,9 @@ ComponentConstructorChangeHandlers?,
|
|
|
794
812
|
/** serializers */
|
|
795
813
|
ComponentConstructorChangeHandlers?,
|
|
796
814
|
/** deserializers */
|
|
797
|
-
ComponentConstructorChangeHandlers
|
|
815
|
+
ComponentConstructorChangeHandlers?,
|
|
816
|
+
/** shadow root reference target */
|
|
817
|
+
string?];
|
|
798
818
|
/**
|
|
799
819
|
* Runtime metadata for a Stencil component
|
|
800
820
|
*/
|
|
@@ -841,6 +861,10 @@ interface ComponentRuntimeMeta {
|
|
|
841
861
|
* Information about which class members have attribute > prop deserializers attached on the component.
|
|
842
862
|
*/
|
|
843
863
|
$deserializers$?: ComponentConstructorChangeHandlers;
|
|
864
|
+
/**
|
|
865
|
+
* `id` of the element within the shadow root that IDREFs targeting the host resolve to.
|
|
866
|
+
*/
|
|
867
|
+
$referenceTarget$?: string;
|
|
844
868
|
}
|
|
845
869
|
/**
|
|
846
870
|
* A mapping of the names of members on the component to some runtime-specific
|
|
@@ -1026,8 +1050,9 @@ declare const hAsync: (nodeName: any, vnodeData: any, ...children: ChildType[])
|
|
|
1026
1050
|
* @param results The results object to store the hydration results.
|
|
1027
1051
|
* @param afterSsr The callback to be called after SSR is complete.
|
|
1028
1052
|
* @param resolve The resolve function to be called when SSR is complete.
|
|
1053
|
+
* @param abortController The AbortController to use for aborting in-flight fetch() calls and other cancellable work when SSR times out.
|
|
1029
1054
|
*/
|
|
1030
|
-
declare function ssrApp(win: Window & typeof globalThis, opts: SsrFactoryOptions, results: SsrResults, afterSsr: (win: Window, opts: SsrFactoryOptions, results: SsrResults, resolve: (results: SsrResults) => void) => void, resolve: (results: SsrResults) => void): void;
|
|
1055
|
+
declare function ssrApp(win: Window & typeof globalThis, opts: SsrFactoryOptions, results: SsrResults, afterSsr: (win: Window, opts: SsrFactoryOptions, results: SsrResults, resolve: (results: SsrResults) => void) => void, resolve: (results: SsrResults) => void, abortController: AbortController): void;
|
|
1031
1056
|
//#endregion
|
|
1032
1057
|
//#region src/runtime/bootstrap-standalone.d.ts
|
|
1033
1058
|
declare const defineCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => void;
|
|
@@ -1100,13 +1125,13 @@ type Ctor<T = {}> = new (...args: any[]) => T;
|
|
|
1100
1125
|
declare function Mixin(...mixins: ((base: Ctor) => Ctor)[]): Ctor<{}>;
|
|
1101
1126
|
//#endregion
|
|
1102
1127
|
//#region src/runtime/mode.d.ts
|
|
1103
|
-
declare const setMode: (handler: ResolutionHandler) =>
|
|
1128
|
+
declare const setMode: (handler: ResolutionHandler) => void;
|
|
1104
1129
|
declare const getMode: (ref: RuntimeRef) => string;
|
|
1105
1130
|
//#endregion
|
|
1106
1131
|
//#region src/runtime/nonce.d.ts
|
|
1107
1132
|
/**
|
|
1108
1133
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1109
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created
|
|
1134
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created style tags.
|
|
1110
1135
|
* @param nonce The value to be assigned to the platform nonce property.
|
|
1111
1136
|
* @returns void
|
|
1112
1137
|
*/
|
|
@@ -1134,10 +1159,9 @@ declare const setNonce: (nonce: string) => string;
|
|
|
1134
1159
|
*
|
|
1135
1160
|
* @param propValue the new value to coerce to some type
|
|
1136
1161
|
* @param propType the type of the prop, expressed as a binary number
|
|
1137
|
-
* @param isFormAssociated whether the component is form-associated (optional)
|
|
1138
1162
|
* @returns the parsed/coerced value
|
|
1139
1163
|
*/
|
|
1140
|
-
declare const parsePropertyValue: (propValue: unknown, propType: number
|
|
1164
|
+
declare const parsePropertyValue: (propValue: unknown, propType: number) => any;
|
|
1141
1165
|
//#endregion
|
|
1142
1166
|
//#region src/runtime/proxy-component.d.ts
|
|
1143
1167
|
/**
|
|
@@ -1249,7 +1273,7 @@ declare const registerInstance: (lazyInstance: any, hostRef: HostRef) => HostRef
|
|
|
1249
1273
|
declare const registerHost: (elm: HostElement, cmpMeta: ComponentRuntimeMeta) => HostRef;
|
|
1250
1274
|
declare const Build: UserBuildConditionals;
|
|
1251
1275
|
declare const styles: StyleMap;
|
|
1252
|
-
declare const
|
|
1276
|
+
declare const modeResolver: ResolutionHandler[];
|
|
1253
1277
|
/**
|
|
1254
1278
|
* Server-side implementation of getAssetPath.
|
|
1255
1279
|
*
|
|
@@ -1274,4 +1298,4 @@ declare const setAssetPath: (path: string) => string;
|
|
|
1274
1298
|
declare const setScopedSsr: (opts: SsrFactoryOptions) => void;
|
|
1275
1299
|
declare const needsScopedSSR: () => boolean;
|
|
1276
1300
|
//#endregion
|
|
1277
|
-
export { BUILD, Build, Env, Fragment, Host, Mixin, NAMESPACE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getShadowRoot, getValue, hAsync as h, injectSideEffectStyle, insertVdomAnnotations, isMemberInElement, jsx, jsxs, loadModule,
|
|
1301
|
+
export { BUILD, Build, Env, Fragment, Host, Mixin, NAMESPACE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getShadowRoot, getValue, hAsync as h, injectSideEffectStyle, insertVdomAnnotations, isMemberInElement, jsx, jsxs, loadModule, modeResolver, needsScopedSSR, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, registerSideEffectStyleTarget, renderVdom, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setScopedSsr, setTagTransformer, setValue, ssrApp, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsMutableAdoptedStyleSheets, transformTag, unregisterSideEffectStyleTarget, win, writeTask };
|