@qwik.dev/core 2.0.0-beta.8 → 2.0.0-beta.9

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.
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+ const QWIK_BACKPATCH_EXECUTOR_MINIFIED = "const t='script[type=\"qwik/backpatch\"]',e=document.currentScript;if(e){const o=e.closest(\"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])\");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||\"[]\"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=0;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let l=t[e+2];for(;c<o;)r=n.nextNode(),c++;const s=r;null==l||!1===l?s.removeAttribute(i):(\"boolean\"==typeof l&&(l=\"\"),s.setAttribute(i,l))}}}}";
2
+ const QWIK_BACKPATCH_EXECUTOR_DEBUG = "const BACKPATCH_DATA_SELECTOR = 'script[type=\"qwik/backpatch\"]';\nconst executorScript = document.currentScript;\nif (executorScript) {\n const container = executorScript.closest(\n \"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])\"\n );\n if (container) {\n const script = container.querySelector(BACKPATCH_DATA_SELECTOR);\n if (script) {\n const data = JSON.parse(script.textContent || \"[]\");\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);\n let currentNode = walker.currentNode;\n let currentNodeIdx = 0;\n for (let i = 0; i < data.length; i += 3) {\n const elementIdx = data[i];\n const attrName = data[i + 1];\n let value = data[i + 2];\n while (currentNodeIdx < elementIdx) {\n currentNode = walker.nextNode();\n currentNodeIdx++;\n }\n const element = currentNode;\n if (value == null || value === false) {\n element.removeAttribute(attrName);\n } else {\n if (typeof value === \"boolean\") {\n value = \"\";\n }\n element.setAttribute(attrName, value);\n }\n }\n }\n }\n}";
3
+ globalThis.QWIK_BACKPATCH_EXECUTOR_MINIFIED = QWIK_BACKPATCH_EXECUTOR_MINIFIED;
4
+ globalThis.QWIK_BACKPATCH_EXECUTOR_DEBUG = QWIK_BACKPATCH_EXECUTOR_DEBUG;
5
+ exports.QWIK_BACKPATCH_EXECUTOR_MINIFIED = QWIK_BACKPATCH_EXECUTOR_MINIFIED;
6
+ exports.QWIK_BACKPATCH_EXECUTOR_DEBUG = QWIK_BACKPATCH_EXECUTOR_DEBUG;
@@ -0,0 +1,2 @@
1
+ export declare const QWIK_BACKPATCH_EXECUTOR_MINIFIED: string;
2
+ export declare const QWIK_BACKPATCH_EXECUTOR_DEBUG: string;
@@ -0,0 +1,5 @@
1
+ const QWIK_BACKPATCH_EXECUTOR_MINIFIED = "const t='script[type=\"qwik/backpatch\"]',e=document.currentScript;if(e){const o=e.closest(\"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])\");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||\"[]\"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=0;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let l=t[e+2];for(;c<o;)r=n.nextNode(),c++;const s=r;null==l||!1===l?s.removeAttribute(i):(\"boolean\"==typeof l&&(l=\"\"),s.setAttribute(i,l))}}}}";
2
+ const QWIK_BACKPATCH_EXECUTOR_DEBUG = "const BACKPATCH_DATA_SELECTOR = 'script[type=\"qwik/backpatch\"]';\nconst executorScript = document.currentScript;\nif (executorScript) {\n const container = executorScript.closest(\n \"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])\"\n );\n if (container) {\n const script = container.querySelector(BACKPATCH_DATA_SELECTOR);\n if (script) {\n const data = JSON.parse(script.textContent || \"[]\");\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);\n let currentNode = walker.currentNode;\n let currentNodeIdx = 0;\n for (let i = 0; i < data.length; i += 3) {\n const elementIdx = data[i];\n const attrName = data[i + 1];\n let value = data[i + 2];\n while (currentNodeIdx < elementIdx) {\n currentNode = walker.nextNode();\n currentNodeIdx++;\n }\n const element = currentNode;\n if (value == null || value === false) {\n element.removeAttribute(attrName);\n } else {\n if (typeof value === \"boolean\") {\n value = \"\";\n }\n element.setAttribute(attrName, value);\n }\n }\n }\n }\n}";
3
+ globalThis.QWIK_BACKPATCH_EXECUTOR_MINIFIED = QWIK_BACKPATCH_EXECUTOR_MINIFIED;
4
+ globalThis.QWIK_BACKPATCH_EXECUTOR_DEBUG = QWIK_BACKPATCH_EXECUTOR_DEBUG;
5
+ export { QWIK_BACKPATCH_EXECUTOR_MINIFIED, QWIK_BACKPATCH_EXECUTOR_DEBUG };
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@qwik.dev/core/backpatch",
3
+ "version": "2.0.0-beta.9-dev+6b582c7",
4
+ "main": "index.mjs",
5
+ "types": "index.d.ts",
6
+ "private": true,
7
+ "type": "module"
8
+ }
@@ -0,0 +1,34 @@
1
+ const BACKPATCH_DATA_SELECTOR = 'script[type="qwik/backpatch"]';
2
+ const executorScript = document.currentScript;
3
+ if (executorScript) {
4
+ const container = executorScript.closest(
5
+ "[q\\:container]:not([q\\:container=html]):not([q\\:container=text])"
6
+ );
7
+ if (container) {
8
+ const script = container.querySelector(BACKPATCH_DATA_SELECTOR);
9
+ if (script) {
10
+ const data = JSON.parse(script.textContent || "[]");
11
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);
12
+ let currentNode = walker.currentNode;
13
+ let currentNodeIdx = 0;
14
+ for (let i = 0; i < data.length; i += 3) {
15
+ const elementIdx = data[i];
16
+ const attrName = data[i + 1];
17
+ let value = data[i + 2];
18
+ while (currentNodeIdx < elementIdx) {
19
+ currentNode = walker.nextNode();
20
+ currentNodeIdx++;
21
+ }
22
+ const element = currentNode;
23
+ if (value == null || value === false) {
24
+ element.removeAttribute(attrName);
25
+ } else {
26
+ if (typeof value === "boolean") {
27
+ value = "";
28
+ }
29
+ element.setAttribute(attrName, value);
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1 @@
1
+ const t='script[type="qwik/backpatch"]',e=document.currentScript;if(e){const o=e.closest("[q\\:container]:not([q\\:container=html]):not([q\\:container=text])");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||"[]"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=0;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let l=t[e+2];for(;c<o;)r=n.nextNode(),c++;const s=r;null==l||!1===l?s.removeAttribute(i):("boolean"==typeof l&&(l=""),s.setAttribute(i,l))}}}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwik.dev/core/build",
3
- "version": "2.0.0-beta.8-dev+434cd18",
3
+ "version": "2.0.0-beta.9-dev+6b582c7",
4
4
  "main": "index.mjs",
5
5
  "types": "index.d.ts",
6
6
  "private": true,
package/dist/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/cli 2.0.0-beta.8-dev+434cd18
3
+ * @qwik.dev/core/cli 2.0.0-beta.9-dev+6b582c7
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -5536,7 +5536,7 @@ async function printHelp(app) {
5536
5536
  await runCommand2(Object.assign(app, { task: args[0], args }));
5537
5537
  }
5538
5538
  function printVersion() {
5539
- console.log("2.0.0-beta.8-dev+434cd18");
5539
+ console.log("2.0.0-beta.9-dev+6b582c7");
5540
5540
  }
5541
5541
  // Annotate the CommonJS export names for ESM import in node:
5542
5542
  0 && (module.exports = {
@@ -5,7 +5,6 @@ import { isDev } from './build';
5
5
  import { isServer } from './build';
6
6
  import { QRL as QRL_2 } from './qrl.public';
7
7
  import type { StreamWriter as StreamWriter_2 } from '.';
8
- import { ValueOrPromise as ValueOrPromise_2 } from '..';
9
8
 
10
9
  /**
11
10
  * Qwik Optimizer marker function.
@@ -99,7 +98,7 @@ declare type _AllowPlainQrl<Q> = QRLEventHandlerMulti<any, any> extends Q ? Q ex
99
98
 
100
99
  declare type AllPascalEventMaps = PascalMap<AllEventsMap>;
101
100
 
102
- declare type AllSignalFlags = SignalFlags | WrappedSignalFlags | ComputedSignalFlags;
101
+ declare type AllSignalFlags = SignalFlags | WrappedSignalFlags | SerializationSignalFlags;
103
102
 
104
103
  /**
105
104
  * TS defines these with the React syntax which is not compatible with Qwik. E.g. `ariaAtomic`
@@ -367,6 +366,10 @@ export declare type AsyncComputedFn<T> = (ctx: AsyncComputedCtx) => Promise<T>;
367
366
 
368
367
  /** @public */
369
368
  export declare interface AsyncComputedReadonlySignal<T = unknown> extends ComputedSignal<T> {
369
+ /** Whether the signal is currently loading. */
370
+ loading: boolean;
371
+ /** The error that occurred while computing the signal. */
372
+ error: Error | null;
370
373
  }
371
374
 
372
375
  /** @public */
@@ -387,7 +390,7 @@ declare class AsyncComputedSignalImpl<T> extends ComputedSignalImpl<T, AsyncComp
387
390
  $destroy$: NoSerialize<() => void> | null;
388
391
  private $promiseValue$;
389
392
  [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
390
- constructor(container: Container | null, fn: AsyncComputeQRL<T>, flags?: SignalFlags | ComputedSignalFlags);
393
+ constructor(container: Container | null, fn: AsyncComputeQRL<T>, flags?: SignalFlags | SerializationSignalFlags);
391
394
  /**
392
395
  * Loading is true if the signal is still waiting for the promise to resolve, false if the promise
393
396
  * has resolved or rejected.
@@ -400,7 +403,7 @@ declare class AsyncComputedSignalImpl<T> extends ComputedSignalImpl<T, AsyncComp
400
403
  set untrackedError(value: Error | null);
401
404
  get untrackedError(): Error | null;
402
405
  invalidate(): void;
403
- $computeIfNeeded$(): boolean;
406
+ $computeIfNeeded$(): boolean | undefined;
404
407
  }
405
408
 
406
409
  declare type AsyncComputeQRL<T> = QRLInternal<AsyncComputedFn<T>>;
@@ -431,6 +434,32 @@ declare type BivariantQrlFn<ARGS extends any[], RETURN> = {
431
434
  /** @public */
432
435
  declare type Booleanish = boolean | `${boolean}`;
433
436
 
437
+ declare interface Chore<T extends ChoreType = ChoreType> {
438
+ $type$: T;
439
+ $idx$: number | string;
440
+ $host$: HostElement;
441
+ $target$: ChoreTarget | null;
442
+ $payload$: unknown;
443
+ $state$: ChoreState;
444
+ $blockedChores$: Chore[] | null;
445
+ $startTime$: number | undefined;
446
+ $endTime$: number | undefined;
447
+ $resolve$: ((value: any) => void) | undefined;
448
+ $reject$: ((reason?: any) => void) | undefined;
449
+ $returnValue$: ValueOrPromise<ChoreReturnValue<T>>;
450
+ }
451
+
452
+ declare type ChoreReturnValue<T extends ChoreType = ChoreType> = T extends ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS | ChoreType.WAIT_FOR_QUEUE | ChoreType.NODE_PROP ? void : T extends ChoreType.NODE_DIFF | ChoreType.COMPONENT ? JSXOutput : unknown;
453
+
454
+ declare enum ChoreState {
455
+ NONE = 0,
456
+ RUNNING = 1,
457
+ FAILED = 2,
458
+ DONE = 3
459
+ }
460
+
461
+ declare type ChoreTarget = HostElement | QRLInternal<(...args: unknown[]) => unknown> | Signal | StoreTarget;
462
+
434
463
  declare const enum ChoreType {
435
464
  MACRO = 240,
436
465
  MICRO = 15,
@@ -442,10 +471,9 @@ declare const enum ChoreType {
442
471
  NODE_PROP = 5,
443
472
  COMPONENT = 6,
444
473
  RECOMPUTE_AND_SCHEDULE_EFFECTS = 7,
445
- JOURNAL_FLUSH = 16,
446
- VISIBLE = 32,
447
- CLEANUP_VISIBLE = 48,
448
- WAIT_FOR_ALL = 255
474
+ VISIBLE = 16,
475
+ CLEANUP_VISIBLE = 32,
476
+ WAIT_FOR_QUEUE = 255
449
477
  }
450
478
 
451
479
  /**
@@ -469,9 +497,9 @@ export declare interface ClientContainer extends Container {
469
497
  qManifestHash: string;
470
498
  rootVNode: _ElementVNode;
471
499
  $journal$: VNodeJournal;
472
- renderDone: Promise<void> | null;
473
500
  $forwardRefs$: Array<number> | null;
474
501
  $initialQRLsIndexes$: Array<number> | null;
502
+ $flushEpoch$: number;
475
503
  parseQRL<T = unknown>(qrl: string): QRL<T>;
476
504
  $setRawState$(id: number, vParent: _ElementVNode | _VirtualVNode): void;
477
505
  }
@@ -599,11 +627,6 @@ export declare interface ComputedSignal<T> extends ReadonlySignal<T> {
599
627
  invalidate(): void;
600
628
  }
601
629
 
602
- declare const enum ComputedSignalFlags {
603
- SERIALIZATION_STRATEGY_NEVER = 8,
604
- SERIALIZATION_STRATEGY_ALWAYS = 16
605
- }
606
-
607
630
  /**
608
631
  * A signal which is computed from other signals.
609
632
  *
@@ -617,10 +640,9 @@ declare class ComputedSignalImpl<T, S extends QRLInternal = ComputeQRL<T>> exten
617
640
  * resolve the QRL during the mark dirty phase so that any call to it will be synchronous). )
618
641
  */
619
642
  $computeQrl$: S;
620
- $flags$: SignalFlags | ComputedSignalFlags;
621
- $forceRunEffects$: boolean;
643
+ $flags$: SignalFlags | SerializationSignalFlags;
622
644
  [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
623
- constructor(container: Container | null, fn: S, flags?: SignalFlags | ComputedSignalFlags);
645
+ constructor(container: Container | null, fn: S, flags?: SignalFlags | SerializationSignalFlags);
624
646
  invalidate(): void;
625
647
  /**
626
648
  * Use this to force running subscribers, for example when the calculated value has mutated but
@@ -628,7 +650,7 @@ declare class ComputedSignalImpl<T, S extends QRLInternal = ComputeQRL<T>> exten
628
650
  */
629
651
  force(): void;
630
652
  get untrackedValue(): T;
631
- $computeIfNeeded$(): boolean;
653
+ $computeIfNeeded$(): void;
632
654
  set value(_: any);
633
655
  get value(): any;
634
656
  }
@@ -658,7 +680,7 @@ declare interface Container {
658
680
  readonly $serverData$: Record<string, any>;
659
681
  $currentUniqueId$: number;
660
682
  $buildBase$: string | null;
661
- handleError(err: any, $host$: HostElement): void;
683
+ handleError(err: any, $host$: HostElement | null): void;
662
684
  getParentHost(host: HostElement): HostElement | null;
663
685
  setContext<T>(host: HostElement, context: ContextId<T>, value: T): void;
664
686
  resolveContext<T>(host: HostElement, contextId: ContextId<T>): T | undefined;
@@ -809,12 +831,6 @@ export declare interface CorePlatform {
809
831
  * @param fn - The function to call when the next animation frame is ready.
810
832
  */
811
833
  raf: (fn: () => any) => Promise<any>;
812
- /**
813
- * Perform operation on next tick.
814
- *
815
- * @param fn - The function to call when the tick is ready.
816
- */
817
- nextTick: (fn: () => any) => Promise<any>;
818
834
  /**
819
835
  * Retrieve chunk name for the symbol.
820
836
  *
@@ -920,17 +936,16 @@ export declare const createComputedQrl: <T>(qrl: QRL<() => T>, options?: Compute
920
936
  */
921
937
  export declare const createContextId: <STATE = unknown>(name: string) => ContextId<STATE>;
922
938
 
923
- declare const createScheduler: (container: Container, scheduleDrain: () => void, journalFlush: () => void) => {
924
- (type: ChoreType.QRL_RESOLVE, ignore: null, target: ComputeQRL<any> | AsyncComputeQRL<any>): ValueOrPromise<void>;
925
- (type: ChoreType.JOURNAL_FLUSH): ValueOrPromise<void>;
926
- (type: ChoreType.WAIT_FOR_ALL): ValueOrPromise<void>;
927
- (type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | null, target: Signal | StoreHandler, effects: Set<EffectSubscription> | null): ValueOrPromise<void>;
928
- (type: ChoreType.TASK | ChoreType.VISIBLE, task: Task): ValueOrPromise<void>;
929
- (type: ChoreType.RUN_QRL, host: HostElement, target: QRLInternal<(...args: unknown[]) => unknown>, args: unknown[]): ValueOrPromise<void>;
930
- (type: ChoreType.COMPONENT, host: HostElement, qrl: QRLInternal<OnRenderFn<unknown>>, props: Props | null): ValueOrPromise<JSXOutput>;
931
- (type: ChoreType.NODE_DIFF, host: HostElement, target: HostElement, value: JSXOutput | Signal): ValueOrPromise<void>;
932
- (type: ChoreType.NODE_PROP, host: HostElement, prop: string, value: any): ValueOrPromise<void>;
933
- (type: ChoreType.CLEANUP_VISIBLE, task: Task): ValueOrPromise<JSXOutput>;
939
+ declare const createScheduler: (container: Container, journalFlush: () => void, choreQueue?: Chore[], blockedChores?: Set<Chore>, runningChores?: Set<Chore>) => {
940
+ (type: ChoreType.QRL_RESOLVE, ignore: null, target: ComputeQRL<any> | AsyncComputeQRL<any>): Chore<ChoreType.QRL_RESOLVE>;
941
+ (type: ChoreType.WAIT_FOR_QUEUE): Chore<ChoreType.WAIT_FOR_QUEUE>;
942
+ (type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | null, target: Signal | StoreHandler, effects: Set<EffectSubscription> | null): Chore<ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS>;
943
+ (type: ChoreType.TASK | ChoreType.VISIBLE, task: Task): Chore<ChoreType.TASK | ChoreType.VISIBLE>;
944
+ (type: ChoreType.RUN_QRL, host: HostElement, target: QRLInternal<(...args: unknown[]) => unknown>, args: unknown[]): Chore<ChoreType.RUN_QRL>;
945
+ (type: ChoreType.COMPONENT, host: HostElement, qrl: QRLInternal<OnRenderFn<unknown>>, props: Props | null): Chore<ChoreType.COMPONENT>;
946
+ (type: ChoreType.NODE_DIFF, host: HostElement, target: HostElement, value: JSXOutput | Signal): Chore<ChoreType.NODE_DIFF>;
947
+ (type: ChoreType.NODE_PROP, host: HostElement, prop: string, value: any): Chore<ChoreType.NODE_PROP>;
948
+ (type: ChoreType.CLEANUP_VISIBLE, task: Task): Chore<ChoreType.CLEANUP_VISIBLE>;
934
949
  };
935
950
 
936
951
  /**
@@ -1026,7 +1041,6 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
1026
1041
  rootVNode: _ElementVNode;
1027
1042
  document: _QDocument;
1028
1043
  $journal$: VNodeJournal;
1029
- renderDone: Promise<void> | null;
1030
1044
  $rawStateData$: unknown[];
1031
1045
  $storeProxyMap$: ObjToProxyMap;
1032
1046
  $qFuncs$: Array<(...args: unknown[]) => unknown>;
@@ -1036,18 +1050,15 @@ declare class DomContainer extends _SharedContainer implements ClientContainer {
1036
1050
  vNodeLocate: (id: string | Element) => _VNode;
1037
1051
  private $stateData$;
1038
1052
  private $styleIds$;
1039
- private $renderCount$;
1040
1053
  constructor(element: _ContainerElement);
1041
1054
  $setRawState$(id: number, vParent: _ElementVNode | _VirtualVNode): void;
1042
1055
  parseQRL<T = unknown>(qrl: string): QRL<T>;
1043
- handleError(err: any, host: HostElement): void;
1056
+ handleError(err: any, host: HostElement | null): void;
1044
1057
  setContext<T>(host: HostElement, context: ContextId<T>, value: T): void;
1045
1058
  resolveContext<T>(host: HostElement, contextId: ContextId<T>): T | undefined;
1046
1059
  getParentHost(host: HostElement): HostElement | null;
1047
1060
  setHostProp<T>(host: HostElement, name: string, value: T): void;
1048
1061
  getHostProp<T>(host: HostElement, name: string): T | null;
1049
- scheduleRender(): Promise<void>;
1050
- private processChores;
1051
1062
  ensureProjectionResolved(vNode: _VirtualVNode): void;
1052
1063
  $getObjectById$: (id: number | string) => unknown;
1053
1064
  getSyncFn(id: number): (...args: unknown[]) => unknown;
@@ -1209,6 +1220,13 @@ declare type Filtered<T, A = {}> = {
1209
1220
  /** @internal */
1210
1221
  export declare const _fnSignal: <T extends (...args: any) => any>(fn: T, args: Parameters<T>, fnStr?: string) => WrappedSignalImpl<any>;
1211
1222
 
1223
+ /**
1224
+ * Force a store to recompute and schedule effects.
1225
+ *
1226
+ * @public
1227
+ */
1228
+ export declare const forceStoreEffects: (value: StoreTarget, prop: keyof StoreTarget) => void;
1229
+
1212
1230
  /** @public */
1213
1231
  export declare const Fragment: FunctionComponent<{
1214
1232
  children?: any;
@@ -1294,6 +1312,12 @@ declare function h<TYPE extends string | FunctionComponent<PROPS>, PROPS extends
1294
1312
  export { h as createElement }
1295
1313
  export { h }
1296
1314
 
1315
+ /**
1316
+ * @returns True if the store has effects for the given prop
1317
+ * @internal
1318
+ */
1319
+ export declare const _hasStoreEffects: (value: StoreTarget, prop: keyof StoreTarget) => boolean;
1320
+
1297
1321
  /** @public */
1298
1322
  declare interface HoistEntryStrategy {
1299
1323
  type: 'hoist';
@@ -1507,12 +1531,15 @@ export declare interface ISsrComponentFrame {
1507
1531
 
1508
1532
  declare interface ISsrNode {
1509
1533
  id: string;
1510
- parentSsrNode: ISsrNode | null;
1511
- vnodeData?: VNodeData;
1534
+ flags: SsrNodeFlags;
1535
+ parentComponent: ISsrNode | null;
1536
+ vnodeData: VNodeData;
1537
+ currentFile: string | null;
1512
1538
  setProp(name: string, value: any): void;
1513
1539
  getProp(name: string): any;
1514
1540
  removeProp(name: string): void;
1515
1541
  addChild(child: ISsrNode): void;
1542
+ setTreeNonUpdatable(): void;
1516
1543
  }
1517
1544
 
1518
1545
  /** @internal */
@@ -2633,14 +2660,14 @@ declare interface ResourceReturnInternal<T> {
2633
2660
  }
2634
2661
 
2635
2662
  /** @internal */
2636
- export declare const _restProps: (props: PropsProxy, omit: string[], target?: Props) => Props;
2663
+ export declare const _restProps: (props: PropsProxy, omit?: string[], target?: Props) => Props;
2637
2664
 
2638
2665
  /**
2639
2666
  * This is called by qwik-loader to schedule a QRL. It has to be synchronous.
2640
2667
  *
2641
2668
  * @internal
2642
2669
  */
2643
- export declare const _run: (...args: unknown[]) => ValueOrPromise_2<void>;
2670
+ export declare const _run: (...args: unknown[]) => ValueOrPromise<unknown>;
2644
2671
 
2645
2672
  declare type Scheduler = ReturnType<typeof createScheduler>;
2646
2673
 
@@ -2705,6 +2732,11 @@ declare interface SerializationContext {
2705
2732
  $setProp$: (obj: any, prop: string, value: any) => void;
2706
2733
  }
2707
2734
 
2735
+ declare const enum SerializationSignalFlags {
2736
+ SERIALIZATION_STRATEGY_NEVER = 16,
2737
+ SERIALIZATION_STRATEGY_ALWAYS = 32
2738
+ }
2739
+
2708
2740
  /** @public */
2709
2741
  export declare type SerializationStrategy = 'never' | 'always';
2710
2742
 
@@ -2787,7 +2819,7 @@ declare interface SerializerSignal<T> extends ComputedSignal<T> {
2787
2819
  declare class SerializerSignalImpl<T, S> extends ComputedSignalImpl<T> {
2788
2820
  constructor(container: Container | null, argQrl: QRLInternal<SerializerArg<T, S>>);
2789
2821
  $didInitialize$: boolean;
2790
- $computeIfNeeded$(): boolean;
2822
+ $computeIfNeeded$(): void;
2791
2823
  }
2792
2824
 
2793
2825
  /**
@@ -2838,7 +2870,8 @@ export declare abstract class _SharedContainer implements Container {
2838
2870
  $currentUniqueId$: number;
2839
2871
  $instanceHash$: string | null;
2840
2872
  $buildBase$: string | null;
2841
- constructor(scheduleDrain: () => void, journalFlush: () => void, serverData: Record<string, any>, locale: string);
2873
+ $flushEpoch$: number;
2874
+ constructor(journalFlush: () => void, serverData: Record<string, any>, locale: string);
2842
2875
  trackSignalValue<T>(signal: Signal, subscriber: HostElement, property: string, data: _SubscriptionData): T;
2843
2876
  serializationCtxFactory(NodeConstructor: {
2844
2877
  new (...rest: any[]): {
@@ -2850,7 +2883,7 @@ export declare abstract class _SharedContainer implements Container {
2850
2883
  };
2851
2884
  } | null, symbolToChunkResolver: SymbolToChunkResolver, writer?: StreamWriter): SerializationContext;
2852
2885
  abstract ensureProjectionResolved(host: HostElement): void;
2853
- abstract handleError(err: any, $host$: HostElement): void;
2886
+ abstract handleError(err: any, $host$: HostElement | null): void;
2854
2887
  abstract getParentHost(host: HostElement): HostElement | null;
2855
2888
  abstract setContext<T>(host: HostElement, context: ContextId<T>, value: T): void;
2856
2889
  abstract resolveContext<T>(host: HostElement, contextId: ContextId<T>): T | undefined;
@@ -2876,7 +2909,8 @@ export declare interface Signal<T = any> extends ReadonlySignal<T> {
2876
2909
  }
2877
2910
 
2878
2911
  declare const enum SignalFlags {
2879
- INVALID = 1
2912
+ INVALID = 1,
2913
+ RUN_EFFECTS = 2
2880
2914
  }
2881
2915
 
2882
2916
  declare class SignalImpl<T = any> implements Signal<T> {
@@ -2885,6 +2919,11 @@ declare class SignalImpl<T = any> implements Signal<T> {
2885
2919
  $effects$: null | Set<EffectSubscription>;
2886
2920
  $container$: Container | null;
2887
2921
  constructor(container: Container | null, value: T);
2922
+ /**
2923
+ * Use this to force running subscribers, for example when the calculated value has mutated but
2924
+ * remained the same object
2925
+ */
2926
+ force(): void;
2888
2927
  get untrackedValue(): T;
2889
2928
  set untrackedValue(value: T);
2890
2929
  get value(): T;
@@ -3214,6 +3253,8 @@ declare interface SSRContainer extends Container {
3214
3253
  render(jsx: JSXOutput): Promise<void>;
3215
3254
  emitPreloaderPre(): void;
3216
3255
  emitQwikLoaderAtTopIfNeeded(): void;
3256
+ emitPatchDataIfNeeded(): void;
3257
+ addBackpatchEntry(ssrNodeId: string, attrName: string, serializedValue: string | boolean | null): void;
3217
3258
  }
3218
3259
 
3219
3260
  /** @public */
@@ -3229,6 +3270,10 @@ declare type SsrNode = {
3229
3270
  [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
3230
3271
  };
3231
3272
 
3273
+ declare const enum SsrNodeFlags {
3274
+ Updatable = 1
3275
+ }
3276
+
3232
3277
  /** @public */
3233
3278
  export declare const SSRRaw: FunctionComponent<{
3234
3279
  data: string;
@@ -3243,13 +3288,18 @@ export declare const SSRStreamBlock: FunctionComponent<{
3243
3288
  }>;
3244
3289
 
3245
3290
  /** @public */
3246
- export declare type SSRStreamChildren = AsyncGenerator<JSXChildren, void, any> | ((stream: StreamWriter) => Promise<void>) | (() => AsyncGenerator<JSXChildren, void, any>);
3291
+ export declare type SSRStreamChildren = AsyncGenerator<JSXChildren, void, any> | ((stream: SSRStreamWriter) => Promise<void>) | (() => AsyncGenerator<JSXChildren, void, any>);
3247
3292
 
3248
3293
  /** @public */
3249
3294
  export declare type SSRStreamProps = {
3250
3295
  children: SSRStreamChildren;
3251
3296
  };
3252
3297
 
3298
+ /** @public */
3299
+ export declare interface SSRStreamWriter {
3300
+ write(chunk: JSXOutput): void;
3301
+ }
3302
+
3253
3303
  declare type StopPropagation = {
3254
3304
  [K in keyof HTMLElementEventMap as `stoppropagation:${K}`]?: boolean;
3255
3305
  };
@@ -3266,6 +3316,7 @@ declare class StoreHandler implements ProxyHandler<StoreTarget> {
3266
3316
  $effects$: null | Map<string | symbol, Set<EffectSubscription>>;
3267
3317
  constructor($flags$: StoreFlags, $container$: Container | null);
3268
3318
  toString(): string;
3319
+ force(prop: keyof StoreTarget): void;
3269
3320
  get(target: StoreTarget, prop: string | symbol): any;
3270
3321
  /** In the case of oldValue and value are the same, the effects are not triggered. */
3271
3322
  set(target: StoreTarget, prop: string | symbol, value: any): boolean;
@@ -4352,7 +4403,7 @@ export declare const _VAR_PROPS: unique symbol;
4352
4403
  export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
4353
4404
 
4354
4405
  /**
4355
- * 2.0.0-beta.8-dev+434cd18
4406
+ * 2.0.0-beta.9-dev+6b582c7
4356
4407
  *
4357
4408
  * @public
4358
4409
  */
@@ -4481,10 +4532,10 @@ export declare const enum _VNodeFlags {
4481
4532
  Element = 1,
4482
4533
  Virtual = 2,
4483
4534
  ELEMENT_OR_VIRTUAL_MASK = 3,
4535
+ Text = 4,
4484
4536
  ELEMENT_OR_TEXT_MASK = 5,
4485
4537
  TYPE_MASK = 7,
4486
4538
  INFLATED_TYPE_MASK = 15,
4487
- Text = 4,
4488
4539
  Inflated = 8,
4489
4540
  Resolved = 16,
4490
4541
  Deleted = 32,
@@ -4530,7 +4581,7 @@ export declare function _walkJSX(ssr: SSRContainer, value: JSXOutput, options: {
4530
4581
  export declare function withLocale<T>(locale: string, fn: () => T): T;
4531
4582
 
4532
4583
  declare const enum WrappedSignalFlags {
4533
- UNWRAP = 2
4584
+ UNWRAP = 4
4534
4585
  }
4535
4586
 
4536
4587
  declare class WrappedSignalImpl<T> extends SignalImpl<T> implements BackRef {
@@ -4539,7 +4590,6 @@ declare class WrappedSignalImpl<T> extends SignalImpl<T> implements BackRef {
4539
4590
  $funcStr$: string | null;
4540
4591
  $flags$: AllSignalFlags;
4541
4592
  $hostElement$: HostElement | null;
4542
- $forceRunEffects$: boolean;
4543
4593
  [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
4544
4594
  constructor(container: Container | null, fn: (...args: any[]) => T, args: any[], fnStr: string | null, flags?: SignalFlags);
4545
4595
  invalidate(): void;
@@ -4549,7 +4599,7 @@ declare class WrappedSignalImpl<T> extends SignalImpl<T> implements BackRef {
4549
4599
  */
4550
4600
  force(): void;
4551
4601
  get untrackedValue(): T;
4552
- $computeIfNeeded$(): boolean;
4602
+ $computeIfNeeded$(): void;
4553
4603
  set value(_: any);
4554
4604
  get value(): any;
4555
4605
  }