@qwik.dev/core 2.0.0-beta.14 → 2.0.0-beta.15

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwik.dev/core/backpatch",
3
- "version": "2.0.0-beta.14-dev+1e7496d",
3
+ "version": "2.0.0-beta.15-dev+920f1a4",
4
4
  "main": "index.mjs",
5
5
  "types": "index.d.ts",
6
6
  "private": true,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwik.dev/core/build",
3
- "version": "2.0.0-beta.14-dev+1e7496d",
3
+ "version": "2.0.0-beta.15-dev+920f1a4",
4
4
  "main": "index.mjs",
5
5
  "types": "index.d.ts",
6
6
  "private": true,
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/cli 2.0.0-beta.14-dev+1e7496d
3
+ * @qwik.dev/core/cli 2.0.0-beta.15-dev+920f1a4
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
@@ -5625,7 +5625,7 @@ async function printHelp(app) {
5625
5625
  await runCommand2(Object.assign(app, { task: args[0], args }));
5626
5626
  }
5627
5627
  function printVersion() {
5628
- console.log("2.0.0-beta.14-dev+1e7496d");
5628
+ console.log("2.0.0-beta.15-dev+920f1a4");
5629
5629
  }
5630
5630
  export {
5631
5631
  runCli,
@@ -383,13 +383,13 @@ export declare type AsyncComputedReturnType<T> = T extends Promise<infer T> ? As
383
383
  */
384
384
  declare class AsyncComputedSignalImpl<T> extends ComputedSignalImpl<T | undefined, AsyncComputeQRL<T>> implements BackRef {
385
385
  $untrackedLoading$: boolean;
386
- $untrackedError$: Error | null;
387
- $loadingEffects$: null | Set<EffectSubscription>;
388
- $errorEffects$: null | Set<EffectSubscription>;
386
+ $untrackedError$: Error | undefined;
387
+ $loadingEffects$: undefined | Set<EffectSubscription>;
388
+ $errorEffects$: undefined | Set<EffectSubscription>;
389
389
  $destroy$: NoSerialize<() => void> | null;
390
390
  $promiseValue$: T | typeof NEEDS_COMPUTATION;
391
391
  private $promise$;
392
- [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
392
+ [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | undefined;
393
393
  constructor(container: Container | null, fn: AsyncComputeQRL<T>, flags?: SignalFlags | SerializationSignalFlags);
394
394
  /**
395
395
  * Loading is true if the signal is still waiting for the promise to resolve, false if the promise
@@ -399,9 +399,9 @@ declare class AsyncComputedSignalImpl<T> extends ComputedSignalImpl<T | undefine
399
399
  set untrackedLoading(value: boolean);
400
400
  get untrackedLoading(): boolean;
401
401
  /** The error that occurred when the signal was resolved. */
402
- get error(): Error | null;
403
- set untrackedError(value: Error | null);
404
- get untrackedError(): Error | null;
402
+ get error(): Error | undefined;
403
+ set untrackedError(value: Error | undefined);
404
+ get untrackedError(): Error | undefined;
405
405
  invalidate(): void;
406
406
  promise(): Promise<T>;
407
407
  $computeIfNeeded$(): Promise<void> | undefined;
@@ -421,7 +421,7 @@ declare type Augmented<E, A = {}> = Prettify<Filtered<E, A> & A>;
421
421
 
422
422
  /** Class for back reference to the EffectSubscription */
423
423
  declare abstract class BackRef {
424
- [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
424
+ [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | undefined;
425
425
  }
426
426
 
427
427
  declare type BivariantQrlFn<ARGS extends any[], RETURN> = {
@@ -655,7 +655,7 @@ declare class ComputedSignalImpl<T, S extends QRLInternal = ComputeQRL<T>> exten
655
655
  */
656
656
  $computeQrl$: S;
657
657
  $flags$: SignalFlags | SerializationSignalFlags;
658
- [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
658
+ [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | undefined;
659
659
  constructor(container: Container | null, fn: S, flags?: SignalFlags | SerializationSignalFlags);
660
660
  invalidate(): void;
661
661
  /**
@@ -950,10 +950,10 @@ export declare const createComputedQrl: <T>(qrl: QRL<() => T>, options?: Compute
950
950
  */
951
951
  export declare const createContextId: <STATE = unknown>(name: string) => ContextId<STATE>;
952
952
 
953
- declare const createScheduler: (container: Container, journalFlush: () => void, choreQueue: ChoreArray, blockedChores: Set<Chore>, runningChores: Set<Chore>) => {
953
+ declare const createScheduler: (container: Container, journalFlush: () => void, choreQueue: ChoreArray, blockedChores: ChoreArray, runningChores: Set<Chore>) => {
954
954
  (type: ChoreType.QRL_RESOLVE, ignore: null, target: ComputeQRL<any> | AsyncComputeQRL<any>): Chore<ChoreType.QRL_RESOLVE>;
955
955
  (type: ChoreType.WAIT_FOR_QUEUE): Chore<ChoreType.WAIT_FOR_QUEUE>;
956
- (type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | null, target: Signal<unknown> | StoreTarget, effects: Set<EffectSubscription> | null): Chore<ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS>;
956
+ (type: ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS, host: HostElement | undefined, target: Signal<unknown> | StoreTarget, effects: Set<EffectSubscription> | undefined): Chore<ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS>;
957
957
  (type: ChoreType.TASK | ChoreType.VISIBLE, task: Task): Chore<ChoreType.TASK | ChoreType.VISIBLE>;
958
958
  (type: ChoreType.RUN_QRL, host: HostElement, target: QRLInternal<(...args: unknown[]) => unknown>, args: unknown[]): Chore<ChoreType.RUN_QRL>;
959
959
  (type: ChoreType.COMPONENT, host: HostElement, qrl: QRLInternal<OnRenderFn<unknown>>, props: Props | null): Chore<ChoreType.COMPONENT>;
@@ -1591,6 +1591,21 @@ export declare interface JSXNode<T extends string | FunctionComponent | unknown
1591
1591
  dev?: DevJSX;
1592
1592
  }
1593
1593
 
1594
+ declare class JSXNodeImpl<T = unknown> implements JSXNodeInternal<T> {
1595
+ type: T;
1596
+ toSort: boolean;
1597
+ key: string | null;
1598
+ varProps: Props;
1599
+ constProps: Props | null;
1600
+ children: JSXChildren;
1601
+ dev?: DevJSX & {
1602
+ stack: string | undefined;
1603
+ };
1604
+ _proxy: Props | null;
1605
+ constructor(type: T, varProps?: Props | null, constProps?: Props | null, children?: JSXChildren, key?: string | number | null, toSort?: boolean, dev?: DevJSX);
1606
+ get props(): T extends FunctionComponent<infer PROPS> ? PROPS : Props;
1607
+ }
1608
+
1594
1609
  /**
1595
1610
  * The internal representation of a JSX Node.
1596
1611
  *
@@ -1990,6 +2005,9 @@ export declare type PropFunction<T> = QRL<T>;
1990
2005
 
1991
2006
  declare type Props = Record<string, unknown>;
1992
2007
 
2008
+ /** @internal */
2009
+ declare const _PROPS_HANDLER: unique symbol;
2010
+
1993
2011
  /**
1994
2012
  * Infers `Props` from the component or tag.
1995
2013
  *
@@ -2013,7 +2031,21 @@ declare type PropsProxy = {
2013
2031
  [_VAR_PROPS]: Props;
2014
2032
  [_CONST_PROPS]: Props | null;
2015
2033
  [_OWNER]: JSXNodeInternal;
2016
- };
2034
+ [_PROPS_HANDLER]: PropsProxyHandler;
2035
+ } & Record<string | symbol, unknown>;
2036
+
2037
+ declare class PropsProxyHandler implements ProxyHandler<any> {
2038
+ owner: JSXNodeImpl;
2039
+ $effects$: undefined | Map<string | symbol, Set<EffectSubscription>>;
2040
+ $container$: Container | null;
2041
+ constructor(owner: JSXNodeImpl);
2042
+ get(_: any, prop: string | symbol): any;
2043
+ set(_: any, prop: string | symbol, value: any): boolean;
2044
+ deleteProperty(_: any, prop: string | symbol): boolean;
2045
+ has(_: any, prop: string | symbol): boolean;
2046
+ getOwnPropertyDescriptor(_: any, p: string | symbol): PropertyDescriptor | undefined;
2047
+ ownKeys(): string[];
2048
+ }
2017
2049
 
2018
2050
  declare type PropType<T extends object, P extends keyof T> = P extends keyof T ? T[P] : 'value' extends keyof T ? T['value'] : never;
2019
2051
 
@@ -2982,7 +3014,7 @@ declare const enum SignalFlags {
2982
3014
  declare class SignalImpl<T = any> implements Signal<T> {
2983
3015
  $untrackedValue$: T;
2984
3016
  /** Store a list of effects which are dependent on this signal. */
2985
- $effects$: null | Set<EffectSubscription>;
3017
+ $effects$: undefined | Set<EffectSubscription>;
2986
3018
  $container$: Container | null;
2987
3019
  $wrappedSignal$: WrappedSignalImpl<T> | null;
2988
3020
  constructor(container: Container | null, value: T);
@@ -4453,7 +4485,7 @@ export declare const _VAR_PROPS: unique symbol;
4453
4485
  export declare const _verifySerializable: <T>(value: T, preMessage?: string) => T;
4454
4486
 
4455
4487
  /**
4456
- * 2.0.0-beta.14-dev+1e7496d
4488
+ * 2.0.0-beta.15-dev+920f1a4
4457
4489
  *
4458
4490
  * @public
4459
4491
  */
@@ -4637,8 +4669,8 @@ declare class WrappedSignalImpl<T> extends SignalImpl<T> implements BackRef {
4637
4669
  $func$: (...args: any[]) => T;
4638
4670
  $funcStr$: string | null;
4639
4671
  $flags$: AllSignalFlags;
4640
- $hostElement$: HostElement | null;
4641
- [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | null;
4672
+ $hostElement$: HostElement | undefined;
4673
+ [_EFFECT_BACK_REF]: Map<EffectProperty | string, EffectSubscription> | undefined;
4642
4674
  constructor(container: Container | null, fn: (...args: any[]) => T, args: any[], fnStr: string | null, flags?: SignalFlags);
4643
4675
  invalidate(): void;
4644
4676
  /**