@niscorp/nova 0.1.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/ACTION_DOCS.md +552 -0
- package/ADAPTER.md +170 -0
- package/DESIGN.md +719 -0
- package/I18N_DOCS.md +224 -0
- package/LAYOUT_DOCS.md +505 -0
- package/LICENSE +202 -0
- package/REACT_DOCS.md +562 -0
- package/README.md +379 -0
- package/SHELL_DOCS.md +615 -0
- package/TERMINAL_DOCS.md +124 -0
- package/dist/adapters/dom/components/index.cjs +473 -0
- package/dist/adapters/dom/components/index.cjs.map +1 -0
- package/dist/adapters/dom/components/index.d.cts +48 -0
- package/dist/adapters/dom/components/index.d.ts +48 -0
- package/dist/adapters/dom/components/index.js +420 -0
- package/dist/adapters/dom/components/index.js.map +1 -0
- package/dist/adapters/dom/index.cjs +171 -0
- package/dist/adapters/dom/index.cjs.map +1 -0
- package/dist/adapters/dom/index.d.cts +29 -0
- package/dist/adapters/dom/index.d.ts +29 -0
- package/dist/adapters/dom/index.js +15 -0
- package/dist/adapters/dom/index.js.map +1 -0
- package/dist/adapters/dom/server.cjs +129 -0
- package/dist/adapters/dom/server.cjs.map +1 -0
- package/dist/adapters/dom/server.d.cts +15 -0
- package/dist/adapters/dom/server.d.ts +15 -0
- package/dist/adapters/dom/server.js +37 -0
- package/dist/adapters/dom/server.js.map +1 -0
- package/dist/adapters/ink/index.d.ts +75 -0
- package/dist/adapters/ink/index.js +472 -0
- package/dist/adapters/ink/index.js.map +1 -0
- package/dist/adapters/react/components/index.cjs +552 -0
- package/dist/adapters/react/components/index.cjs.map +1 -0
- package/dist/adapters/react/components/index.d.cts +30 -0
- package/dist/adapters/react/components/index.d.ts +30 -0
- package/dist/adapters/react/components/index.js +12 -0
- package/dist/adapters/react/components/index.js.map +1 -0
- package/dist/adapters/react/index.cjs +1526 -0
- package/dist/adapters/react/index.cjs.map +1 -0
- package/dist/adapters/react/index.d.cts +149 -0
- package/dist/adapters/react/index.d.ts +149 -0
- package/dist/adapters/react/index.js +12 -0
- package/dist/adapters/react/index.js.map +1 -0
- package/dist/adapters/tty/components/index.cjs +255 -0
- package/dist/adapters/tty/components/index.cjs.map +1 -0
- package/dist/adapters/tty/components/index.d.cts +40 -0
- package/dist/adapters/tty/components/index.d.ts +40 -0
- package/dist/adapters/tty/components/index.js +187 -0
- package/dist/adapters/tty/components/index.js.map +1 -0
- package/dist/adapters/tty/index.cjs +76 -0
- package/dist/adapters/tty/index.cjs.map +1 -0
- package/dist/adapters/tty/index.d.cts +47 -0
- package/dist/adapters/tty/index.d.ts +47 -0
- package/dist/adapters/tty/index.js +76 -0
- package/dist/adapters/tty/index.js.map +1 -0
- package/dist/adapters/vue/components/index.cjs +619 -0
- package/dist/adapters/vue/components/index.cjs.map +1 -0
- package/dist/adapters/vue/components/index.d.cts +224 -0
- package/dist/adapters/vue/components/index.d.ts +224 -0
- package/dist/adapters/vue/components/index.js +12 -0
- package/dist/adapters/vue/components/index.js.map +1 -0
- package/dist/adapters/vue/index.cjs +747 -0
- package/dist/adapters/vue/index.cjs.map +1 -0
- package/dist/adapters/vue/index.d.cts +98 -0
- package/dist/adapters/vue/index.d.ts +98 -0
- package/dist/adapters/vue/index.js +127 -0
- package/dist/adapters/vue/index.js.map +1 -0
- package/dist/agent/index.cjs +178 -0
- package/dist/agent/index.cjs.map +1 -0
- package/dist/agent/index.d.cts +28 -0
- package/dist/agent/index.d.ts +28 -0
- package/dist/agent/index.js +30 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/chunk-2MNLEL45.js +47 -0
- package/dist/chunk-2MNLEL45.js.map +1 -0
- package/dist/chunk-3HGE3VWK.js +753 -0
- package/dist/chunk-3HGE3VWK.js.map +1 -0
- package/dist/chunk-4ZID7UX5.js +549 -0
- package/dist/chunk-4ZID7UX5.js.map +1 -0
- package/dist/chunk-7B3RDENH.js +1982 -0
- package/dist/chunk-7B3RDENH.js.map +1 -0
- package/dist/chunk-7S5BNPUS.js +54 -0
- package/dist/chunk-7S5BNPUS.js.map +1 -0
- package/dist/chunk-7TS3YVQR.js +114 -0
- package/dist/chunk-7TS3YVQR.js.map +1 -0
- package/dist/chunk-EG2RUXJN.js +266 -0
- package/dist/chunk-EG2RUXJN.js.map +1 -0
- package/dist/chunk-GVBBL36G.js +429 -0
- package/dist/chunk-GVBBL36G.js.map +1 -0
- package/dist/chunk-I5D2R5UA.js +753 -0
- package/dist/chunk-I5D2R5UA.js.map +1 -0
- package/dist/chunk-IGLCWXQ3.js +304 -0
- package/dist/chunk-IGLCWXQ3.js.map +1 -0
- package/dist/chunk-JI7ZRESP.js +64 -0
- package/dist/chunk-JI7ZRESP.js.map +1 -0
- package/dist/chunk-L5223LLX.js +31 -0
- package/dist/chunk-L5223LLX.js.map +1 -0
- package/dist/chunk-LA3BSEMX.js +1905 -0
- package/dist/chunk-LA3BSEMX.js.map +1 -0
- package/dist/chunk-OAMC6R6E.js +121 -0
- package/dist/chunk-OAMC6R6E.js.map +1 -0
- package/dist/chunk-OGD5CCMZ.js +62 -0
- package/dist/chunk-OGD5CCMZ.js.map +1 -0
- package/dist/chunk-PF4OJTYU.js +199 -0
- package/dist/chunk-PF4OJTYU.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +9 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-RBU5PHN4.js +8 -0
- package/dist/chunk-RBU5PHN4.js.map +1 -0
- package/dist/chunk-RQB4PRPV.js +285 -0
- package/dist/chunk-RQB4PRPV.js.map +1 -0
- package/dist/chunk-V32EVEVM.js +464 -0
- package/dist/chunk-V32EVEVM.js.map +1 -0
- package/dist/chunk-ZITHBBF3.js +85 -0
- package/dist/chunk-ZITHBBF3.js.map +1 -0
- package/dist/devtools/index.cjs +1088 -0
- package/dist/devtools/index.cjs.map +1 -0
- package/dist/devtools/index.d.cts +33 -0
- package/dist/devtools/index.d.ts +33 -0
- package/dist/devtools/index.js +399 -0
- package/dist/devtools/index.js.map +1 -0
- package/dist/effects-CndX9K7D.d.cts +123 -0
- package/dist/effects-CndX9K7D.d.ts +123 -0
- package/dist/endpoints-CD-6Jl-H.d.ts +36 -0
- package/dist/endpoints-Dem-EdRx.d.cts +36 -0
- package/dist/i18n/index.cjs +299 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +28 -0
- package/dist/i18n/index.d.ts +28 -0
- package/dist/i18n/index.js +180 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index-CNfzSBe2.d.ts +93 -0
- package/dist/index-caZoXSwr.d.cts +93 -0
- package/dist/index.cjs +3723 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +144 -0
- package/dist/index.d.ts +144 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.cjs +635 -0
- package/dist/migrations/index.cjs.map +1 -0
- package/dist/migrations/index.d.cts +97 -0
- package/dist/migrations/index.d.ts +97 -0
- package/dist/migrations/index.js +50 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/palette-CP0wd3bE.d.ts +15 -0
- package/dist/palette-lm0bU9i5.d.cts +15 -0
- package/dist/primitive-props-BH_EJWIe.d.cts +100 -0
- package/dist/primitive-props-BH_EJWIe.d.ts +100 -0
- package/dist/primitive-props-CGoJvmcH.d.cts +100 -0
- package/dist/primitive-props-CGoJvmcH.d.ts +100 -0
- package/dist/reflect/index.cjs +998 -0
- package/dist/reflect/index.cjs.map +1 -0
- package/dist/reflect/index.d.cts +125 -0
- package/dist/reflect/index.d.ts +125 -0
- package/dist/reflect/index.js +13 -0
- package/dist/reflect/index.js.map +1 -0
- package/dist/schemas-DPdeFlCT.d.cts +38 -0
- package/dist/schemas-DPdeFlCT.d.ts +38 -0
- package/dist/schemas-pMyyuXV7.d.cts +47 -0
- package/dist/schemas-pMyyuXV7.d.ts +47 -0
- package/dist/types-Boh9ckdG.d.ts +194 -0
- package/dist/types-Brc7v_pS.d.ts +198 -0
- package/dist/types-ByNSwtUV.d.cts +20 -0
- package/dist/types-DdltMfw7.d.ts +20 -0
- package/dist/types-De0KpxfI.d.cts +198 -0
- package/dist/types-DhHL0twe.d.ts +20 -0
- package/dist/types-Dv6JLmgo.d.cts +194 -0
- package/dist/types-Q80YtOQt.d.cts +20 -0
- package/package.json +237 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { L as LayoutNode } from './schemas-DPdeFlCT.cjs';
|
|
3
|
+
|
|
4
|
+
type Unsubscribe = () => void;
|
|
5
|
+
|
|
6
|
+
declare const ErrorCodes: {
|
|
7
|
+
readonly render: "RENDER_ERROR";
|
|
8
|
+
readonly componentNotFound: "COMPONENT_NOT_FOUND";
|
|
9
|
+
readonly layoutRefNotFound: "LAYOUT_REF_NOT_FOUND";
|
|
10
|
+
readonly definitionValidation: "DEFINITION_VALIDATION_ERROR";
|
|
11
|
+
readonly unknownAction: "UNKNOWN_ACTION";
|
|
12
|
+
readonly unknownFragment: "UNKNOWN_FRAGMENT";
|
|
13
|
+
readonly unknownFunction: "UNKNOWN_FUNCTION";
|
|
14
|
+
readonly shellDisposed: "SHELL_DISPOSED";
|
|
15
|
+
readonly lifecycle: "LIFECYCLE_ERROR";
|
|
16
|
+
readonly mutation: "MUTATION_ERROR";
|
|
17
|
+
readonly runaway: "RUNAWAY_CHAIN";
|
|
18
|
+
};
|
|
19
|
+
type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
20
|
+
type NovaErrorContext = Record<string, unknown>;
|
|
21
|
+
declare class NovaError extends Error {
|
|
22
|
+
readonly code: ErrorCode;
|
|
23
|
+
readonly context: NovaErrorContext | undefined;
|
|
24
|
+
constructor(code: ErrorCode, message: string, context?: NovaErrorContext, options?: {
|
|
25
|
+
cause?: unknown;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
declare class RenderError extends NovaError {
|
|
29
|
+
constructor(message: string, context?: NovaErrorContext, options?: {
|
|
30
|
+
cause?: unknown;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
type ComponentNotFoundContext = NovaErrorContext & {
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
declare class ComponentNotFoundError extends NovaError {
|
|
37
|
+
constructor(message: string, context: ComponentNotFoundContext, options?: {
|
|
38
|
+
cause?: unknown;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
type LayoutRefNotFoundContext = NovaErrorContext & {
|
|
42
|
+
ref: string;
|
|
43
|
+
};
|
|
44
|
+
declare class LayoutRefNotFoundError extends NovaError {
|
|
45
|
+
constructor(message: string, context: LayoutRefNotFoundContext, options?: {
|
|
46
|
+
cause?: unknown;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
type DefinitionValidationFailure = {
|
|
50
|
+
id: string;
|
|
51
|
+
issues: z.core.$ZodIssue[];
|
|
52
|
+
};
|
|
53
|
+
type DefinitionValidationContext = NovaErrorContext & {
|
|
54
|
+
failures: DefinitionValidationFailure[];
|
|
55
|
+
};
|
|
56
|
+
declare class DefinitionValidationError extends NovaError {
|
|
57
|
+
constructor(message: string, context: DefinitionValidationContext, options?: {
|
|
58
|
+
cause?: unknown;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
type UnknownActionContext = NovaErrorContext & {
|
|
62
|
+
actionId: string;
|
|
63
|
+
};
|
|
64
|
+
declare class UnknownActionError extends NovaError {
|
|
65
|
+
constructor(message: string, context: UnknownActionContext, options?: {
|
|
66
|
+
cause?: unknown;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
type UnknownFragmentContext = NovaErrorContext & {
|
|
70
|
+
fragmentId: string;
|
|
71
|
+
};
|
|
72
|
+
declare class UnknownFragmentError extends NovaError {
|
|
73
|
+
constructor(message: string, context: UnknownFragmentContext, options?: {
|
|
74
|
+
cause?: unknown;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
declare class ShellDisposedError extends NovaError {
|
|
78
|
+
constructor(message: string, context?: NovaErrorContext, options?: {
|
|
79
|
+
cause?: unknown;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
type UnknownFunctionContext = NovaErrorContext & {
|
|
83
|
+
name: string;
|
|
84
|
+
};
|
|
85
|
+
declare class UnknownFunctionError extends NovaError {
|
|
86
|
+
constructor(name: string, options?: {
|
|
87
|
+
cause?: unknown;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
type LifecycleHook = 'mount' | 'unmount' | 'suspend' | 'resume';
|
|
91
|
+
type LifecycleErrorContext = NovaErrorContext & {
|
|
92
|
+
hook?: LifecycleHook;
|
|
93
|
+
instanceId?: string;
|
|
94
|
+
};
|
|
95
|
+
declare class LifecycleError extends NovaError {
|
|
96
|
+
constructor(message: string, context?: LifecycleErrorContext, options?: {
|
|
97
|
+
cause?: unknown;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
type DataStore<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
102
|
+
get: () => T;
|
|
103
|
+
update: (updater: (current: T) => T) => void;
|
|
104
|
+
subscribe: (handler: (data: T) => void) => Unsubscribe;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/** Source phrase → the words a reader of this locale should see. */
|
|
108
|
+
type Phrasebook = Readonly<Record<string, string>>;
|
|
109
|
+
type PhraseKeys = {
|
|
110
|
+
props?: readonly string[];
|
|
111
|
+
suffixes?: readonly string[];
|
|
112
|
+
text?: boolean;
|
|
113
|
+
};
|
|
114
|
+
declare const DEFAULT_PHRASE_KEYS: Required<Pick<PhraseKeys, 'props' | 'text'>>;
|
|
115
|
+
type PhraseKeyMatcher = {
|
|
116
|
+
isProse: (key: string) => boolean;
|
|
117
|
+
text: boolean;
|
|
118
|
+
};
|
|
119
|
+
declare const matcherFor: (keys: PhraseKeys | undefined) => PhraseKeyMatcher;
|
|
120
|
+
declare const isBinding: (value: string) => boolean;
|
|
121
|
+
declare const isPhrase: (value: string) => boolean;
|
|
122
|
+
|
|
123
|
+
type ModelBindingDescriptor = {
|
|
124
|
+
path: string;
|
|
125
|
+
ref: string;
|
|
126
|
+
};
|
|
127
|
+
type RenderComponentNode = {
|
|
128
|
+
type: 'component';
|
|
129
|
+
name: string;
|
|
130
|
+
props: Record<string, unknown>;
|
|
131
|
+
children: RenderNode[];
|
|
132
|
+
ref?: string;
|
|
133
|
+
key?: string;
|
|
134
|
+
model?: ModelBindingDescriptor;
|
|
135
|
+
};
|
|
136
|
+
type RenderTextNode = {
|
|
137
|
+
type: 'text';
|
|
138
|
+
value: string;
|
|
139
|
+
key?: string;
|
|
140
|
+
};
|
|
141
|
+
type RenderFragmentNode = {
|
|
142
|
+
type: 'fragment';
|
|
143
|
+
children: RenderNode[];
|
|
144
|
+
key?: string;
|
|
145
|
+
};
|
|
146
|
+
type RenderErrorNode = {
|
|
147
|
+
type: 'error';
|
|
148
|
+
code: string;
|
|
149
|
+
message: string;
|
|
150
|
+
nodeRef?: string;
|
|
151
|
+
key?: string;
|
|
152
|
+
};
|
|
153
|
+
type RenderNode = RenderComponentNode | RenderTextNode | RenderFragmentNode | RenderErrorNode;
|
|
154
|
+
type EventMeta = {
|
|
155
|
+
description?: string;
|
|
156
|
+
payloadType?: string;
|
|
157
|
+
};
|
|
158
|
+
type ComponentMeta = {
|
|
159
|
+
description?: string;
|
|
160
|
+
propsSchema?: z.ZodTypeAny;
|
|
161
|
+
events?: Record<string, EventMeta>;
|
|
162
|
+
};
|
|
163
|
+
type ComponentEntry<TComponent = unknown> = {
|
|
164
|
+
component: TComponent;
|
|
165
|
+
meta: ComponentMeta;
|
|
166
|
+
};
|
|
167
|
+
type RegistrationInput<TComponent = unknown> = TComponent | {
|
|
168
|
+
component: TComponent;
|
|
169
|
+
meta?: ComponentMeta;
|
|
170
|
+
};
|
|
171
|
+
interface ComponentRegistry<TComponent = unknown> {
|
|
172
|
+
register(name: string, component: TComponent, meta?: ComponentMeta): void;
|
|
173
|
+
registerAll(entries: Record<string, RegistrationInput<TComponent>>): void;
|
|
174
|
+
get(name: string): ComponentEntry<TComponent> | undefined;
|
|
175
|
+
list(): string[];
|
|
176
|
+
has(name: string): boolean;
|
|
177
|
+
}
|
|
178
|
+
type LayoutStore = {
|
|
179
|
+
get: (id: string) => LayoutNode | undefined;
|
|
180
|
+
set: (id: string, layout: LayoutNode) => void;
|
|
181
|
+
delete: (id: string) => void;
|
|
182
|
+
list: () => string[];
|
|
183
|
+
resolveReferences: (layout: LayoutNode) => LayoutNode;
|
|
184
|
+
};
|
|
185
|
+
type DataStoreView = Pick<DataStore, 'get'>;
|
|
186
|
+
type RenderOnError = (error: NovaError) => void;
|
|
187
|
+
type RenderContext = {
|
|
188
|
+
store: LayoutStore;
|
|
189
|
+
registry: ComponentRegistry;
|
|
190
|
+
dataStore?: DataStoreView;
|
|
191
|
+
strict?: boolean;
|
|
192
|
+
onError?: RenderOnError;
|
|
193
|
+
phrases?: Phrasebook;
|
|
194
|
+
phraseKeys?: PhraseKeys;
|
|
195
|
+
onPhraseMiss?: (phrase: string, where: string) => void;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export { type UnknownFunctionContext as A, UnknownFunctionError as B, type ComponentRegistry as C, type DataStoreView as D, type ErrorCode as E, type Unsubscribe as F, type PhraseKeys as G, DEFAULT_PHRASE_KEYS as H, type PhraseKeyMatcher as I, isBinding as J, isPhrase as K, type LayoutStore as L, type ModelBindingDescriptor as M, NovaError as N, matcherFor as O, type Phrasebook as P, type RenderContext as R, ShellDisposedError as S, type UnknownActionContext as U, type RenderOnError as a, type RenderNode as b, type ComponentEntry as c, type ComponentMeta as d, type ComponentNotFoundContext as e, ComponentNotFoundError as f, type DefinitionValidationContext as g, DefinitionValidationError as h, type DefinitionValidationFailure as i, ErrorCodes as j, type EventMeta as k, type LayoutRefNotFoundContext as l, LayoutRefNotFoundError as m, LifecycleError as n, type LifecycleErrorContext as o, type LifecycleHook as p, type NovaErrorContext as q, type RegistrationInput as r, type RenderComponentNode as s, RenderError as t, type RenderErrorNode as u, type RenderFragmentNode as v, type RenderTextNode as w, UnknownActionError as x, type UnknownFragmentContext as y, UnknownFragmentError as z };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { d as ComponentMeta } from './types-Brc7v_pS.js';
|
|
3
|
+
import { N as NovaEvent } from './schemas-pMyyuXV7.js';
|
|
4
|
+
|
|
5
|
+
type NovaDispatch = (event: NovaEvent) => void;
|
|
6
|
+
type NovaPublish = (channel: string, payload?: unknown) => void;
|
|
7
|
+
type NovaModelBinding = {
|
|
8
|
+
ref: string;
|
|
9
|
+
path: string;
|
|
10
|
+
};
|
|
11
|
+
type NovaComponentProps = {
|
|
12
|
+
novaModel?: NovaModelBinding;
|
|
13
|
+
novaRef?: string;
|
|
14
|
+
};
|
|
15
|
+
type NovaComponent = Component & {
|
|
16
|
+
meta?: ComponentMeta;
|
|
17
|
+
};
|
|
18
|
+
declare const isNovaComponent: (value: unknown) => value is NovaComponent;
|
|
19
|
+
|
|
20
|
+
export { type NovaDispatch as N, type NovaPublish as a, type NovaComponent as b, type NovaComponentProps as c, type NovaModelBinding as d, isNovaComponent as i };
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { A as ActionDefinition, a as ActionFragment } from './index-caZoXSwr.cjs';
|
|
2
|
+
import { F as Unsubscribe, b as RenderNode, N as NovaError, C as ComponentRegistry, L as LayoutStore, P as Phrasebook, r as RegistrationInput, G as PhraseKeys } from './types-De0KpxfI.cjs';
|
|
3
|
+
import { d as PushEffect, P as PopEffect, R as ReplaceEffect, f as PopToEffect, g as ResetToEffect, h as RemoveInstanceEffect, i as RemoveSelfEffect } from './effects-CndX9K7D.cjs';
|
|
4
|
+
import { L as LayoutNode } from './schemas-DPdeFlCT.cjs';
|
|
5
|
+
import { N as NovaEvent } from './schemas-pMyyuXV7.cjs';
|
|
6
|
+
|
|
7
|
+
type IdFactory = () => string;
|
|
8
|
+
declare const createIdFactory: (prefix: string) => IdFactory;
|
|
9
|
+
|
|
10
|
+
type EventHandler<TEvent extends {
|
|
11
|
+
type: string;
|
|
12
|
+
} = NovaEvent> = (event: TEvent) => void;
|
|
13
|
+
type EventMatcher = string | RegExp;
|
|
14
|
+
type EventBus<TEvent extends {
|
|
15
|
+
type: string;
|
|
16
|
+
} = NovaEvent> = {
|
|
17
|
+
emit: (event: TEvent) => void;
|
|
18
|
+
on: (matcher: EventMatcher, handler: EventHandler<TEvent>) => Unsubscribe;
|
|
19
|
+
once: (matcher: EventMatcher, handler: EventHandler<TEvent>) => Unsubscribe;
|
|
20
|
+
scoped: () => EventBus<TEvent>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type ChannelHandler = (payload: unknown, from?: string, cause?: unknown) => void;
|
|
24
|
+
type MessageBus = {
|
|
25
|
+
publish: (channel: string, payload?: unknown, cause?: unknown) => void;
|
|
26
|
+
send: (from: string, to: string, payload?: unknown) => void;
|
|
27
|
+
subscribe: (channel: string, handler: ChannelHandler) => Unsubscribe;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type ActionStatus = 'initializing' | 'active' | 'suspended' | 'unmounted';
|
|
31
|
+
type ActionInstance = {
|
|
32
|
+
id: string;
|
|
33
|
+
definitionId: string;
|
|
34
|
+
canvasId: string;
|
|
35
|
+
status: ActionStatus;
|
|
36
|
+
data: Record<string, unknown>;
|
|
37
|
+
};
|
|
38
|
+
type DataChangeHandler$1 = (data: Record<string, unknown>) => void;
|
|
39
|
+
type StatusChangeHandler = (status: ActionStatus) => void;
|
|
40
|
+
|
|
41
|
+
type TransformFn = (config: unknown, source: unknown) => unknown;
|
|
42
|
+
type FetchFn = (url: string, init?: FetchInit) => Promise<FetchResponse>;
|
|
43
|
+
type FunctionHandler = (data: Record<string, unknown>, signal: AbortSignal) => Promise<unknown>;
|
|
44
|
+
type FetchInit = {
|
|
45
|
+
method?: string;
|
|
46
|
+
headers?: Record<string, string>;
|
|
47
|
+
body?: string;
|
|
48
|
+
signal?: AbortSignal;
|
|
49
|
+
};
|
|
50
|
+
type FetchResponse = {
|
|
51
|
+
ok: boolean;
|
|
52
|
+
status: number;
|
|
53
|
+
json: () => Promise<unknown>;
|
|
54
|
+
text: () => Promise<string>;
|
|
55
|
+
onChange?: (handler: (body: unknown) => void) => Unsubscribe;
|
|
56
|
+
};
|
|
57
|
+
type ReconcileNavigation = {
|
|
58
|
+
reconcile: {
|
|
59
|
+
canvas?: string;
|
|
60
|
+
own?: 'pushed' | 'canvas';
|
|
61
|
+
with?: string[];
|
|
62
|
+
origin?: string;
|
|
63
|
+
desired: {
|
|
64
|
+
actionId: string;
|
|
65
|
+
input?: Record<string, unknown>;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
type NavigationEffect = PushEffect | PopEffect | ReplaceEffect | PopToEffect | ResetToEffect | RemoveInstanceEffect | RemoveSelfEffect | ReconcileNavigation;
|
|
70
|
+
type NavigateHandler = (effect: NavigationEffect) => void;
|
|
71
|
+
type EndpointEvent = {
|
|
72
|
+
name: string;
|
|
73
|
+
kind: 'fn' | 'http';
|
|
74
|
+
ok: boolean;
|
|
75
|
+
status: number;
|
|
76
|
+
ms: number;
|
|
77
|
+
instanceId: string;
|
|
78
|
+
canvasId: string;
|
|
79
|
+
};
|
|
80
|
+
type EndpointHandler = (event: EndpointEvent) => void;
|
|
81
|
+
type OnErrorHandler = (error: NovaError) => void;
|
|
82
|
+
type PublicActionRuntime = {
|
|
83
|
+
readonly instance: ActionInstance;
|
|
84
|
+
readonly definition: ActionDefinition;
|
|
85
|
+
getData: () => Record<string, unknown>;
|
|
86
|
+
setData: (next: Record<string, unknown>) => void;
|
|
87
|
+
render: () => RenderNode[];
|
|
88
|
+
onDataChange: (handler: DataChangeHandler$1) => Unsubscribe;
|
|
89
|
+
onStatusChange: (handler: StatusChangeHandler) => Unsubscribe;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
type CanvasInitialSeed = string | {
|
|
93
|
+
action: string;
|
|
94
|
+
input?: Record<string, unknown>;
|
|
95
|
+
with?: string[];
|
|
96
|
+
};
|
|
97
|
+
type CanvasConfig = {
|
|
98
|
+
id: string;
|
|
99
|
+
mode?: 'stack' | 'list';
|
|
100
|
+
actionLayout?: LayoutNode | string;
|
|
101
|
+
initial?: CanvasInitialSeed | CanvasInitialSeed[];
|
|
102
|
+
};
|
|
103
|
+
type PushOptions = {
|
|
104
|
+
origin?: string;
|
|
105
|
+
history?: boolean;
|
|
106
|
+
};
|
|
107
|
+
type CanvasState = {
|
|
108
|
+
id: string;
|
|
109
|
+
stack: ActionInstance[];
|
|
110
|
+
active: ActionInstance | undefined;
|
|
111
|
+
};
|
|
112
|
+
type RenderApi = {
|
|
113
|
+
frame: () => RenderNode[];
|
|
114
|
+
canvasTree: (canvasId: string) => RenderNode[];
|
|
115
|
+
dispatch: (canvasId: string, event: NovaEvent) => void;
|
|
116
|
+
publish: (channel: string, payload?: unknown) => void;
|
|
117
|
+
};
|
|
118
|
+
type StateSnapshot = {
|
|
119
|
+
canvases: Record<string, CanvasState>;
|
|
120
|
+
};
|
|
121
|
+
type DataChangeEvent = {
|
|
122
|
+
instanceId: string;
|
|
123
|
+
canvasId: string;
|
|
124
|
+
data: Record<string, unknown>;
|
|
125
|
+
};
|
|
126
|
+
type StateChangeHandler = (snapshot: StateSnapshot) => void;
|
|
127
|
+
type DataChangeHandler = (change: DataChangeEvent) => void;
|
|
128
|
+
type CanvasChangeHandler = (state: CanvasState) => void;
|
|
129
|
+
type ShellTelemetry = {
|
|
130
|
+
onStateChange?: StateChangeHandler;
|
|
131
|
+
onDataChange?: DataChangeHandler;
|
|
132
|
+
onEndpoint?: EndpointHandler;
|
|
133
|
+
};
|
|
134
|
+
type ShellConfig = {
|
|
135
|
+
canvases: CanvasConfig[];
|
|
136
|
+
canvasLayout?: LayoutNode | string;
|
|
137
|
+
registry?: ComponentRegistry;
|
|
138
|
+
components?: Record<string, RegistrationInput>;
|
|
139
|
+
layoutStore?: LayoutStore;
|
|
140
|
+
actions: Record<string, ActionDefinition>;
|
|
141
|
+
fragments?: Record<string, ActionFragment>;
|
|
142
|
+
transform?: TransformFn;
|
|
143
|
+
fetch?: FetchFn;
|
|
144
|
+
functions?: Record<string, FunctionHandler>;
|
|
145
|
+
endpointTimeoutMs?: number;
|
|
146
|
+
telemetry?: ShellTelemetry;
|
|
147
|
+
strict?: boolean;
|
|
148
|
+
onError?: OnErrorHandler;
|
|
149
|
+
shellIdFn?: IdFactory;
|
|
150
|
+
instanceIdFn?: IdFactory;
|
|
151
|
+
historyDepth?: number;
|
|
152
|
+
eventBus?: EventBus;
|
|
153
|
+
messageBus?: MessageBus;
|
|
154
|
+
phrases?: Phrasebook;
|
|
155
|
+
phraseKeys?: PhraseKeys;
|
|
156
|
+
onPhraseMiss?: (phrase: string, where: string) => void;
|
|
157
|
+
};
|
|
158
|
+
type Shell = {
|
|
159
|
+
readonly id: string;
|
|
160
|
+
readonly registry: ComponentRegistry;
|
|
161
|
+
readonly layoutStore: LayoutStore;
|
|
162
|
+
push: (canvasId: string, actionId: string, input?: Record<string, unknown>, fragments?: string[], options?: PushOptions) => string;
|
|
163
|
+
originOf: (instanceId: string) => string | undefined;
|
|
164
|
+
pop: (canvasId: string) => void;
|
|
165
|
+
popTo: (canvasId: string, instanceId: string) => void;
|
|
166
|
+
removeInstance: (canvasId: string, instanceId: string) => void;
|
|
167
|
+
replace: (canvasId: string, actionId: string, input?: Record<string, unknown>, fragments?: string[]) => string;
|
|
168
|
+
clear: (canvasId: string) => void;
|
|
169
|
+
back: () => boolean;
|
|
170
|
+
registerAction: (definition: ActionDefinition) => void;
|
|
171
|
+
removeAction: (actionId: string) => void;
|
|
172
|
+
registerFragment: (fragment: ActionFragment) => void;
|
|
173
|
+
addCanvas: (config: CanvasConfig) => void;
|
|
174
|
+
removeCanvas: (canvasId: string) => void;
|
|
175
|
+
setCanvasLayout: (layout: LayoutNode | string) => void;
|
|
176
|
+
setPhrases: (phrases: Phrasebook | undefined) => void;
|
|
177
|
+
getPhrases: () => Phrasebook | undefined;
|
|
178
|
+
setLayout: (refId: string, layout: LayoutNode) => void;
|
|
179
|
+
getCanvasState: (canvasId: string) => CanvasState;
|
|
180
|
+
getRuntime: (instanceId: string) => PublicActionRuntime | undefined;
|
|
181
|
+
getState: () => StateSnapshot;
|
|
182
|
+
getShellRenderTree: () => RenderNode[];
|
|
183
|
+
getCanvasRenderTree: (canvasId: string) => RenderNode[];
|
|
184
|
+
flattenRenderTree: (tree: RenderNode[]) => RenderNode[];
|
|
185
|
+
dispatch: (event: NovaEvent) => void;
|
|
186
|
+
publish: (channel: string, payload?: unknown) => void;
|
|
187
|
+
onStateChange: (handler: StateChangeHandler) => Unsubscribe;
|
|
188
|
+
onDataChange: (handler: DataChangeHandler) => Unsubscribe;
|
|
189
|
+
onEndpoint: (handler: EndpointHandler) => Unsubscribe;
|
|
190
|
+
onCanvasChange: (canvasId: string, handler: CanvasChangeHandler) => Unsubscribe;
|
|
191
|
+
dispose: () => void;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export { type ActionInstance as A, type CanvasConfig as C, type DataChangeHandler$1 as D, type EventBus as E, type FetchFn as F, type IdFactory as I, type MessageBus as M, type NavigateHandler as N, type PublicActionRuntime as P, type RenderApi as R, type ShellConfig as S, type TransformFn as T, type Shell as a, type ActionStatus as b, type CanvasInitialSeed as c, type CanvasState as d, type ChannelHandler as e, type EventHandler as f, type FetchInit as g, type FetchResponse as h, type FunctionHandler as i, type NavigationEffect as j, type PushOptions as k, type CanvasChangeHandler as l, type DataChangeEvent as m, type DataChangeHandler as n, type StateChangeHandler as o, type ShellTelemetry as p, type StateSnapshot as q, type StatusChangeHandler as r, createIdFactory as s };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { d as ComponentMeta } from './types-De0KpxfI.cjs';
|
|
3
|
+
import { N as NovaEvent } from './schemas-pMyyuXV7.cjs';
|
|
4
|
+
|
|
5
|
+
type NovaDispatch = (event: NovaEvent) => void;
|
|
6
|
+
type NovaPublish = (channel: string, payload?: unknown) => void;
|
|
7
|
+
type NovaModelBinding = {
|
|
8
|
+
ref: string;
|
|
9
|
+
path: string;
|
|
10
|
+
};
|
|
11
|
+
type NovaComponentProps = {
|
|
12
|
+
novaModel?: NovaModelBinding;
|
|
13
|
+
novaRef?: string;
|
|
14
|
+
};
|
|
15
|
+
type NovaComponent = Component & {
|
|
16
|
+
meta?: ComponentMeta;
|
|
17
|
+
};
|
|
18
|
+
declare const isNovaComponent: (value: unknown) => value is NovaComponent;
|
|
19
|
+
|
|
20
|
+
export { type NovaDispatch as N, type NovaPublish as a, type NovaComponent as b, type NovaComponentProps as c, type NovaModelBinding as d, isNovaComponent as i };
|
package/package.json
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@niscorp/nova",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Declarative UI framework for AI agents — JSON layouts, shell orchestration, React",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/moccadroid/niscorp.git",
|
|
9
|
+
"directory": "packages/nova"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"require": {
|
|
20
|
+
"types": "./dist/index.d.cts",
|
|
21
|
+
"default": "./dist/index.cjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"./adapters/react": {
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./dist/adapters/react/index.d.ts",
|
|
27
|
+
"default": "./dist/adapters/react/index.js"
|
|
28
|
+
},
|
|
29
|
+
"require": {
|
|
30
|
+
"types": "./dist/adapters/react/index.d.cts",
|
|
31
|
+
"default": "./dist/adapters/react/index.cjs"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"./adapters/react/components": {
|
|
35
|
+
"import": {
|
|
36
|
+
"types": "./dist/adapters/react/components/index.d.ts",
|
|
37
|
+
"default": "./dist/adapters/react/components/index.js"
|
|
38
|
+
},
|
|
39
|
+
"require": {
|
|
40
|
+
"types": "./dist/adapters/react/components/index.d.cts",
|
|
41
|
+
"default": "./dist/adapters/react/components/index.cjs"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"./adapters/vue": {
|
|
45
|
+
"import": {
|
|
46
|
+
"types": "./dist/adapters/vue/index.d.ts",
|
|
47
|
+
"default": "./dist/adapters/vue/index.js"
|
|
48
|
+
},
|
|
49
|
+
"require": {
|
|
50
|
+
"types": "./dist/adapters/vue/index.d.cts",
|
|
51
|
+
"default": "./dist/adapters/vue/index.cjs"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"./adapters/vue/components": {
|
|
55
|
+
"import": {
|
|
56
|
+
"types": "./dist/adapters/vue/components/index.d.ts",
|
|
57
|
+
"default": "./dist/adapters/vue/components/index.js"
|
|
58
|
+
},
|
|
59
|
+
"require": {
|
|
60
|
+
"types": "./dist/adapters/vue/components/index.d.cts",
|
|
61
|
+
"default": "./dist/adapters/vue/components/index.cjs"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"./adapters/dom": {
|
|
65
|
+
"import": {
|
|
66
|
+
"types": "./dist/adapters/dom/index.d.ts",
|
|
67
|
+
"default": "./dist/adapters/dom/index.js"
|
|
68
|
+
},
|
|
69
|
+
"require": {
|
|
70
|
+
"types": "./dist/adapters/dom/index.d.cts",
|
|
71
|
+
"default": "./dist/adapters/dom/index.cjs"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"./adapters/dom/server": {
|
|
75
|
+
"import": {
|
|
76
|
+
"types": "./dist/adapters/dom/server.d.ts",
|
|
77
|
+
"default": "./dist/adapters/dom/server.js"
|
|
78
|
+
},
|
|
79
|
+
"require": {
|
|
80
|
+
"types": "./dist/adapters/dom/server.d.cts",
|
|
81
|
+
"default": "./dist/adapters/dom/server.cjs"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"./adapters/dom/components": {
|
|
85
|
+
"import": {
|
|
86
|
+
"types": "./dist/adapters/dom/components/index.d.ts",
|
|
87
|
+
"default": "./dist/adapters/dom/components/index.js"
|
|
88
|
+
},
|
|
89
|
+
"require": {
|
|
90
|
+
"types": "./dist/adapters/dom/components/index.d.cts",
|
|
91
|
+
"default": "./dist/adapters/dom/components/index.cjs"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"./adapters/ink": {
|
|
95
|
+
"import": {
|
|
96
|
+
"types": "./dist/adapters/ink/index.d.ts",
|
|
97
|
+
"default": "./dist/adapters/ink/index.js"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"./adapters/tty": {
|
|
101
|
+
"import": {
|
|
102
|
+
"types": "./dist/adapters/tty/index.d.ts",
|
|
103
|
+
"default": "./dist/adapters/tty/index.js"
|
|
104
|
+
},
|
|
105
|
+
"require": {
|
|
106
|
+
"types": "./dist/adapters/tty/index.d.cts",
|
|
107
|
+
"default": "./dist/adapters/tty/index.cjs"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"./adapters/tty/components": {
|
|
111
|
+
"import": {
|
|
112
|
+
"types": "./dist/adapters/tty/components/index.d.ts",
|
|
113
|
+
"default": "./dist/adapters/tty/components/index.js"
|
|
114
|
+
},
|
|
115
|
+
"require": {
|
|
116
|
+
"types": "./dist/adapters/tty/components/index.d.cts",
|
|
117
|
+
"default": "./dist/adapters/tty/components/index.cjs"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"./agent": {
|
|
121
|
+
"import": {
|
|
122
|
+
"types": "./dist/agent/index.d.ts",
|
|
123
|
+
"default": "./dist/agent/index.js"
|
|
124
|
+
},
|
|
125
|
+
"require": {
|
|
126
|
+
"types": "./dist/agent/index.d.cts",
|
|
127
|
+
"default": "./dist/agent/index.cjs"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"./i18n": {
|
|
131
|
+
"import": {
|
|
132
|
+
"types": "./dist/i18n/index.d.ts",
|
|
133
|
+
"default": "./dist/i18n/index.js"
|
|
134
|
+
},
|
|
135
|
+
"require": {
|
|
136
|
+
"types": "./dist/i18n/index.d.cts",
|
|
137
|
+
"default": "./dist/i18n/index.cjs"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"./reflect": {
|
|
141
|
+
"import": {
|
|
142
|
+
"types": "./dist/reflect/index.d.ts",
|
|
143
|
+
"default": "./dist/reflect/index.js"
|
|
144
|
+
},
|
|
145
|
+
"require": {
|
|
146
|
+
"types": "./dist/reflect/index.d.cts",
|
|
147
|
+
"default": "./dist/reflect/index.cjs"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"./devtools": {
|
|
151
|
+
"import": {
|
|
152
|
+
"types": "./dist/devtools/index.d.ts",
|
|
153
|
+
"default": "./dist/devtools/index.js"
|
|
154
|
+
},
|
|
155
|
+
"require": {
|
|
156
|
+
"types": "./dist/devtools/index.d.cts",
|
|
157
|
+
"default": "./dist/devtools/index.cjs"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"./migrations": {
|
|
161
|
+
"import": {
|
|
162
|
+
"types": "./dist/migrations/index.d.ts",
|
|
163
|
+
"default": "./dist/migrations/index.js"
|
|
164
|
+
},
|
|
165
|
+
"require": {
|
|
166
|
+
"types": "./dist/migrations/index.d.cts",
|
|
167
|
+
"default": "./dist/migrations/index.cjs"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"files": [
|
|
172
|
+
"dist",
|
|
173
|
+
"*.md",
|
|
174
|
+
"LICENSE"
|
|
175
|
+
],
|
|
176
|
+
"publishConfig": {
|
|
177
|
+
"access": "public"
|
|
178
|
+
},
|
|
179
|
+
"engines": {
|
|
180
|
+
"node": ">=22.12"
|
|
181
|
+
},
|
|
182
|
+
"devDependencies": {
|
|
183
|
+
"@testing-library/react": "^16.1.0",
|
|
184
|
+
"@types/react": "^19.2.14",
|
|
185
|
+
"@types/react-dom": "^19.2.0",
|
|
186
|
+
"@vue/test-utils": "^2.5.1",
|
|
187
|
+
"ink": "^7.1.1",
|
|
188
|
+
"ink-testing-library": "^4.0.0",
|
|
189
|
+
"ink-text-input": "^6.0.0",
|
|
190
|
+
"jsdom": "^25.0.1",
|
|
191
|
+
"react": "^19.2.4",
|
|
192
|
+
"react-dom": "^19.2.4",
|
|
193
|
+
"tsup": "^8.5.1",
|
|
194
|
+
"vitest": "^4.1.2",
|
|
195
|
+
"vue": "^3.5.43",
|
|
196
|
+
"zod": "^4.6.5",
|
|
197
|
+
"@niscorp/prism": "^0.1.0",
|
|
198
|
+
"@niscorp/strata": "^0.1.0",
|
|
199
|
+
"@niscorp/cortex": "^0.1.0"
|
|
200
|
+
},
|
|
201
|
+
"peerDependencies": {
|
|
202
|
+
"ink": "^7.1.1",
|
|
203
|
+
"ink-text-input": "^6.0.0",
|
|
204
|
+
"react": "^19.2.4",
|
|
205
|
+
"zod": "^4.2.0",
|
|
206
|
+
"vue": "^3.5.0",
|
|
207
|
+
"@niscorp/cortex": "^0.1.0",
|
|
208
|
+
"@niscorp/prism": "^0.1.0",
|
|
209
|
+
"@niscorp/strata": "^0.1.0"
|
|
210
|
+
},
|
|
211
|
+
"peerDependenciesMeta": {
|
|
212
|
+
"@niscorp/cortex": {
|
|
213
|
+
"optional": true
|
|
214
|
+
},
|
|
215
|
+
"@niscorp/strata": {
|
|
216
|
+
"optional": true
|
|
217
|
+
},
|
|
218
|
+
"ink": {
|
|
219
|
+
"optional": true
|
|
220
|
+
},
|
|
221
|
+
"ink-text-input": {
|
|
222
|
+
"optional": true
|
|
223
|
+
},
|
|
224
|
+
"react": {
|
|
225
|
+
"optional": true
|
|
226
|
+
},
|
|
227
|
+
"vue": {
|
|
228
|
+
"optional": true
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"scripts": {
|
|
232
|
+
"build": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && tsup",
|
|
233
|
+
"dev": "tsup --watch",
|
|
234
|
+
"test": "vitest run",
|
|
235
|
+
"typecheck": "tsc --noEmit -p tsconfig.test.json"
|
|
236
|
+
}
|
|
237
|
+
}
|