keits 0.0.1 → 0.0.3
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/dev/index.js +548 -430
- package/dist/dev/router.js +443 -0
- package/dist/dev/shared/element-C4DfKtZW.js +255 -0
- package/dist/dev/shared/graph-D6-x_CWC.js +324 -0
- package/dist/dev/shared/owner-DlUsXKXE.js +122 -0
- package/dist/dev/svg.js +70 -0
- package/dist/prod/index.js +359 -377
- package/dist/prod/router.js +343 -0
- package/dist/prod/shared/element-DUtXb3px.js +187 -0
- package/dist/prod/shared/graph-C_aA46c6.js +240 -0
- package/dist/prod/shared/owner-DgJNPM0P.js +104 -0
- package/dist/prod/svg.js +8 -0
- package/dist/types/async/index.d.ts +2 -0
- package/dist/types/async/lazy.d.ts +7 -0
- package/dist/types/async/resource.d.ts +23 -0
- package/dist/types/async/suspense-context.d.ts +4 -0
- package/dist/types/core/graph.d.ts +8 -0
- package/dist/types/dom/element.d.ts +3 -0
- package/dist/types/dom/events.d.ts +1 -0
- package/dist/types/dom/hooks.d.ts +8 -0
- package/dist/types/dom/index.d.ts +6 -0
- package/dist/types/dom/insert.d.ts +2 -0
- package/dist/types/dom/mount.d.ts +2 -0
- package/dist/types/dom/namespaces.d.ts +1 -0
- package/dist/types/dom/props.d.ts +3 -0
- package/dist/types/dom/render-effect.d.ts +1 -0
- package/dist/types/dom/tags.d.ts +112 -0
- package/dist/types/dom/types.d.ts +43 -0
- package/dist/types/dom/unsafe.d.ts +1 -0
- package/dist/types/flow/catch.d.ts +2 -0
- package/dist/types/flow/dynamic.d.ts +6 -0
- package/dist/types/flow/for.d.ts +7 -0
- package/dist/types/flow/if.d.ts +4 -0
- package/dist/types/flow/index.d.ts +8 -0
- package/dist/types/flow/portal.d.ts +2 -0
- package/dist/types/flow/range.d.ts +11 -0
- package/dist/types/flow/show.d.ts +1 -0
- package/dist/types/flow/suspense.d.ts +2 -0
- package/dist/types/flow/switch.d.ts +9 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/router/history.d.ts +21 -0
- package/dist/types/router/index.d.ts +3 -0
- package/dist/types/router/links.d.ts +1 -0
- package/dist/types/router/match.d.ts +15 -0
- package/dist/types/router/router.d.ts +10 -0
- package/dist/types/router/scroll.d.ts +5 -0
- package/dist/types/router/types.d.ts +87 -0
- package/dist/types/svg/element.d.ts +2 -0
- package/dist/types/svg/index.d.ts +3 -0
- package/dist/types/svg/tags.d.ts +63 -0
- package/dist/types/svg/types.d.ts +13 -0
- package/package.json +31 -6
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { $for, type ForOptions } from "./for";
|
|
2
|
+
export { $if, type Truthy } from "./if";
|
|
3
|
+
export { $show } from "./show";
|
|
4
|
+
export { $switch, type PartialSwitchCases, type SwitchCases } from "./switch";
|
|
5
|
+
export { $dynamic, type Component } from "./dynamic";
|
|
6
|
+
export { $catch } from "./catch";
|
|
7
|
+
export { $portal } from "./portal";
|
|
8
|
+
export { $suspense } from "./suspense";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Child } from "../dom/types";
|
|
2
|
+
export interface Row {
|
|
3
|
+
item: unknown;
|
|
4
|
+
index: ((next: number) => void) | null;
|
|
5
|
+
dispose: () => void;
|
|
6
|
+
first: Node;
|
|
7
|
+
last: Node;
|
|
8
|
+
}
|
|
9
|
+
export declare function createRow(build: () => Child, item: unknown): Row;
|
|
10
|
+
export declare function moveRow(parent: Node, row: Row, anchor: Node | null): void;
|
|
11
|
+
export declare function removeRow(row: Row): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function $show<E extends HTMLElement | SVGElement>(when: () => unknown, element: E): E;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Child } from "../dom/types";
|
|
2
|
+
export type SwitchCases<V extends PropertyKey> = {
|
|
3
|
+
readonly [K in V]: () => Child;
|
|
4
|
+
};
|
|
5
|
+
export type PartialSwitchCases<V extends PropertyKey> = {
|
|
6
|
+
readonly [K in V]?: () => Child;
|
|
7
|
+
};
|
|
8
|
+
export declare function $switch<V extends PropertyKey>(value: () => V, cases: SwitchCases<NoInfer<V>>): Child;
|
|
9
|
+
export declare function $switch<V extends PropertyKey>(value: () => V, cases: PartialSwitchCases<NoInfer<V>>, fallback: () => Child): Child;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,3 +7,6 @@ export { isServer } from "./core/env";
|
|
|
7
7
|
export { catchError, createRoot, getOwner, onCleanup, onMount, renderStatic, runWithOwner, type Owner } from "./core/owner";
|
|
8
8
|
export { createContext, provide, useContext, type Context, type ContextOptions } from "./core/context";
|
|
9
9
|
export { reconcile, store, unwrap, type ReconcileOptions, type SetStore, type Store, type StoreOptions } from "./core/store";
|
|
10
|
+
export * from "./dom/index";
|
|
11
|
+
export * from "./flow/index";
|
|
12
|
+
export * from "./async/index";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface HistoryLocation {
|
|
2
|
+
path: string;
|
|
3
|
+
search: string;
|
|
4
|
+
hash: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RouterHistory {
|
|
7
|
+
read(): HistoryLocation;
|
|
8
|
+
push(url: string): void;
|
|
9
|
+
replace(url: string): void;
|
|
10
|
+
listen(callback: () => void): () => void;
|
|
11
|
+
href(url: string): string;
|
|
12
|
+
toAppUrl(url: URL): string | null;
|
|
13
|
+
key(): string;
|
|
14
|
+
}
|
|
15
|
+
export declare function browserHistory(base?: string): RouterHistory;
|
|
16
|
+
export declare function hashHistory(): RouterHistory;
|
|
17
|
+
export declare function memoryHistory(initial?: string): RouterHistory & {
|
|
18
|
+
back(): void;
|
|
19
|
+
forward(): void;
|
|
20
|
+
};
|
|
21
|
+
export declare function splitUrl(url: string): HistoryLocation;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createRouter, type RouterConfig } from "./router";
|
|
2
|
+
export { browserHistory, hashHistory, memoryHistory, type HistoryLocation, type RouterHistory } from "./history";
|
|
3
|
+
export type { GuardResult, LayoutProps, LinkOptions, NavigateOptions, NavigationTarget, ParamNames, Params, QueryOf, QuerySchema, QuerySpec, QueryValues, RouteDef, RouteMatch, RoutePath, Router } from "./types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function linkTarget(event: MouseEvent, toAppUrl: (url: URL) => string | null): string | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { QuerySchema, RouteDef, RouteMatch } from "./types";
|
|
2
|
+
export interface Branch {
|
|
3
|
+
path: string;
|
|
4
|
+
routes: readonly RouteDef[];
|
|
5
|
+
pattern: RegExp;
|
|
6
|
+
keys: string[];
|
|
7
|
+
score: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function joinPath(parent: string, path: string): string;
|
|
10
|
+
export declare function compileRoutes(routes: readonly RouteDef[]): Branch[];
|
|
11
|
+
export declare function matchPath(branches: readonly Branch[], pathname: string): RouteMatch | null;
|
|
12
|
+
export declare function branchSchema(match: RouteMatch | null): QuerySchema;
|
|
13
|
+
export declare function parseQuery(schema: QuerySchema, search: string): Record<string, string | number | boolean>;
|
|
14
|
+
export declare function buildSearch(values: Readonly<Record<string, string | number | boolean | undefined>>): string;
|
|
15
|
+
export declare function fillParams(path: string, params: Readonly<Record<string, string | number>> | undefined): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RouterHistory } from "./history";
|
|
2
|
+
import type { RouteDef, Router } from "./types";
|
|
3
|
+
export interface RouterConfig<Routes extends readonly RouteDef[]> {
|
|
4
|
+
routes: Routes;
|
|
5
|
+
history?: "browser" | "hash" | RouterHistory;
|
|
6
|
+
base?: string;
|
|
7
|
+
links?: boolean;
|
|
8
|
+
scroll?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function createRouter<const Routes extends readonly RouteDef[]>(config: RouterConfig<Routes>): Router<Routes>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { Child } from "../dom/types";
|
|
2
|
+
import type { Accessor } from "../core/types";
|
|
3
|
+
export type QuerySpec = "string" | "number" | "boolean" | readonly string[];
|
|
4
|
+
export type QuerySchema = Readonly<Record<string, QuerySpec>>;
|
|
5
|
+
export type QueryValues<S> = {
|
|
6
|
+
-readonly [K in keyof S]?: S[K] extends "number" ? number : S[K] extends "boolean" ? boolean : S[K] extends readonly (infer V)[] ? V : string;
|
|
7
|
+
};
|
|
8
|
+
export interface NavigationTarget {
|
|
9
|
+
path: string;
|
|
10
|
+
route: string | null;
|
|
11
|
+
params: Readonly<Record<string, string>>;
|
|
12
|
+
search: string;
|
|
13
|
+
from: string | null;
|
|
14
|
+
}
|
|
15
|
+
export type GuardResult = boolean | string;
|
|
16
|
+
export interface LayoutProps {
|
|
17
|
+
children: Child;
|
|
18
|
+
}
|
|
19
|
+
export interface RouteDef {
|
|
20
|
+
readonly path: string;
|
|
21
|
+
readonly component?: () => Child;
|
|
22
|
+
readonly layout?: (props: LayoutProps) => Child;
|
|
23
|
+
readonly children?: readonly RouteDef[];
|
|
24
|
+
readonly query?: QuerySchema;
|
|
25
|
+
readonly guard?: (to: NavigationTarget) => GuardResult | PromiseLike<GuardResult>;
|
|
26
|
+
}
|
|
27
|
+
type Join<Parent extends string, Path extends string> = Path extends `/${string}` ? Path : Path extends "" ? Parent extends "" ? "/" : Parent : Parent extends "" | "/" ? `/${Path}` : `${Parent}/${Path}`;
|
|
28
|
+
type OwnQuery<D> = D extends {
|
|
29
|
+
readonly query: infer Q;
|
|
30
|
+
} ? Q : {};
|
|
31
|
+
export type RouteEntries<Routes, Parent extends string = "", ParentQuery = {}> = Routes extends readonly (infer D)[] ? D extends {
|
|
32
|
+
readonly path: infer P extends string;
|
|
33
|
+
} ? {
|
|
34
|
+
path: Join<Parent, P>;
|
|
35
|
+
query: ParentQuery & OwnQuery<D>;
|
|
36
|
+
} | (D extends {
|
|
37
|
+
readonly children: infer C;
|
|
38
|
+
} ? RouteEntries<C, Join<Parent, P>, ParentQuery & OwnQuery<D>> : never) : never : never;
|
|
39
|
+
export type RoutePath<Routes> = Exclude<RouteEntries<Routes>["path"], `${string}*${string}`>;
|
|
40
|
+
export type ParamNames<P extends string> = P extends `${string}:${infer Name}/${infer Rest}` ? Name | ParamNames<`/${Rest}`> : P extends `${string}:${infer Name}` ? Name : never;
|
|
41
|
+
export type Params<P extends string> = {
|
|
42
|
+
[K in ParamNames<P>]: string;
|
|
43
|
+
};
|
|
44
|
+
export type QueryOf<Routes, P extends string> = QueryValues<Extract<RouteEntries<Routes>, {
|
|
45
|
+
path: P;
|
|
46
|
+
}>["query"]>;
|
|
47
|
+
export type LinkOptions<Routes, P extends string> = {
|
|
48
|
+
query?: QueryOf<Routes, P>;
|
|
49
|
+
hash?: string;
|
|
50
|
+
} & ([ParamNames<P>] extends [never] ? {
|
|
51
|
+
params?: undefined;
|
|
52
|
+
} : {
|
|
53
|
+
params: {
|
|
54
|
+
[K in ParamNames<P>]: string | number;
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
export type PlainUrl<U extends string> = U extends `${string}/:${string}` ? never : U;
|
|
58
|
+
export interface NavigateOptions {
|
|
59
|
+
replace?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface RouteMatch {
|
|
62
|
+
path: string;
|
|
63
|
+
routes: readonly RouteDef[];
|
|
64
|
+
params: Readonly<Record<string, string>>;
|
|
65
|
+
}
|
|
66
|
+
export interface Router<Routes extends readonly RouteDef[]> {
|
|
67
|
+
location: Accessor<{
|
|
68
|
+
path: string;
|
|
69
|
+
search: string;
|
|
70
|
+
hash: string;
|
|
71
|
+
}>;
|
|
72
|
+
match: Accessor<RouteMatch | null>;
|
|
73
|
+
params: Accessor<Readonly<Record<string, string>>>;
|
|
74
|
+
query: Accessor<Readonly<Record<string, string | number | boolean>>>;
|
|
75
|
+
pending: Accessor<boolean>;
|
|
76
|
+
navigate<P extends RoutePath<Routes>>(path: P, ...options: [ParamNames<P>] extends [never] ? [(LinkOptions<Routes, P> & NavigateOptions)?] : [LinkOptions<Routes, P> & NavigateOptions]): Promise<boolean>;
|
|
77
|
+
navigate<U extends string>(url: PlainUrl<U>, options?: NavigateOptions): Promise<boolean>;
|
|
78
|
+
href<P extends RoutePath<Routes>>(path: P, ...options: [ParamNames<P>] extends [never] ? [LinkOptions<Routes, P>?] : [LinkOptions<Routes, P>]): string;
|
|
79
|
+
onLeave(check: (to: NavigationTarget) => boolean | PromiseLike<boolean>): void;
|
|
80
|
+
view(): Child;
|
|
81
|
+
setQuery(values: Readonly<Record<string, string | number | boolean | undefined>>, options?: {
|
|
82
|
+
push?: boolean;
|
|
83
|
+
}): void;
|
|
84
|
+
isActive(path: string, exact?: boolean): boolean;
|
|
85
|
+
dispose(): void;
|
|
86
|
+
}
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const $a: import("./types").SvgElementFactory<SVGAElement>;
|
|
2
|
+
export declare const $animate: import("./types").SvgElementFactory<SVGAnimateElement>;
|
|
3
|
+
export declare const $animateMotion: import("./types").SvgElementFactory<SVGAnimateMotionElement>;
|
|
4
|
+
export declare const $animateTransform: import("./types").SvgElementFactory<SVGAnimateTransformElement>;
|
|
5
|
+
export declare const $circle: import("./types").SvgElementFactory<SVGCircleElement>;
|
|
6
|
+
export declare const $clipPath: import("./types").SvgElementFactory<SVGClipPathElement>;
|
|
7
|
+
export declare const $defs: import("./types").SvgElementFactory<SVGDefsElement>;
|
|
8
|
+
export declare const $desc: import("./types").SvgElementFactory<SVGDescElement>;
|
|
9
|
+
export declare const $ellipse: import("./types").SvgElementFactory<SVGEllipseElement>;
|
|
10
|
+
export declare const $feBlend: import("./types").SvgElementFactory<SVGFEBlendElement>;
|
|
11
|
+
export declare const $feColorMatrix: import("./types").SvgElementFactory<SVGFEColorMatrixElement>;
|
|
12
|
+
export declare const $feComponentTransfer: import("./types").SvgElementFactory<SVGFEComponentTransferElement>;
|
|
13
|
+
export declare const $feComposite: import("./types").SvgElementFactory<SVGFECompositeElement>;
|
|
14
|
+
export declare const $feConvolveMatrix: import("./types").SvgElementFactory<SVGFEConvolveMatrixElement>;
|
|
15
|
+
export declare const $feDiffuseLighting: import("./types").SvgElementFactory<SVGFEDiffuseLightingElement>;
|
|
16
|
+
export declare const $feDisplacementMap: import("./types").SvgElementFactory<SVGFEDisplacementMapElement>;
|
|
17
|
+
export declare const $feDistantLight: import("./types").SvgElementFactory<SVGFEDistantLightElement>;
|
|
18
|
+
export declare const $feDropShadow: import("./types").SvgElementFactory<SVGFEDropShadowElement>;
|
|
19
|
+
export declare const $feFlood: import("./types").SvgElementFactory<SVGFEFloodElement>;
|
|
20
|
+
export declare const $feFuncA: import("./types").SvgElementFactory<SVGFEFuncAElement>;
|
|
21
|
+
export declare const $feFuncB: import("./types").SvgElementFactory<SVGFEFuncBElement>;
|
|
22
|
+
export declare const $feFuncG: import("./types").SvgElementFactory<SVGFEFuncGElement>;
|
|
23
|
+
export declare const $feFuncR: import("./types").SvgElementFactory<SVGFEFuncRElement>;
|
|
24
|
+
export declare const $feGaussianBlur: import("./types").SvgElementFactory<SVGFEGaussianBlurElement>;
|
|
25
|
+
export declare const $feImage: import("./types").SvgElementFactory<SVGFEImageElement>;
|
|
26
|
+
export declare const $feMerge: import("./types").SvgElementFactory<SVGFEMergeElement>;
|
|
27
|
+
export declare const $feMergeNode: import("./types").SvgElementFactory<SVGFEMergeNodeElement>;
|
|
28
|
+
export declare const $feMorphology: import("./types").SvgElementFactory<SVGFEMorphologyElement>;
|
|
29
|
+
export declare const $feOffset: import("./types").SvgElementFactory<SVGFEOffsetElement>;
|
|
30
|
+
export declare const $fePointLight: import("./types").SvgElementFactory<SVGFEPointLightElement>;
|
|
31
|
+
export declare const $feSpecularLighting: import("./types").SvgElementFactory<SVGFESpecularLightingElement>;
|
|
32
|
+
export declare const $feSpotLight: import("./types").SvgElementFactory<SVGFESpotLightElement>;
|
|
33
|
+
export declare const $feTile: import("./types").SvgElementFactory<SVGFETileElement>;
|
|
34
|
+
export declare const $feTurbulence: import("./types").SvgElementFactory<SVGFETurbulenceElement>;
|
|
35
|
+
export declare const $filter: import("./types").SvgElementFactory<SVGFilterElement>;
|
|
36
|
+
export declare const $foreignObject: import("./types").SvgElementFactory<SVGForeignObjectElement>;
|
|
37
|
+
export declare const $g: import("./types").SvgElementFactory<SVGGElement>;
|
|
38
|
+
export declare const $image: import("./types").SvgElementFactory<SVGImageElement>;
|
|
39
|
+
export declare const $line: import("./types").SvgElementFactory<SVGLineElement>;
|
|
40
|
+
export declare const $linearGradient: import("./types").SvgElementFactory<SVGLinearGradientElement>;
|
|
41
|
+
export declare const $marker: import("./types").SvgElementFactory<SVGMarkerElement>;
|
|
42
|
+
export declare const $mask: import("./types").SvgElementFactory<SVGMaskElement>;
|
|
43
|
+
export declare const $metadata: import("./types").SvgElementFactory<SVGMetadataElement>;
|
|
44
|
+
export declare const $mpath: import("./types").SvgElementFactory<SVGMPathElement>;
|
|
45
|
+
export declare const $path: import("./types").SvgElementFactory<SVGPathElement>;
|
|
46
|
+
export declare const $pattern: import("./types").SvgElementFactory<SVGPatternElement>;
|
|
47
|
+
export declare const $polygon: import("./types").SvgElementFactory<SVGPolygonElement>;
|
|
48
|
+
export declare const $polyline: import("./types").SvgElementFactory<SVGPolylineElement>;
|
|
49
|
+
export declare const $radialGradient: import("./types").SvgElementFactory<SVGRadialGradientElement>;
|
|
50
|
+
export declare const $rect: import("./types").SvgElementFactory<SVGRectElement>;
|
|
51
|
+
export declare const $script: import("./types").SvgElementFactory<SVGScriptElement>;
|
|
52
|
+
export declare const $set: import("./types").SvgElementFactory<SVGSetElement>;
|
|
53
|
+
export declare const $stop: import("./types").SvgElementFactory<SVGStopElement>;
|
|
54
|
+
export declare const $style: import("./types").SvgElementFactory<SVGStyleElement>;
|
|
55
|
+
export declare const $svg: import("./types").SvgElementFactory<SVGSVGElement>;
|
|
56
|
+
export declare const $switch: import("./types").SvgElementFactory<SVGSwitchElement>;
|
|
57
|
+
export declare const $symbol: import("./types").SvgElementFactory<SVGSymbolElement>;
|
|
58
|
+
export declare const $text: import("./types").SvgElementFactory<SVGTextElement>;
|
|
59
|
+
export declare const $textPath: import("./types").SvgElementFactory<SVGTextPathElement>;
|
|
60
|
+
export declare const $title: import("./types").SvgElementFactory<SVGTitleElement>;
|
|
61
|
+
export declare const $tspan: import("./types").SvgElementFactory<SVGTSpanElement>;
|
|
62
|
+
export declare const $use: import("./types").SvgElementFactory<SVGUseElement>;
|
|
63
|
+
export declare const $view: import("./types").SvgElementFactory<SVGViewElement>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AttributeProps, AttributeValue, Child, ClassValue, EventProps, MaybeAccessor, StyleValue } from "../dom/types";
|
|
2
|
+
export type SvgAttributeName = "id" | "href" | "lang" | "tabindex" | "role" | "focusable" | "viewBox" | "preserveAspectRatio" | "xmlns" | "width" | "height" | "x" | "y" | "x1" | "y1" | "x2" | "y2" | "cx" | "cy" | "r" | "rx" | "ry" | "fx" | "fy" | "dx" | "dy" | "d" | "points" | "pathLength" | "transform" | "rotate" | "fill" | "fill-opacity" | "fill-rule" | "stroke" | "stroke-width" | "stroke-linecap" | "stroke-linejoin" | "stroke-dasharray" | "stroke-dashoffset" | "stroke-opacity" | "stroke-miterlimit" | "opacity" | "color" | "display" | "visibility" | "overflow" | "pointer-events" | "cursor" | "clip-path" | "clip-rule" | "clipPathUnits" | "mask" | "maskUnits" | "maskContentUnits" | "filter" | "filterUnits" | "primitiveUnits" | "vector-effect" | "shape-rendering" | "paint-order" | "marker-start" | "marker-mid" | "marker-end" | "markerWidth" | "markerHeight" | "markerUnits" | "orient" | "refX" | "refY" | "offset" | "stop-color" | "stop-opacity" | "gradientUnits" | "gradientTransform" | "spreadMethod" | "patternUnits" | "patternContentUnits" | "patternTransform" | "text-anchor" | "dominant-baseline" | "font-family" | "font-size" | "font-weight" | "textLength" | "lengthAdjust" | "in" | "in2" | "result" | "stdDeviation" | "mode" | "type" | "values" | "operator" | "attributeName" | "from" | "to" | "dur" | "begin" | "repeatCount" | "keyTimes" | "calcMode";
|
|
3
|
+
export type SvgProps<E extends SVGElement> = AttributeProps & EventProps<E> & {
|
|
4
|
+
[K in SvgAttributeName]?: MaybeAccessor<AttributeValue>;
|
|
5
|
+
} & {
|
|
6
|
+
class?: ClassValue | (() => ClassValue);
|
|
7
|
+
style?: StyleValue | (() => StyleValue);
|
|
8
|
+
ref?: (element: E) => void;
|
|
9
|
+
};
|
|
10
|
+
export interface SvgElementFactory<E extends SVGElement> {
|
|
11
|
+
(children: Child): E;
|
|
12
|
+
(props?: SvgProps<E> | null, children?: Child): E;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keits",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Fine-grained reactive TypeScript framework. Real DOM, no virtual DOM, zero dependencies.",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"reactive",
|
|
7
|
+
"signals",
|
|
8
|
+
"framework",
|
|
9
|
+
"typescript",
|
|
10
|
+
"fine-grained",
|
|
11
|
+
"no-vdom"
|
|
12
|
+
],
|
|
6
13
|
"author": "Michael Ranni",
|
|
7
14
|
"license": "MIT",
|
|
8
15
|
"type": "module",
|
|
9
16
|
"sideEffects": false,
|
|
10
|
-
"files": [
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
11
20
|
"types": "./dist/types/index.d.ts",
|
|
12
21
|
"exports": {
|
|
13
22
|
".": {
|
|
@@ -15,6 +24,18 @@
|
|
|
15
24
|
"types": "./dist/types/index.d.ts",
|
|
16
25
|
"development": "./dist/dev/index.js",
|
|
17
26
|
"default": "./dist/prod/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./svg": {
|
|
29
|
+
"@keits/source": "./src/svg/index.ts",
|
|
30
|
+
"types": "./dist/types/svg/index.d.ts",
|
|
31
|
+
"development": "./dist/dev/svg.js",
|
|
32
|
+
"default": "./dist/prod/svg.js"
|
|
33
|
+
},
|
|
34
|
+
"./router": {
|
|
35
|
+
"@keits/source": "./src/router/index.ts",
|
|
36
|
+
"types": "./dist/types/router/index.d.ts",
|
|
37
|
+
"development": "./dist/dev/router.js",
|
|
38
|
+
"default": "./dist/prod/router.js"
|
|
18
39
|
}
|
|
19
40
|
},
|
|
20
41
|
"scripts": {
|
|
@@ -23,7 +44,11 @@
|
|
|
23
44
|
"prepublishOnly": "cd ../.. && npm run check"
|
|
24
45
|
},
|
|
25
46
|
"size-budget": {
|
|
26
|
-
"dist/prod/index.js":
|
|
27
|
-
"size/basic.js": 1792
|
|
47
|
+
"dist/prod/index.js": 7168,
|
|
48
|
+
"size/basic.js": 1792,
|
|
49
|
+
"size/dom-basic.js": 3072,
|
|
50
|
+
"size/svg-icon.js": 3328,
|
|
51
|
+
"size/data-app.js": 5120,
|
|
52
|
+
"size/router-app.js": 6144
|
|
28
53
|
}
|
|
29
|
-
}
|
|
54
|
+
}
|