@geektech/tsone 0.0.2 → 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/dist/index.js CHANGED
@@ -1,21 +1,57 @@
1
1
  import {
2
+ A,
3
+ Article,
4
+ Aside,
5
+ Blockquote,
2
6
  Button,
7
+ Code,
3
8
  Component,
4
9
  ComponentRenderStrategy,
5
10
  Div,
6
11
  ElementRenderStrategy,
12
+ Em,
13
+ Footer,
14
+ Form,
15
+ H1,
16
+ H2,
17
+ H3,
18
+ H4,
19
+ H5,
20
+ H6,
21
+ Header,
22
+ Img,
7
23
  Input,
24
+ Label,
25
+ Li,
26
+ Main,
8
27
  ModelBindingController,
28
+ Nav,
29
+ Ol,
30
+ Option,
9
31
  P,
32
+ Pre,
10
33
  ReactiveSystem,
11
34
  RendererContext,
12
35
  Router,
13
36
  RouterLink,
14
37
  RouterView,
38
+ Section,
39
+ Select,
15
40
  SlotRenderStrategy,
41
+ Small,
16
42
  Span,
43
+ Strong,
44
+ Table,
45
+ Tag,
46
+ Tbody,
47
+ Td,
17
48
  TemplateEngine,
18
49
  TextRenderStrategy,
50
+ Textarea,
51
+ Th,
52
+ Thead,
53
+ Tr,
54
+ Ul,
19
55
  computed,
20
56
  createComponent,
21
57
  createRouter,
@@ -30,6 +66,7 @@ import {
30
66
  isRef,
31
67
  isSlotProvider,
32
68
  modelPath,
69
+ normalizeTransitionGroupProps,
33
70
  reactive,
34
71
  readonly,
35
72
  ref,
@@ -37,17 +74,109 @@ import {
37
74
  slot,
38
75
  stop,
39
76
  unref,
40
- useRouter
41
- } from "./index-ycmc7ga1.js";
77
+ useRouter,
78
+ validateTransitionGroupChildren
79
+ } from "./index-wv9gyjqt.js";
42
80
  import {
43
81
  renderStyleSheet
44
82
  } from "./index-vpx80nq5.js";
45
83
  import"./index-8wjswsye.js";
46
84
 
85
+ // lib/core/document.ts
86
+ var VOID_HEAD_TAGS = new Set(["base", "link", "meta"]);
87
+ function renderHtmlDocument(options) {
88
+ const lang = options.lang ?? "en";
89
+ const charset = options.charset ?? "utf-8";
90
+ const viewport = options.viewport ?? "width=device-width, initial-scale=1";
91
+ const htmlAttributes = renderAttributes({
92
+ lang,
93
+ ...options.htmlAttributes ?? {}
94
+ });
95
+ const bodyAttributes = renderAttributes(options.bodyAttributes);
96
+ const bodyHtml = renderDocumentBody(options.body);
97
+ return [
98
+ "<!doctype html>",
99
+ `<html${htmlAttributes}>`,
100
+ "<head>",
101
+ ` <meta charset="${escapeHtml(charset)}">`,
102
+ ` <meta name="viewport" content="${escapeHtml(viewport)}">`,
103
+ ` <title>${escapeHtml(options.title)}</title>`,
104
+ options.description ? ` <meta name="description" content="${escapeHtml(options.description)}">` : "",
105
+ ...(options.head ?? []).map((element) => ` ${renderHeadElement(element)}`),
106
+ options.styles && options.styles.length > 0 ? ` <style>${renderStyleSheet(options.styles)}</style>` : "",
107
+ "</head>",
108
+ `<body${bodyAttributes}>`,
109
+ bodyHtml,
110
+ ...(options.scripts ?? []).map((script) => ` ${renderScript(script)}`),
111
+ "</body>",
112
+ "</html>"
113
+ ].filter((line) => line !== "").join(`
114
+ `);
115
+ }
116
+ function renderDocumentBody(body) {
117
+ if (typeof document === "undefined") {
118
+ throw new Error("renderHtmlDocument requires a DOM-like document");
119
+ }
120
+ const container = document.createElement("div");
121
+ const renderer = new RendererContext;
122
+ const mountedComponents = new Set;
123
+ const renderables = Array.isArray(body) ? body : [body];
124
+ const context = {
125
+ templateEngine: new TemplateEngine({}),
126
+ renderer,
127
+ slots: { default: [] },
128
+ registerChild: (component) => {
129
+ mountedComponents.add(component);
130
+ },
131
+ unregisterChild: (component) => {
132
+ mountedComponents.delete(component);
133
+ }
134
+ };
135
+ renderables.forEach((renderable) => {
136
+ container.appendChild(renderer.mount(renderable, context));
137
+ });
138
+ const html = container.innerHTML;
139
+ mountedComponents.forEach((component) => {
140
+ component.unmount();
141
+ });
142
+ return html;
143
+ }
144
+ function renderHeadElement(element) {
145
+ const attributes = renderAttributes(element.attributes);
146
+ if (VOID_HEAD_TAGS.has(element.tag) && !element.text) {
147
+ return `<${element.tag}${attributes}>`;
148
+ }
149
+ return `<${element.tag}${attributes}>${escapeHtml(element.text ?? "")}</${element.tag}>`;
150
+ }
151
+ function renderScript(script) {
152
+ const attributes = renderAttributes({
153
+ type: script.type,
154
+ src: script.src,
155
+ async: script.async,
156
+ defer: script.defer,
157
+ ...script.attributes ?? {}
158
+ });
159
+ return `<script${attributes}></script>`;
160
+ }
161
+ function renderAttributes(attributes = {}) {
162
+ const rendered = Object.entries(attributes).flatMap(([name, value]) => {
163
+ if (value === false || value === null || value === undefined) {
164
+ return [];
165
+ }
166
+ return value === true ? [name] : [`${name}="${escapeHtml(String(value))}"`];
167
+ }).join(" ");
168
+ return rendered ? ` ${rendered}` : "";
169
+ }
170
+ function escapeHtml(value) {
171
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
172
+ }
173
+
47
174
  // lib/core/app.ts
175
+ var DEFAULT_ROOT_ELEMENT = "#app";
176
+
48
177
  class OneApp {
49
178
  options;
50
- container;
179
+ container = null;
51
180
  rootInstance = null;
52
181
  mounted = false;
53
182
  templateEngine = null;
@@ -58,7 +187,6 @@ class OneApp {
58
187
  router;
59
188
  constructor(options = {}) {
60
189
  this.options = options;
61
- this.container = document.body;
62
190
  this.appContext = {
63
191
  app: this,
64
192
  version: "0.0.2",
@@ -70,6 +198,9 @@ class OneApp {
70
198
  this.renderErrorUI(error);
71
199
  }
72
200
  renderErrorUI(error) {
201
+ if (!this.container) {
202
+ return;
203
+ }
73
204
  this.container.innerHTML = `
74
205
  <div style="padding: 20px; background-color: #ffebee; color: #c62828; font-family: Arial, sans-serif;">
75
206
  <h3>应用错误</h3>
@@ -91,18 +222,15 @@ class OneApp {
91
222
  console.warn("应用已经处于运行状态");
92
223
  return;
93
224
  }
225
+ const mountContainer = this.resolveMountContainer();
226
+ if (!mountContainer) {
227
+ return;
228
+ }
94
229
  try {
230
+ this.container = mountContainer;
95
231
  globalThis.__APP__ = this;
96
- if (this.options.rootElement) {
97
- const rootElement = this.resolveRootElement(this.options.rootElement);
98
- if (rootElement) {
99
- this.container = rootElement;
100
- } else {
101
- throw new Error(`无法找到挂载点: ${this.options.rootElement}`);
102
- }
103
- }
104
232
  if (this.options.root) {
105
- this.rootInstance = new this.options.root;
233
+ this.rootInstance = new this.options.root(this.options.rootProps);
106
234
  if ("setAppContext" in this.rootInstance) {
107
235
  this.rootInstance.setAppContext(this.appContext);
108
236
  }
@@ -137,7 +265,9 @@ class OneApp {
137
265
  this.templateEngine.clearBindings();
138
266
  this.templateEngine = null;
139
267
  }
140
- this.container.innerHTML = "";
268
+ if (this.container) {
269
+ this.container.innerHTML = "";
270
+ }
141
271
  if (this.unmountedCallback) {
142
272
  this.unmountedCallback();
143
273
  }
@@ -207,14 +337,67 @@ class OneApp {
207
337
  this.unmountedCallback = callback;
208
338
  return this;
209
339
  }
340
+ renderHtmlDocument(options = {}) {
341
+ const appDocument = this.options.document ?? {};
342
+ const scripts = this.mergeDocumentScripts(appDocument.scripts, options.scripts);
343
+ return renderHtmlDocument({
344
+ ...appDocument,
345
+ ...options,
346
+ title: options.title ?? appDocument.title ?? "TSone App",
347
+ body: options.body ?? appDocument.body ?? this.createMountDocumentBody(),
348
+ scripts
349
+ });
350
+ }
210
351
  resolveRootElement(selector) {
211
352
  if (!selector) {
212
353
  return null;
213
354
  }
214
355
  if (typeof selector === "string") {
356
+ if (typeof document === "undefined") {
357
+ return null;
358
+ }
215
359
  return document.querySelector(selector);
216
360
  }
217
- return selector instanceof Element ? selector : null;
361
+ return typeof Element !== "undefined" && selector instanceof Element ? selector : null;
362
+ }
363
+ resolveMountContainer() {
364
+ if (typeof document === "undefined") {
365
+ return null;
366
+ }
367
+ const rootElement = this.resolveRootElement(this.options.rootElement ?? DEFAULT_ROOT_ELEMENT);
368
+ return rootElement instanceof HTMLElement ? rootElement : null;
369
+ }
370
+ createMountDocumentBody() {
371
+ const rootElement = this.options.rootElement ?? DEFAULT_ROOT_ELEMENT;
372
+ if (typeof rootElement === "string") {
373
+ return this.createMountElementFromSelector(rootElement);
374
+ }
375
+ if (typeof Element !== "undefined" && rootElement instanceof Element) {
376
+ const props = {};
377
+ if (rootElement.id) {
378
+ props.id = rootElement.id;
379
+ }
380
+ if (rootElement.className) {
381
+ props.className = rootElement.className;
382
+ }
383
+ return { tag: rootElement.tagName.toLowerCase(), props };
384
+ }
385
+ return Div({ props: { id: "app" } });
386
+ }
387
+ createMountElementFromSelector(selector) {
388
+ if (selector.startsWith("#") && selector.length > 1) {
389
+ return Div({ props: { id: selector.slice(1) } });
390
+ }
391
+ if (selector.startsWith(".") && selector.length > 1) {
392
+ return Div({ props: { className: selector.slice(1) } });
393
+ }
394
+ return Div({ props: { "data-tsone-root": selector } });
395
+ }
396
+ mergeDocumentScripts(baseScripts, extraScripts) {
397
+ if (!baseScripts && !extraScripts) {
398
+ return;
399
+ }
400
+ return [...baseScripts ?? [], ...extraScripts ?? []];
218
401
  }
219
402
  onMounted() {
220
403
  this.plugins.forEach(({ plugin: pluginObj }) => {
@@ -238,94 +421,6 @@ class OneApp {
238
421
  });
239
422
  }
240
423
  }
241
- // lib/core/document.ts
242
- var VOID_HEAD_TAGS = new Set(["base", "link", "meta"]);
243
- function renderHtmlDocument(options) {
244
- const lang = options.lang ?? "en";
245
- const charset = options.charset ?? "utf-8";
246
- const viewport = options.viewport ?? "width=device-width, initial-scale=1";
247
- const htmlAttributes = renderAttributes({
248
- lang,
249
- ...options.htmlAttributes ?? {}
250
- });
251
- const bodyAttributes = renderAttributes(options.bodyAttributes);
252
- const bodyHtml = renderDocumentBody(options.body);
253
- return [
254
- "<!doctype html>",
255
- `<html${htmlAttributes}>`,
256
- "<head>",
257
- ` <meta charset="${escapeHtml(charset)}">`,
258
- ` <meta name="viewport" content="${escapeHtml(viewport)}">`,
259
- ` <title>${escapeHtml(options.title)}</title>`,
260
- options.description ? ` <meta name="description" content="${escapeHtml(options.description)}">` : "",
261
- ...(options.head ?? []).map((element) => ` ${renderHeadElement(element)}`),
262
- options.styles && options.styles.length > 0 ? ` <style>${renderStyleSheet(options.styles)}</style>` : "",
263
- "</head>",
264
- `<body${bodyAttributes}>`,
265
- bodyHtml,
266
- ...(options.scripts ?? []).map((script) => ` ${renderScript(script)}`),
267
- "</body>",
268
- "</html>"
269
- ].filter((line) => line !== "").join(`
270
- `);
271
- }
272
- function renderDocumentBody(body) {
273
- if (typeof document === "undefined") {
274
- throw new Error("renderHtmlDocument requires a DOM-like document");
275
- }
276
- const container = document.createElement("div");
277
- const renderer = new RendererContext;
278
- const mountedComponents = new Set;
279
- const renderables = Array.isArray(body) ? body : [body];
280
- const context = {
281
- templateEngine: new TemplateEngine({}),
282
- renderer,
283
- slots: { default: [] },
284
- registerChild: (component) => {
285
- mountedComponents.add(component);
286
- },
287
- unregisterChild: (component) => {
288
- mountedComponents.delete(component);
289
- }
290
- };
291
- renderables.forEach((renderable) => {
292
- container.appendChild(renderer.mount(renderable, context));
293
- });
294
- const html = container.innerHTML;
295
- mountedComponents.forEach((component) => {
296
- component.unmount();
297
- });
298
- return html;
299
- }
300
- function renderHeadElement(element) {
301
- const attributes = renderAttributes(element.attributes);
302
- if (VOID_HEAD_TAGS.has(element.tag) && !element.text) {
303
- return `<${element.tag}${attributes}>`;
304
- }
305
- return `<${element.tag}${attributes}>${escapeHtml(element.text ?? "")}</${element.tag}>`;
306
- }
307
- function renderScript(script) {
308
- const attributes = renderAttributes({
309
- type: script.type,
310
- src: script.src,
311
- async: script.async,
312
- defer: script.defer,
313
- ...script.attributes ?? {}
314
- });
315
- return `<script${attributes}></script>`;
316
- }
317
- function renderAttributes(attributes = {}) {
318
- const rendered = Object.entries(attributes).flatMap(([name, value]) => {
319
- if (value === false || value === null || value === undefined) {
320
- return [];
321
- }
322
- return value === true ? [name] : [`${name}="${escapeHtml(String(value))}"`];
323
- }).join(" ");
324
- return rendered ? ` ${rendered}` : "";
325
- }
326
- function escapeHtml(value) {
327
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
328
- }
329
424
  // lib/core/form.ts
330
425
  function errorMessage(error) {
331
426
  return error instanceof Error ? error.message : String(error);
@@ -393,6 +488,27 @@ function createForm(model, rules) {
393
488
  }
394
489
  };
395
490
  }
491
+ // lib/core/animation/TransitionGroup.ts
492
+ class TransitionGroup extends Component {
493
+ initState() {
494
+ return {};
495
+ }
496
+ initStyles() {}
497
+ render() {
498
+ const { tag, type, duration } = normalizeTransitionGroupProps(this.props);
499
+ const children = validateTransitionGroupChildren(this.props.children ?? []);
500
+ return {
501
+ tag,
502
+ props: this.props.elementProps,
503
+ listeners: this.props.listeners,
504
+ children,
505
+ transitionGroup: {
506
+ type,
507
+ duration
508
+ }
509
+ };
510
+ }
511
+ }
396
512
  // lib/index.ts
397
513
  function createApp(options = {}) {
398
514
  return new OneApp(options);
@@ -431,25 +547,62 @@ export {
431
547
  createComponent,
432
548
  createApp,
433
549
  computed,
550
+ Ul,
551
+ TransitionGroup,
552
+ Tr,
553
+ Thead,
554
+ Th,
555
+ Textarea,
434
556
  TextRenderStrategy,
435
557
  TemplateEngine,
558
+ Td,
559
+ Tbody,
560
+ Tag,
561
+ Table,
562
+ Strong,
436
563
  Span,
564
+ Small,
437
565
  SlotRenderStrategy,
566
+ Select,
567
+ Section,
438
568
  RouterView,
439
569
  RouterLink,
440
570
  Router,
441
571
  RendererContext,
442
572
  ReactiveSystem,
573
+ Pre,
443
574
  P,
575
+ Option,
444
576
  OneApp,
577
+ Ol,
578
+ Nav,
445
579
  ModelBindingController,
580
+ Main,
581
+ Li,
582
+ Label,
446
583
  Input,
584
+ Img,
585
+ Header,
586
+ H6,
587
+ H5,
588
+ H4,
589
+ H3,
590
+ H2,
591
+ H1,
592
+ Form,
593
+ Footer,
594
+ Em,
447
595
  ElementRenderStrategy,
448
596
  Div,
449
597
  ComponentRenderStrategy,
450
598
  Component,
451
- Button
599
+ Code,
600
+ Button,
601
+ Blockquote,
602
+ Aside,
603
+ Article,
604
+ A
452
605
  };
453
606
 
454
- //# debugId=56537F263323AD5364756E2164756E21
607
+ //# debugId=7471E8A79DBDD62164756E2164756E21
455
608
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../lib/core/app.ts", "../lib/core/document.ts", "../lib/core/form.ts", "../lib/index.ts"],
3
+ "sources": ["../lib/core/document.ts", "../lib/core/app.ts", "../lib/core/form.ts", "../lib/core/animation/TransitionGroup.ts", "../lib/index.ts"],
4
4
  "sourcesContent": [
5
- "import {\n Component,\n ComponentConstructor,\n InjectionKey,\n InjectionResult,\n} from './component';\nimport type { Router } from '../router';\n\nimport { TemplateEngine } from './template';\n\n// 插件接口定义\nexport interface Plugin {\n install: (app: OneApp, ...args: unknown[]) => void;\n onMounted?: (app: OneApp) => void;\n onUpdated?: (app: OneApp) => void;\n onBeforeUnmount?: (app: OneApp) => void;\n}\n\n// 泛型化AppOptions接口\nexport interface AppOptions<\n TState = Record<string, unknown>,\n TConfig = Record<string, unknown>,\n> {\n /** 根组件构造函数 */\n root?: ComponentConstructor;\n /** 应用挂载点 */\n rootElement?: string | Element;\n /** 全局状态 */\n state?: TState;\n /** 全局配置 */\n config?: TConfig;\n}\n\n// 泛型化AppContext接口\nexport interface AppContext<TConfig = Record<string, unknown>> {\n app: OneApp;\n version: string;\n config: TConfig;\n router?: Router;\n}\n\n// 泛型化OneApp类\nexport class OneApp<\n TState extends object = Record<string, unknown>,\n TConfig extends object = Record<string, unknown>,\n> {\n private container: HTMLElement;\n private rootInstance: Component | null = null;\n private mounted: boolean = false;\n private templateEngine: TemplateEngine | null = null;\n private readonly appContext: AppContext<TConfig>;\n private readonly providers = new Map<string | symbol, unknown>();\n private plugins: Array<{ plugin: Plugin; args: unknown[] }> = [];\n private unmountedCallback?: () => void;\n public router?: Router;\n\n constructor(private options: AppOptions<TState, TConfig> = {}) {\n // 默认使用 body 作为容器\n this.container = document.body;\n\n this.appContext = {\n app: this as unknown as OneApp,\n version: '0.0.2',\n config: options.config || ({} as TConfig),\n };\n }\n\n private handleError(error: Error): void {\n console.error('应用错误:', error);\n // 渲染错误UI\n this.renderErrorUI(error);\n // 不立即卸载应用,而是显示错误信息\n }\n\n /**\n * 渲染错误UI\n */\n private renderErrorUI(error: Error): void {\n this.container.innerHTML = `\n <div style=\"padding: 20px; background-color: #ffebee; color: #c62828; font-family: Arial, sans-serif;\">\n <h3>应用错误</h3>\n <p>${error.message}</p>\n <pre style=\"background-color: #fff; padding: 10px; border-radius: 4px; overflow: auto;\">${error.stack}</pre>\n </div>\n `;\n }\n\n /**\n * 使用插件\n */\n public use(plugin: Plugin, ...args: unknown[]): this {\n if (typeof plugin.install !== 'function') {\n throw new Error('插件必须提供 install 方法');\n }\n plugin.install(this as unknown as OneApp, ...args);\n this.plugins.push({ plugin, args });\n return this;\n }\n\n /**\n * 挂载应用\n */\n public mount(): void {\n if (this.mounted) {\n console.warn('应用已经处于运行状态');\n return;\n }\n\n try {\n // 添加全局应用实例\n (globalThis as { __APP__?: unknown }).__APP__ = this;\n\n // 确定挂载点\n if (this.options.rootElement) {\n const rootElement = this.resolveRootElement(this.options.rootElement);\n if (rootElement) {\n this.container = rootElement as HTMLElement;\n } else {\n throw new Error(`无法找到挂载点: ${this.options.rootElement}`);\n }\n }\n\n // 只有在有根组件时才创建实例\n if (this.options.root) {\n this.rootInstance = new this.options.root();\n\n // 设置应用上下文\n if ('setAppContext' in this.rootInstance) {\n this.rootInstance.setAppContext(this.appContext);\n }\n\n // 如果有全局状态,传递给组件\n if (this.options.state && 'setState' in this.rootInstance) {\n this.rootInstance.setState(this.options.state);\n }\n\n this.rootInstance.mount(this.container);\n\n // 创建模板引擎实例\n this.templateEngine = new TemplateEngine(this.options.state || {});\n }\n\n this.mounted = true;\n\n // 触发生命周期钩子\n this.onMounted();\n } catch (error) {\n this.handleError(error as Error);\n }\n }\n\n /**\n * 卸载应用\n */\n public unmount(): void {\n if (!this.mounted) {\n console.warn('应用未处于运行状态');\n return;\n }\n\n try {\n // 触发卸载前钩子\n this.onBeforeUnmount();\n\n if (this.rootInstance) {\n // 调用组件卸载方法\n if ('unmount' in this.rootInstance) {\n this.rootInstance.unmount();\n }\n\n this.rootInstance = null;\n this.mounted = false;\n delete (globalThis as { __APP__?: unknown }).__APP__;\n }\n\n // 清除模板引擎\n if (this.templateEngine) {\n this.templateEngine.clearBindings();\n this.templateEngine = null;\n }\n\n // 清空容器\n this.container.innerHTML = '';\n\n // 触发卸载后钩子\n if (this.unmountedCallback) {\n this.unmountedCallback();\n }\n } catch (error) {\n console.error('Failed to unmount app:', error);\n }\n }\n\n /**\n * 应用是否正在运行\n */\n public isRunning(): boolean {\n return this.mounted;\n }\n\n /**\n * 更新根组件\n */\n public updateRootComponent(component: ComponentConstructor): void {\n if (this.mounted) {\n this.unmount();\n }\n this.options.root = component;\n this.mount();\n }\n\n /**\n * 更新应用状态\n */\n public update(state?: Partial<TState>): this {\n if (!this.mounted) {\n console.warn('Cannot update unmounted app');\n return this;\n }\n\n try {\n // 更新状态\n if (state && this.options.state) {\n this.options.state = { ...this.options.state, ...state };\n\n // 更新组件状态\n if (this.rootInstance && 'setState' in this.rootInstance) {\n this.rootInstance.setState(state);\n }\n\n // 更新模板引擎状态\n if (this.templateEngine) {\n // 如果存在templateEngine,更新其状态\n this.templateEngine.state = this.options.state;\n }\n }\n\n // 触发更新钩子\n this.onUpdated();\n } catch (error) {\n console.error('Failed to update app:', error);\n }\n\n return this;\n }\n\n /**\n * 获取应用上下文\n */\n public getContext(): AppContext<TConfig> {\n return this.appContext;\n }\n\n public provide<T>(key: InjectionKey<T>, value: T): this {\n this.providers.set(key, value);\n return this;\n }\n\n public inject<T>(key: InjectionKey<T>): T | undefined;\n public inject<T>(key: InjectionKey<T>, fallback: T): T;\n public inject<T>(key: InjectionKey<T>, fallback?: T): T | undefined {\n const result = this.resolveInjection(key);\n return result.found ? result.value : fallback;\n }\n\n public resolveInjection<T>(key: InjectionKey<T>): InjectionResult<T> {\n if (!this.providers.has(key)) {\n return { found: false, value: undefined };\n }\n\n return { found: true, value: this.providers.get(key) as T | undefined };\n }\n\n /**\n * 获取应用状态\n */\n public getState(): TState | undefined {\n return this.options.state;\n }\n\n /**\n * 设置应用状态\n */\n public setState(newState: TState): this {\n this.options.state = newState;\n if (this.mounted) {\n this.update();\n }\n return this;\n }\n\n /**\n * 监听应用卸载\n */\n public onUnmounted(callback: () => void): this {\n this.unmountedCallback = callback;\n return this;\n }\n\n /**\n * 解析根元素\n */\n private resolveRootElement(selector?: string | Element): Element | null {\n if (!selector) {\n return null;\n }\n\n if (typeof selector === 'string') {\n return document.querySelector(selector);\n }\n\n return selector instanceof Element ? selector : null;\n }\n\n // 生命周期钩子\n private onMounted(): void {\n // 触发插件的mounted钩子\n this.plugins.forEach(({ plugin: pluginObj }) => {\n if (pluginObj && typeof pluginObj.onMounted === 'function') {\n pluginObj.onMounted(this as unknown as OneApp);\n }\n });\n }\n\n private onUpdated(): void {\n // 触发插件的updated钩子\n this.plugins.forEach(({ plugin: pluginObj }) => {\n if (pluginObj && typeof pluginObj.onUpdated === 'function') {\n pluginObj.onUpdated(this as unknown as OneApp);\n }\n });\n }\n\n private onBeforeUnmount(): void {\n // 触发插件的beforeUnmount钩子\n this.plugins.forEach(({ plugin: pluginObj }) => {\n if (pluginObj && typeof pluginObj.onBeforeUnmount === 'function') {\n pluginObj.onBeforeUnmount(this as unknown as OneApp);\n }\n });\n }\n}\n\n/**\n * 创建应用实例\n */\nexport function createApp<\n TState extends object = Record<string, unknown>,\n TConfig extends object = Record<string, unknown>,\n>(options: AppOptions<TState, TConfig> = {}): OneApp<TState, TConfig> {\n return new OneApp<TState, TConfig>(options);\n}\n",
6
5
  "import { RendererContext } from './renderer';\nimport type { ComponentInstance, Renderable } from './renderer/types';\nimport { TemplateEngine } from './template';\nimport { renderStyleSheet, type StyleSheet } from '../style/sheet';\n\nexport {\n renderStyleSheet,\n type StyleAtRule,\n type StyleProperties,\n type StyleRule,\n type StyleSheet,\n type StyleSheetEntry,\n type StyleValue,\n} from '../style/sheet';\n\nexport type HtmlAttributeValue = string | number | boolean | null | undefined;\n\nexport type HtmlAttributes = Record<string, HtmlAttributeValue>;\n\nexport type HtmlDocumentBody = Renderable | Renderable[];\n\nexport interface HtmlHeadElement {\n tag: string;\n attributes?: HtmlAttributes;\n text?: string;\n}\n\nexport interface HtmlScript {\n src: string;\n type?: string;\n async?: boolean;\n defer?: boolean;\n attributes?: HtmlAttributes;\n}\n\nexport interface HtmlDocumentOptions {\n title: string;\n body: HtmlDocumentBody;\n lang?: string;\n charset?: string;\n viewport?: string;\n description?: string;\n htmlAttributes?: HtmlAttributes;\n bodyAttributes?: HtmlAttributes;\n head?: HtmlHeadElement[];\n styles?: StyleSheet;\n scripts?: HtmlScript[];\n}\n\nconst VOID_HEAD_TAGS = new Set(['base', 'link', 'meta']);\n\nexport function renderHtmlDocument(options: HtmlDocumentOptions): string {\n const lang = options.lang ?? 'en';\n const charset = options.charset ?? 'utf-8';\n const viewport = options.viewport ?? 'width=device-width, initial-scale=1';\n const htmlAttributes = renderAttributes({\n lang,\n ...(options.htmlAttributes ?? {}),\n });\n const bodyAttributes = renderAttributes(options.bodyAttributes);\n const bodyHtml = renderDocumentBody(options.body);\n\n return [\n '<!doctype html>',\n `<html${htmlAttributes}>`,\n '<head>',\n ` <meta charset=\"${escapeHtml(charset)}\">`,\n ` <meta name=\"viewport\" content=\"${escapeHtml(viewport)}\">`,\n ` <title>${escapeHtml(options.title)}</title>`,\n options.description\n ? ` <meta name=\"description\" content=\"${escapeHtml(\n options.description\n )}\">`\n : '',\n ...(options.head ?? []).map((element) => ` ${renderHeadElement(element)}`),\n options.styles && options.styles.length > 0\n ? ` <style>${renderStyleSheet(options.styles)}</style>`\n : '',\n '</head>',\n `<body${bodyAttributes}>`,\n bodyHtml,\n ...(options.scripts ?? []).map((script) => ` ${renderScript(script)}`),\n '</body>',\n '</html>',\n ]\n .filter((line) => line !== '')\n .join('\\n');\n}\n\nfunction renderDocumentBody(body: HtmlDocumentBody): string {\n if (typeof document === 'undefined') {\n throw new Error('renderHtmlDocument requires a DOM-like document');\n }\n\n const container = document.createElement('div');\n const renderer = new RendererContext();\n const mountedComponents = new Set<ComponentInstance>();\n const renderables = Array.isArray(body) ? body : [body];\n const context = {\n templateEngine: new TemplateEngine({}),\n renderer,\n slots: { default: [] },\n registerChild: (component: ComponentInstance) => {\n mountedComponents.add(component);\n },\n unregisterChild: (component: ComponentInstance) => {\n mountedComponents.delete(component);\n },\n };\n\n renderables.forEach((renderable) => {\n container.appendChild(renderer.mount(renderable, context));\n });\n\n const html = container.innerHTML;\n mountedComponents.forEach((component) => {\n component.unmount();\n });\n\n return html;\n}\n\nfunction renderHeadElement(element: HtmlHeadElement): string {\n const attributes = renderAttributes(element.attributes);\n if (VOID_HEAD_TAGS.has(element.tag) && !element.text) {\n return `<${element.tag}${attributes}>`;\n }\n\n return `<${element.tag}${attributes}>${escapeHtml(\n element.text ?? ''\n )}</${element.tag}>`;\n}\n\nfunction renderScript(script: HtmlScript): string {\n const attributes = renderAttributes({\n type: script.type,\n src: script.src,\n async: script.async,\n defer: script.defer,\n ...(script.attributes ?? {}),\n });\n\n return `<script${attributes}></script>`;\n}\n\nfunction renderAttributes(attributes: HtmlAttributes = {}): string {\n const rendered = Object.entries(attributes)\n .flatMap(([name, value]) => {\n if (value === false || value === null || value === undefined) {\n return [];\n }\n\n return value === true\n ? [name]\n : [`${name}=\"${escapeHtml(String(value))}\"`];\n })\n .join(' ');\n\n return rendered ? ` ${rendered}` : '';\n}\n\nfunction escapeHtml(value: string): string {\n return value\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;');\n}\n",
6
+ "import {\n Component,\n ComponentConstructor,\n ComponentProps,\n InjectionKey,\n InjectionResult,\n} from './component';\nimport {\n renderHtmlDocument as renderDocumentShell,\n type HtmlDocumentBody,\n type HtmlDocumentOptions,\n type HtmlScript,\n} from './document';\nimport { Div } from './vnode';\nimport type { Router } from '../router';\n\nimport { TemplateEngine } from './template';\n\nconst DEFAULT_ROOT_ELEMENT = '#app';\n\n// 插件接口定义\nexport interface Plugin {\n install: (app: OneApp, ...args: unknown[]) => void;\n onMounted?: (app: OneApp) => void;\n onUpdated?: (app: OneApp) => void;\n onBeforeUnmount?: (app: OneApp) => void;\n}\n\nexport type AppDocumentOptions = Partial<Omit<HtmlDocumentOptions, 'body'>> & {\n body?: HtmlDocumentBody;\n};\n\nexport type AppDocumentRenderOptions = AppDocumentOptions;\n\n// 泛型化AppOptions接口\nexport interface AppOptions<\n TState = Record<string, unknown>,\n TConfig = Record<string, unknown>,\n TRootProps extends ComponentProps = ComponentProps,\n> {\n /** 根组件构造函数 */\n root?: ComponentConstructor<TRootProps>;\n /** 根组件 props */\n rootProps?: TRootProps;\n /** 应用挂载点,默认 #app */\n rootElement?: string | Element;\n /** 全局状态 */\n state?: TState;\n /** 全局配置 */\n config?: TConfig;\n /** HTML 文档壳配置,用于 dev/build 生成入口页面 */\n document?: AppDocumentOptions;\n}\n\n// 泛型化AppContext接口\nexport interface AppContext<TConfig = Record<string, unknown>> {\n app: OneApp;\n version: string;\n config: TConfig;\n router?: Router;\n}\n\n// 泛型化OneApp类\nexport class OneApp<\n TState extends object = Record<string, unknown>,\n TConfig extends object = Record<string, unknown>,\n TRootProps extends ComponentProps = ComponentProps,\n> {\n private container: HTMLElement | null = null;\n private rootInstance: Component | null = null;\n private mounted: boolean = false;\n private templateEngine: TemplateEngine | null = null;\n private readonly appContext: AppContext<TConfig>;\n private readonly providers = new Map<string | symbol, unknown>();\n private plugins: Array<{ plugin: Plugin; args: unknown[] }> = [];\n private unmountedCallback?: () => void;\n public router?: Router;\n\n constructor(private options: AppOptions<TState, TConfig, TRootProps> = {}) {\n this.appContext = {\n app: this as unknown as OneApp,\n version: '0.0.2',\n config: options.config || ({} as TConfig),\n };\n }\n\n private handleError(error: Error): void {\n console.error('应用错误:', error);\n // 渲染错误UI\n this.renderErrorUI(error);\n // 不立即卸载应用,而是显示错误信息\n }\n\n /**\n * 渲染错误UI\n */\n private renderErrorUI(error: Error): void {\n if (!this.container) {\n return;\n }\n\n this.container.innerHTML = `\n <div style=\"padding: 20px; background-color: #ffebee; color: #c62828; font-family: Arial, sans-serif;\">\n <h3>应用错误</h3>\n <p>${error.message}</p>\n <pre style=\"background-color: #fff; padding: 10px; border-radius: 4px; overflow: auto;\">${error.stack}</pre>\n </div>\n `;\n }\n\n /**\n * 使用插件\n */\n public use(plugin: Plugin, ...args: unknown[]): this {\n if (typeof plugin.install !== 'function') {\n throw new Error('插件必须提供 install 方法');\n }\n plugin.install(this as unknown as OneApp, ...args);\n this.plugins.push({ plugin, args });\n return this;\n }\n\n /**\n * 挂载应用\n */\n public mount(): void {\n if (this.mounted) {\n console.warn('应用已经处于运行状态');\n return;\n }\n\n const mountContainer = this.resolveMountContainer();\n if (!mountContainer) {\n return;\n }\n\n try {\n this.container = mountContainer;\n\n // 添加全局应用实例\n (globalThis as { __APP__?: unknown }).__APP__ = this;\n\n // 只有在有根组件时才创建实例\n if (this.options.root) {\n this.rootInstance = new this.options.root(this.options.rootProps);\n\n // 设置应用上下文\n if ('setAppContext' in this.rootInstance) {\n this.rootInstance.setAppContext(this.appContext);\n }\n\n // 如果有全局状态,传递给组件\n if (this.options.state && 'setState' in this.rootInstance) {\n this.rootInstance.setState(this.options.state);\n }\n\n this.rootInstance.mount(this.container);\n\n // 创建模板引擎实例\n this.templateEngine = new TemplateEngine(this.options.state || {});\n }\n\n this.mounted = true;\n\n // 触发生命周期钩子\n this.onMounted();\n } catch (error) {\n this.handleError(error as Error);\n }\n }\n\n /**\n * 卸载应用\n */\n public unmount(): void {\n if (!this.mounted) {\n console.warn('应用未处于运行状态');\n return;\n }\n\n try {\n // 触发卸载前钩子\n this.onBeforeUnmount();\n\n if (this.rootInstance) {\n // 调用组件卸载方法\n if ('unmount' in this.rootInstance) {\n this.rootInstance.unmount();\n }\n\n this.rootInstance = null;\n this.mounted = false;\n delete (globalThis as { __APP__?: unknown }).__APP__;\n }\n\n // 清除模板引擎\n if (this.templateEngine) {\n this.templateEngine.clearBindings();\n this.templateEngine = null;\n }\n\n // 清空容器\n if (this.container) {\n this.container.innerHTML = '';\n }\n\n // 触发卸载后钩子\n if (this.unmountedCallback) {\n this.unmountedCallback();\n }\n } catch (error) {\n console.error('Failed to unmount app:', error);\n }\n }\n\n /**\n * 应用是否正在运行\n */\n public isRunning(): boolean {\n return this.mounted;\n }\n\n /**\n * 更新根组件\n */\n public updateRootComponent(\n component: ComponentConstructor<TRootProps>\n ): void {\n if (this.mounted) {\n this.unmount();\n }\n this.options.root = component;\n this.mount();\n }\n\n /**\n * 更新应用状态\n */\n public update(state?: Partial<TState>): this {\n if (!this.mounted) {\n console.warn('Cannot update unmounted app');\n return this;\n }\n\n try {\n // 更新状态\n if (state && this.options.state) {\n this.options.state = { ...this.options.state, ...state };\n\n // 更新组件状态\n if (this.rootInstance && 'setState' in this.rootInstance) {\n this.rootInstance.setState(state);\n }\n\n // 更新模板引擎状态\n if (this.templateEngine) {\n // 如果存在templateEngine,更新其状态\n this.templateEngine.state = this.options.state;\n }\n }\n\n // 触发更新钩子\n this.onUpdated();\n } catch (error) {\n console.error('Failed to update app:', error);\n }\n\n return this;\n }\n\n /**\n * 获取应用上下文\n */\n public getContext(): AppContext<TConfig> {\n return this.appContext;\n }\n\n public provide<T>(key: InjectionKey<T>, value: T): this {\n this.providers.set(key, value);\n return this;\n }\n\n public inject<T>(key: InjectionKey<T>): T | undefined;\n public inject<T>(key: InjectionKey<T>, fallback: T): T;\n public inject<T>(key: InjectionKey<T>, fallback?: T): T | undefined {\n const result = this.resolveInjection(key);\n return result.found ? result.value : fallback;\n }\n\n public resolveInjection<T>(key: InjectionKey<T>): InjectionResult<T> {\n if (!this.providers.has(key)) {\n return { found: false, value: undefined };\n }\n\n return { found: true, value: this.providers.get(key) as T | undefined };\n }\n\n /**\n * 获取应用状态\n */\n public getState(): TState | undefined {\n return this.options.state;\n }\n\n /**\n * 设置应用状态\n */\n public setState(newState: TState): this {\n this.options.state = newState;\n if (this.mounted) {\n this.update();\n }\n return this;\n }\n\n /**\n * 监听应用卸载\n */\n public onUnmounted(callback: () => void): this {\n this.unmountedCallback = callback;\n return this;\n }\n\n /**\n * 生成应用入口 HTML 文档\n */\n public renderHtmlDocument(options: AppDocumentRenderOptions = {}): string {\n const appDocument = this.options.document ?? {};\n const scripts = this.mergeDocumentScripts(\n appDocument.scripts,\n options.scripts\n );\n\n return renderDocumentShell({\n ...appDocument,\n ...options,\n title: options.title ?? appDocument.title ?? 'TSone App',\n body: options.body ?? appDocument.body ?? this.createMountDocumentBody(),\n scripts,\n });\n }\n\n /**\n * 解析根元素\n */\n private resolveRootElement(selector?: string | Element): Element | null {\n if (!selector) {\n return null;\n }\n\n if (typeof selector === 'string') {\n if (typeof document === 'undefined') {\n return null;\n }\n\n return document.querySelector(selector);\n }\n\n return typeof Element !== 'undefined' && selector instanceof Element\n ? selector\n : null;\n }\n\n private resolveMountContainer(): HTMLElement | null {\n if (typeof document === 'undefined') {\n return null;\n }\n\n const rootElement = this.resolveRootElement(\n this.options.rootElement ?? DEFAULT_ROOT_ELEMENT\n );\n return rootElement instanceof HTMLElement ? rootElement : null;\n }\n\n private createMountDocumentBody(): HtmlDocumentBody {\n const rootElement = this.options.rootElement ?? DEFAULT_ROOT_ELEMENT;\n\n if (typeof rootElement === 'string') {\n return this.createMountElementFromSelector(rootElement);\n }\n\n if (typeof Element !== 'undefined' && rootElement instanceof Element) {\n const props: Record<string, string> = {};\n if (rootElement.id) {\n props.id = rootElement.id;\n }\n if (rootElement.className) {\n props.className = rootElement.className;\n }\n\n return { tag: rootElement.tagName.toLowerCase(), props };\n }\n\n return Div({ props: { id: 'app' } });\n }\n\n private createMountElementFromSelector(selector: string): HtmlDocumentBody {\n if (selector.startsWith('#') && selector.length > 1) {\n return Div({ props: { id: selector.slice(1) } });\n }\n\n if (selector.startsWith('.') && selector.length > 1) {\n return Div({ props: { className: selector.slice(1) } });\n }\n\n return Div({ props: { 'data-tsone-root': selector } });\n }\n\n private mergeDocumentScripts(\n baseScripts?: HtmlScript[],\n extraScripts?: HtmlScript[]\n ): HtmlScript[] | undefined {\n if (!baseScripts && !extraScripts) {\n return undefined;\n }\n\n return [...(baseScripts ?? []), ...(extraScripts ?? [])];\n }\n\n // 生命周期钩子\n private onMounted(): void {\n // 触发插件的mounted钩子\n this.plugins.forEach(({ plugin: pluginObj }) => {\n if (pluginObj && typeof pluginObj.onMounted === 'function') {\n pluginObj.onMounted(this as unknown as OneApp);\n }\n });\n }\n\n private onUpdated(): void {\n // 触发插件的updated钩子\n this.plugins.forEach(({ plugin: pluginObj }) => {\n if (pluginObj && typeof pluginObj.onUpdated === 'function') {\n pluginObj.onUpdated(this as unknown as OneApp);\n }\n });\n }\n\n private onBeforeUnmount(): void {\n // 触发插件的beforeUnmount钩子\n this.plugins.forEach(({ plugin: pluginObj }) => {\n if (pluginObj && typeof pluginObj.onBeforeUnmount === 'function') {\n pluginObj.onBeforeUnmount(this as unknown as OneApp);\n }\n });\n }\n}\n\n/**\n * 创建应用实例\n */\nexport function createApp<\n TState extends object = Record<string, unknown>,\n TConfig extends object = Record<string, unknown>,\n TRootProps extends ComponentProps = ComponentProps,\n>(\n options: AppOptions<TState, TConfig, TRootProps> = {}\n): OneApp<TState, TConfig, TRootProps> {\n return new OneApp<TState, TConfig, TRootProps>(options);\n}\n",
7
7
  "import { getModelValue } from './model';\n\nexport type ValidationResult = boolean | string;\n\nexport type ValidationRule<T = unknown> = (\n value: T,\n model: object\n) => ValidationResult;\n\nexport type ValidationRules<TModel extends object> = {\n [TPath in keyof TModel & string]?: readonly ValidationRule[];\n} & Record<string, readonly ValidationRule[] | undefined>;\n\nexport interface FieldValidationResult {\n valid: boolean;\n errors: string[];\n}\n\nexport interface FormValidationResult {\n valid: boolean;\n errors: Record<string, string[]>;\n}\n\nexport interface FormController<TModel extends object> {\n readonly model: TModel;\n readonly errors: Record<string, string[]>;\n validate(): FormValidationResult;\n validateField(path: string): FieldValidationResult;\n resetErrors(): void;\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nfunction runRule(\n rule: ValidationRule,\n value: unknown,\n model: object\n): string | undefined {\n try {\n const result = rule(value, model);\n if (result === true) {\n return undefined;\n }\n return result === false ? 'Validation failed' : result;\n } catch (error) {\n return errorMessage(error);\n }\n}\n\nexport function required(message = 'This field is required'): ValidationRule {\n return (value) => {\n if (value === null || value === undefined) {\n return message;\n }\n if (typeof value === 'string' && value.trim().length === 0) {\n return message;\n }\n if (Array.isArray(value) && value.length === 0) {\n return message;\n }\n return true;\n };\n}\n\nexport function minLength(\n length: number,\n message = `Must be at least ${length} characters`\n): ValidationRule {\n return (value) =>\n typeof value === 'string' && value.length >= length ? true : message;\n}\n\nexport function validate(rule: ValidationRule): ValidationRule {\n return rule;\n}\n\nexport function createForm<TModel extends object>(\n model: TModel,\n rules: ValidationRules<TModel>\n): FormController<TModel> {\n const errors: Record<string, string[]> = {};\n\n const validateField = (path: string): FieldValidationResult => {\n const fieldRules = rules[path] ?? [];\n const value = getModelValue(model as Record<string, unknown>, path);\n const fieldErrors = fieldRules\n .map((rule) => runRule(rule, value, model))\n .filter((message): message is string => message !== undefined);\n\n if (fieldErrors.length === 0) {\n delete errors[path];\n } else {\n errors[path] = fieldErrors;\n }\n\n return { valid: fieldErrors.length === 0, errors: fieldErrors };\n };\n\n return {\n model,\n errors,\n validate(): FormValidationResult {\n const allErrors: Record<string, string[]> = {};\n Object.keys(rules).forEach((path) => {\n const result = validateField(path);\n if (!result.valid) {\n allErrors[path] = result.errors;\n }\n });\n return { valid: Object.keys(allErrors).length === 0, errors: allErrors };\n },\n validateField,\n resetErrors(): void {\n Object.keys(errors).forEach((path) => delete errors[path]);\n },\n };\n}\n",
8
- "import { OneApp, AppOptions } from './core/app';\n\n// 导出核心功能\nexport * from './core';\n\n// 导出路由功能\nexport * from './router';\n\n// 创建应用实例的主函数\nexport function createApp(options: AppOptions = {}): OneApp {\n return new OneApp(options);\n}\n\n// 导出框架名称和版本\nexport const version = '0.0.2';\nexport const name = '@geektech/tsone';\n"
8
+ "import { Component } from '../component';\nimport {\n normalizeTransitionGroupProps,\n validateTransitionGroupChildren,\n type TransitionGroupNode,\n type TransitionGroupProps,\n} from './types';\n\nexport class TransitionGroup extends Component<TransitionGroupProps> {\n protected initState(): object {\n return {};\n }\n\n protected initStyles(): void {}\n\n protected render(): TransitionGroupNode {\n const { tag, type, duration } = normalizeTransitionGroupProps(this.props);\n const children = validateTransitionGroupChildren(this.props.children ?? []);\n\n return {\n tag,\n props: this.props.elementProps,\n listeners: this.props.listeners,\n children,\n transitionGroup: {\n type,\n duration,\n },\n };\n }\n}\n",
9
+ "import { OneApp, AppOptions } from './core/app';\nimport type { ComponentProps } from './core/component';\n\n// 导出核心功能\nexport * from './core';\n\n// 导出路由功能\nexport * from './router';\n\n// 创建应用实例的主函数\nexport function createApp<\n TState extends object = Record<string, unknown>,\n TConfig extends object = Record<string, unknown>,\n TRootProps extends ComponentProps = ComponentProps,\n>(\n options: AppOptions<TState, TConfig, TRootProps> = {}\n): OneApp<TState, TConfig, TRootProps> {\n return new OneApp(options);\n}\n\n// 导出框架名称和版本\nexport const version = '0.0.2';\nexport const name = '@geektech/tsone';\n"
9
10
  ],
10
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CO,MAAM,OAGX;AAAA,EAWoB;AAAA,EAVZ;AAAA,EACA,eAAiC;AAAA,EACjC,UAAmB;AAAA,EACnB,iBAAwC;AAAA,EAC/B;AAAA,EACA,YAAY,IAAI;AAAA,EACzB,UAAsD,CAAC;AAAA,EACvD;AAAA,EACD;AAAA,E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B;AAAA,OACD;AAAA,MACD,OAAO,EAAE,OAAO,OAAO,KAAK,SAAS,EAAE,WAAW,GAAG,QAAQ,UAAU;AAAA;AAAA,IAEzE;AAAA,IACA,WAAW,GAAS;AAAA,MAClB,OAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,SAAS,OAAO,OAAO,KAAK;AAAA;AAAA,EAE7D;AAAA;;AC7GK,MAAM,wBAAwB,UAAgC;AAAA,EACzD,SAAS,GAAW;AAAA,IAC5B,OAAO,CAAC;AAAA;AAAA,EAGA,UAAU,GAAS;AAAA,EAEnB,MAAM,GAAwB;AAAA,IACtC,QAAQ,KAAK,MAAM,aAAa,8BAA8B,KAAK,KAAK;AAAA,IACxE,MAAM,WAAW,gCAAgC,KAAK,MAAM,YAAY,CAAC,CAAC;AAAA,IAE1E,OAAO;AAAA,MACL;AAAA,MACA,OAAO,KAAK,MAAM;AAAA,MAClB,WAAW,KAAK,MAAM;AAAA,MACtB;AAAA,MACA,iBAAiB;AAAA,QACf;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA;AAEJ;;ACpBO,SAAS,SAIf,CACC,UAAmD,CAAC,GACf;AAAA,EACrC,OAAO,IAAI,OAAO,OAAO;AAAA;AAIpB,IAAM,UAAU;AAChB,IAAM,OAAO;",
12
+ "debugId": "7471E8A79DBDD62164756E2164756E21",
12
13
  "names": []
13
14
  }
@@ -4,7 +4,7 @@ import {
4
4
  RouterView,
5
5
  createRouter,
6
6
  useRouter
7
- } from "../index-ycmc7ga1.js";
7
+ } from "../index-wv9gyjqt.js";
8
8
  import"../index-8wjswsye.js";
9
9
  export {
10
10
  useRouter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geektech/tsone",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "description": "TSone 是轻量级纯 TypeScript 前端框架,提供响应式系统、类组件、策略化渲染和路由功能",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,7 +21,6 @@
21
21
  }
22
22
  },
23
23
  "scripts": {
24
- "dev": "bun scripts/dev.ts",
25
24
  "docs": "bun scripts/docs.ts",
26
25
  "build": "bun scripts/build.ts",
27
26
  "build:types": "bunx tsc --project tsconfig.build.json",
@@ -47,6 +46,7 @@
47
46
  "files": [
48
47
  "dist",
49
48
  "README.md",
49
+ "README-zh.md",
50
50
  "LICENSE"
51
51
  ],
52
52
  "publishConfig": {