@tempots/dom 14.0.0 → 16.0.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/index.cjs +1 -1
- package/index.d.ts +26 -33
- package/index.js +509 -630
- package/package.json +1 -1
- package/mountable/appearance.d.ts +0 -37
- package/mountable/autofocus.d.ts +0 -3
- package/mountable/autoselect.d.ts +0 -3
- package/mountable/hidden-when-empty.d.ts +0 -3
- package/mountable/html-title.d.ts +0 -3
- package/mountable/inviewport.d.ts +0 -6
- package/mountable/size.d.ts +0 -8
- /package/{mountable → renderable}/async.d.ts +0 -0
- /package/{mountable → renderable}/attribute.d.ts +0 -0
- /package/{mountable → renderable}/bind.d.ts +0 -0
- /package/{mountable → renderable}/conjunction.d.ts +0 -0
- /package/{mountable → renderable}/consumers.d.ts +0 -0
- /package/{mountable → renderable}/domel.d.ts +0 -0
- /package/{mountable → renderable}/element.d.ts +0 -0
- /package/{mountable → renderable}/empty.d.ts +0 -0
- /package/{mountable → renderable}/ensure.d.ts +0 -0
- /package/{mountable → renderable}/foreach.d.ts +0 -0
- /package/{mountable → renderable}/fragment.d.ts +0 -0
- /package/{mountable → renderable}/handler.d.ts +0 -0
- /package/{mountable → renderable}/map-signal.d.ts +0 -0
- /package/{mountable → renderable}/not-empty.d.ts +0 -0
- /package/{mountable → renderable}/onctx.d.ts +0 -0
- /package/{mountable → renderable}/oneof.d.ts +0 -0
- /package/{mountable → renderable}/onmount.d.ts +0 -0
- /package/{mountable → renderable}/onunmount.d.ts +0 -0
- /package/{mountable → renderable}/portal.d.ts +0 -0
- /package/{mountable → renderable}/providers.d.ts +0 -0
- /package/{mountable → renderable}/render.d.ts +0 -0
- /package/{mountable → renderable}/repeat.d.ts +0 -0
- /package/{mountable → renderable}/style.d.ts +0 -0
- /package/{mountable → renderable}/task.d.ts +0 -0
- /package/{mountable → renderable}/text.d.ts +0 -0
- /package/{mountable → renderable}/when.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Signal } from '../std/signal';
|
|
2
|
-
import { TNode } from '../types/domain';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Defines the possible appearance types for the application.
|
|
6
|
-
* @type AppearanceType
|
|
7
|
-
*/
|
|
8
|
-
export type AppearanceType = 'light' | 'dark';
|
|
9
|
-
/**
|
|
10
|
-
* A provider mark for a signal representing the current appearance type.
|
|
11
|
-
*/
|
|
12
|
-
export declare const appearanceMarker: import('../types/domain').ProviderMark<Signal<AppearanceType>>;
|
|
13
|
-
/**
|
|
14
|
-
* Provides and consumes an appearance state signal that tracks the user's preferred color scheme.
|
|
15
|
-
*/
|
|
16
|
-
export declare const appearance: {
|
|
17
|
-
/**
|
|
18
|
-
* Provides a child component with an appearance context, which can be used to
|
|
19
|
-
* determine the current appearance (light or dark) based on the user's system
|
|
20
|
-
* preferences.
|
|
21
|
-
*
|
|
22
|
-
* The appearance context is updated whenever the user's system preferences
|
|
23
|
-
* change, and the component is cleaned up when it is no longer needed.
|
|
24
|
-
*
|
|
25
|
-
* @param child - The child component to be provided with the appearance context.
|
|
26
|
-
* @returns The child component with the appearance context.
|
|
27
|
-
*/
|
|
28
|
-
provide: (child: TNode) => TNode;
|
|
29
|
-
/**
|
|
30
|
-
* Makes the AppearanceType available to the child component by consuming the signal provided by the parent.
|
|
31
|
-
* The result of the function is returned as the final output.
|
|
32
|
-
*
|
|
33
|
-
* @param fn - A function that accepts the `AppearanceType` signal and returns a `TNode` element.
|
|
34
|
-
* @returns The `TNode` element returned by the provided function.
|
|
35
|
-
*/
|
|
36
|
-
consume: (fn: (appearance: Signal<AppearanceType>) => TNode) => TNode;
|
|
37
|
-
};
|
package/mountable/autofocus.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Signal } from '../std/signal';
|
|
2
|
-
import { TNode, Renderable } from '../types/domain';
|
|
3
|
-
|
|
4
|
-
export type InViewportMode = 'partial' | 'full';
|
|
5
|
-
export declare function InViewport(mode: InViewportMode, fn: (value: Signal<boolean>) => TNode): Renderable;
|
|
6
|
-
export declare const WhenInViewport: (mode: InViewportMode, then: TNode, otherwise?: TNode) => Renderable;
|
package/mountable/size.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DOMContext } from '../dom/dom-context';
|
|
2
|
-
import { Signal } from '../std/signal';
|
|
3
|
-
import { TNode, Size } from '../types/domain';
|
|
4
|
-
|
|
5
|
-
export declare const size: {
|
|
6
|
-
element: (fn: (size: Signal<Size>) => TNode) => (ctx: DOMContext) => (removeTree: boolean) => void;
|
|
7
|
-
window: (fn: (size: Signal<Size>) => TNode) => (ctx: DOMContext) => (removeTree: boolean) => void;
|
|
8
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|