@xaendar/core 0.9.23 → 0.9.24

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.
@@ -2,11 +2,9 @@ import { AccessorDecorator } from '@xaendar/types';
2
2
  import { Beautify } from '@xaendar/types';
3
3
  import { ClassDecorator as ClassDecorator_2 } from '@xaendar/types';
4
4
  import { Constructor } from '@xaendar/types';
5
- import { EffectOptions } from '@xaendar/signals';
6
5
  import { Function as Function_2 } from '@xaendar/types';
7
6
  import { NoArgsFunction } from '@xaendar/types';
8
7
  import { NoArgsVoidFunction } from '@xaendar/types';
9
- import { NoArgsVoidFunction as NoArgsVoidFunction_2 } from '@xaendar/types';
10
8
  import { RequireOne } from '@xaendar/types';
11
9
  import { SignalOptions } from '@xaendar/signals';
12
10
  import { VoidFunction as VoidFunction_2 } from '@xaendar/types';
@@ -105,19 +103,6 @@ export declare type Computed<Value = any> = Signal.Computed<Value> & {
105
103
  (): Value;
106
104
  };
107
105
 
108
- /**
109
- * Creates a read-only computed signal whose value is derived from other signals.
110
- *
111
- * Returns a callable getter that reads the current value, augmented with the
112
- * underlying {@link Signal.State} API.
113
- *
114
- * @template Value - The type of the computed value. Defaults to `any`.
115
- * @param value - The initial (seed) value of the computed signal.
116
- * @param options - Configuration options for the underlying signal.
117
- * @returns A {@link Computed} instance.
118
- */
119
- export declare function computed<Value = any>(value: Value, options?: SignalOptions<Value>): Computed<Value>;
120
-
121
106
  /**
122
107
  * Tracks identifier scope during run time template function execution
123
108
  * Each `Context` instance represents one lexical scope (e.g. a `@for` loop body)
@@ -275,43 +260,6 @@ export declare function createMATHMLElement(tagName: string): MathMLElement;
275
260
  */
276
261
  export declare function createSVGElement(tagName: string): SVGElement;
277
262
 
278
- /**
279
- * Runs a side-effectful function and automatically re-runs it whenever any
280
- * Signal read during its execution changes.
281
- *
282
- * Internally, `effect` wraps the user callback inside a `Computed` node
283
- * (for dependency tracking) and observes it with a `Watcher` (for push
284
- * notifications). When any tracked dependency changes, the `Watcher`
285
- * schedules a microtask that re-evaluates the `Computed`, which in turn
286
- * re-runs the user callback and re-registers the new set of dependencies.
287
- *
288
- * The returned disposer function stops the effect: it unwatches the internal
289
- * `Computed` from the `Watcher`, severing all dependency subscriptions so
290
- * the callback is never called again and the graph nodes can be
291
- * garbage-collected.
292
- *
293
- * @example
294
- * ```ts
295
- * const count = new State(0);
296
- *
297
- * const stop = effect(() => {
298
- * console.log('count is', count.get());
299
- * });
300
- * // logs: "count is 0"
301
- *
302
- * count.set(1); // logs: "count is 1"
303
- * count.set(2); // logs: "count is 2"
304
- *
305
- * stop(); // no more logs
306
- * count.set(3); // silent
307
- * ```
308
- *
309
- * @param fn - The side-effectful function to run. Any Signal read inside it
310
- * is tracked as a dependency.
311
- * @returns A disposer function that, when called, permanently stops the effect.
312
- */
313
- export declare function effect(fn: NoArgsVoidFunction_2, options?: EffectOptions): NoArgsVoidFunction_2;
314
-
315
263
  /**
316
264
  * Decorator that declares a custom event output on a web component.
317
265
  *
@@ -386,23 +334,6 @@ declare type ForKey = string | number;
386
334
  */
387
335
  export declare function _if(parentNode: HTMLElement, parentContext: Context, blocks: Block[]): void;
388
336
 
389
- /**
390
- * Creates an `InputSignal` — a specialized reactive state designed for use
391
- * as a property signal in web components.
392
- *
393
- * Unlike a plain `Signal.State`, the `set` method of an `InputSignal` is
394
- * restricted to internal callers (identified by the private symbol) and
395
- * accepts an optional `transform` function that converts incoming values
396
- * (e.g. raw HTML attribute strings) into the internally stored type before
397
- * updating the signal.
398
- *
399
- * @param value - The initial value of the signal.
400
- * @param options - Optional configuration including an equality function,
401
- * lifecycle hooks, and a `transform` function applied to incoming values.
402
- * @returns A new `InputSignal` instance.
403
- */
404
- export declare function input<ActualValue = unknown, IncomingValue = ActualValue>(value?: ActualValue, options?: InputSignalOptions<ActualValue, IncomingValue>): InputSignal<ActualValue, IncomingValue>;
405
-
406
337
  /**
407
338
  * A reactive value sourced from outside the component (e.g. an attribute).
408
339
  *
@@ -651,20 +582,6 @@ export declare function _renderLiteralText(parentNode: HTMLElement, context: Con
651
582
  */
652
583
  export declare function _renderText(parentNode: HTMLElement, context: Context, textFn: NoArgsFunction<string>): void;
653
584
 
654
- /**
655
- * Creates a writable reactive signal.
656
- *
657
- * Returns a callable getter that reads the current value, augmented with the
658
- * underlying {@link Signal.State} API and an `update` method to derive the next
659
- * value from the previous one.
660
- *
661
- * @template T - The type of the stored value. Defaults to `any`.
662
- * @param value - The initial value of the signal.
663
- * @param options - Configuration options for the signal.
664
- * @returns A {@link SignalType} instance.
665
- */
666
- export declare function signal<T = any>(value: T, options?: SignalOptions<T>): Signal_2<T>;
667
-
668
585
  /**
669
586
  * A writable reactive value.
670
587
  *
@@ -717,13 +634,6 @@ export declare function _switch(parentNode: HTMLElement, parentContext: Context,
717
634
  block: Function_2<[HTMLElement, Context, Node | null], Context>;
718
635
  }>): void;
719
636
 
720
- /**
721
- * Executes a function without tracking any dependencies.
722
- * @param fn - The function to execute without tracking.
723
- * @returns The result of the function execution.
724
- */
725
- export declare const untracked: typeof Signal.subtle.untrack;
726
-
727
637
  /**
728
638
  * Decorator that registers a class as a custom web component.
729
639
  *
@@ -1,4 +1,4 @@
1
- import { a as input, i as computed, n as signal, o as INPUT_SIGNAL_SET_SYMBOL, r as effect, s as isInputSignal, t as untracked } from "./signals-CxEAdVoe.js";
1
+ import { a as input, n as signal, o as INPUT_SIGNAL_SET_SYMBOL, r as effect, s as isInputSignal, t as untracked } from "./signals-CxEAdVoe.js";
2
2
  //#region ../packages/core/src/decorators/event.decorator.ts
3
3
  function isEventOptions(value) {
4
4
  return !!value && typeof value === "object" && ("bubbles" in value || "cancelable" in value || "composed" in value);
@@ -847,4 +847,4 @@ function _switch(parentNode, parentContext, expression, blocks) {
847
847
  })));
848
848
  }
849
849
  //#endregion
850
- export { BaseWebComponent, Context, Event, Property, WebComponent, _for, _if, _iterationVariables, _renderElement, _renderLiteralText, _renderText, _switch, computed, createAnchor, createElement, createMATHMLElement, createSVGElement, effect, input, mountNode, signal, untracked };
850
+ export { BaseWebComponent, Context, Event, Property, WebComponent, _for, _if, _iterationVariables, _renderElement, _renderLiteralText, _renderText, _switch, createAnchor, createElement, createMATHMLElement, createSVGElement, mountNode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaendar/core",
3
- "version": "0.9.23",
3
+ "version": "0.9.24",
4
4
  "description": "A library containing core utils such as webcomponent base classes and theming support",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  "default": "./dist/xaendar-core.js"
15
15
  }
16
16
  },
17
- "signals": {
17
+ "./signals": {
18
18
  "import": {
19
19
  "types": "./dist/signals.d.ts",
20
20
  "default": "./dist/signals.js"
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@xaendar/signals": "0.9.23",
26
- "@xaendar/types": "0.9.23"
25
+ "@xaendar/signals": "0.9.24",
26
+ "@xaendar/types": "0.9.24"
27
27
  }
28
28
  }