@avento-space/ts-ui 1.1.1 → 1.2.1

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.
Files changed (140) hide show
  1. package/dist/chunk-42QSY3LJ.js +4855 -0
  2. package/dist/chunk-42QSY3LJ.js.map +1 -0
  3. package/dist/chunk-7GJXOXOW.js +108 -0
  4. package/dist/chunk-7GJXOXOW.js.map +1 -0
  5. package/dist/chunk-DO3PEBDS.js +79 -0
  6. package/dist/chunk-DO3PEBDS.js.map +1 -0
  7. package/dist/chunk-MFONNOJU.js +3 -0
  8. package/dist/chunk-MFONNOJU.js.map +1 -0
  9. package/dist/chunk-NJAZMTMT.js +5645 -0
  10. package/dist/chunk-NJAZMTMT.js.map +1 -0
  11. package/dist/chunk-PRZASPFU.js +1730 -0
  12. package/dist/chunk-PRZASPFU.js.map +1 -0
  13. package/dist/chunk-Q5RCPPCF.js +406 -0
  14. package/dist/chunk-Q5RCPPCF.js.map +1 -0
  15. package/dist/chunk-RAWESWNC.js +3 -0
  16. package/dist/chunk-RAWESWNC.js.map +1 -0
  17. package/dist/chunk-U4WYCYL6.js +116 -0
  18. package/dist/chunk-U4WYCYL6.js.map +1 -0
  19. package/dist/components/index.d.ts +13 -11
  20. package/dist/components/index.js +5 -5
  21. package/dist/components/index.js.map +1 -1
  22. package/dist/define.d.ts +2 -2
  23. package/dist/define.js +8 -1
  24. package/dist/define.js.map +1 -1
  25. package/dist/{core/element.d.ts → element-DHtonJNX.d.ts} +3 -2
  26. package/dist/form.wc-CwjVsdUu.d.ts +1518 -0
  27. package/dist/icons/index.d.ts +33 -5
  28. package/dist/icons/index.js +5 -3
  29. package/dist/icons/index.js.map +1 -1
  30. package/dist/index.d.ts +35 -10
  31. package/dist/index.js +44 -9
  32. package/dist/index.js.map +1 -1
  33. package/dist/jsx-dev-runtime.d.ts +1 -2
  34. package/dist/jsx-dev-runtime.js +3 -1
  35. package/dist/jsx-dev-runtime.js.map +1 -1
  36. package/dist/jsx-runtime.d.ts +644 -7
  37. package/dist/jsx-runtime.js +3 -120
  38. package/dist/jsx-runtime.js.map +1 -1
  39. package/dist/plugins/index.d.ts +21 -3
  40. package/dist/plugins/index.js +85 -1
  41. package/dist/plugins/index.js.map +1 -1
  42. package/dist/react/index.d.ts +1260 -15
  43. package/dist/react/index.js +1428 -15
  44. package/dist/react/index.js.map +1 -1
  45. package/dist/{core/types.d.ts → types-DWglFa91.d.ts} +8 -7
  46. package/package.json +32 -8
  47. package/dist/components/box.wc.d.ts +0 -24
  48. package/dist/components/box.wc.d.ts.map +0 -1
  49. package/dist/components/box.wc.js +0 -52
  50. package/dist/components/box.wc.js.map +0 -1
  51. package/dist/components/button.wc.d.ts +0 -32
  52. package/dist/components/button.wc.d.ts.map +0 -1
  53. package/dist/components/button.wc.js +0 -91
  54. package/dist/components/button.wc.js.map +0 -1
  55. package/dist/components/index.d.ts.map +0 -1
  56. package/dist/components/input.wc.d.ts +0 -45
  57. package/dist/components/input.wc.d.ts.map +0 -1
  58. package/dist/components/input.wc.js +0 -130
  59. package/dist/components/input.wc.js.map +0 -1
  60. package/dist/components/list.wc.d.ts +0 -49
  61. package/dist/components/list.wc.d.ts.map +0 -1
  62. package/dist/components/list.wc.js +0 -120
  63. package/dist/components/list.wc.js.map +0 -1
  64. package/dist/components/portal.wc.d.ts +0 -18
  65. package/dist/components/portal.wc.d.ts.map +0 -1
  66. package/dist/components/portal.wc.js +0 -78
  67. package/dist/components/portal.wc.js.map +0 -1
  68. package/dist/components/styles.d.ts +0 -7
  69. package/dist/components/styles.d.ts.map +0 -1
  70. package/dist/components/styles.js +0 -134
  71. package/dist/components/styles.js.map +0 -1
  72. package/dist/core/define.d.ts +0 -5
  73. package/dist/core/define.d.ts.map +0 -1
  74. package/dist/core/define.js +0 -26
  75. package/dist/core/define.js.map +0 -1
  76. package/dist/core/element.d.ts.map +0 -1
  77. package/dist/core/element.js +0 -30
  78. package/dist/core/element.js.map +0 -1
  79. package/dist/core/index.d.ts +0 -7
  80. package/dist/core/index.d.ts.map +0 -1
  81. package/dist/core/index.js +0 -5
  82. package/dist/core/index.js.map +0 -1
  83. package/dist/core/plugin.d.ts +0 -17
  84. package/dist/core/plugin.d.ts.map +0 -1
  85. package/dist/core/plugin.js +0 -117
  86. package/dist/core/plugin.js.map +0 -1
  87. package/dist/core/reactive-context.d.ts +0 -12
  88. package/dist/core/reactive-context.d.ts.map +0 -1
  89. package/dist/core/reactive-context.js +0 -34
  90. package/dist/core/reactive-context.js.map +0 -1
  91. package/dist/core/scheduler.d.ts +0 -13
  92. package/dist/core/scheduler.d.ts.map +0 -1
  93. package/dist/core/scheduler.js +0 -80
  94. package/dist/core/scheduler.js.map +0 -1
  95. package/dist/core/signal.d.ts +0 -14
  96. package/dist/core/signal.d.ts.map +0 -1
  97. package/dist/core/signal.js +0 -391
  98. package/dist/core/signal.js.map +0 -1
  99. package/dist/core/store.d.ts +0 -6
  100. package/dist/core/store.d.ts.map +0 -1
  101. package/dist/core/store.js +0 -35
  102. package/dist/core/store.js.map +0 -1
  103. package/dist/core/types.d.ts.map +0 -1
  104. package/dist/core/types.js +0 -2
  105. package/dist/core/types.js.map +0 -1
  106. package/dist/define.d.ts.map +0 -1
  107. package/dist/icons/icon-element.d.ts +0 -25
  108. package/dist/icons/icon-element.d.ts.map +0 -1
  109. package/dist/icons/icon-element.js +0 -63
  110. package/dist/icons/icon-element.js.map +0 -1
  111. package/dist/icons/index.d.ts.map +0 -1
  112. package/dist/icons/registry.d.ts +0 -6
  113. package/dist/icons/registry.d.ts.map +0 -1
  114. package/dist/icons/registry.js +0 -4775
  115. package/dist/icons/registry.js.map +0 -1
  116. package/dist/index.d.ts.map +0 -1
  117. package/dist/jsx-dev-runtime.d.ts.map +0 -1
  118. package/dist/jsx-runtime.d.ts.map +0 -1
  119. package/dist/jsx-types.d.ts +0 -651
  120. package/dist/jsx-types.d.ts.map +0 -1
  121. package/dist/jsx-types.js +0 -3
  122. package/dist/jsx-types.js.map +0 -1
  123. package/dist/plugins/index.d.ts.map +0 -1
  124. package/dist/plugins/router.d.ts +0 -4
  125. package/dist/plugins/router.d.ts.map +0 -1
  126. package/dist/plugins/router.js +0 -90
  127. package/dist/plugins/router.js.map +0 -1
  128. package/dist/plugins/types.d.ts +0 -16
  129. package/dist/plugins/types.d.ts.map +0 -1
  130. package/dist/plugins/types.js +0 -2
  131. package/dist/plugins/types.js.map +0 -1
  132. package/dist/react/icon.d.ts +0 -8
  133. package/dist/react/icon.d.ts.map +0 -1
  134. package/dist/react/icon.js +0 -7
  135. package/dist/react/icon.js.map +0 -1
  136. package/dist/react/icons.d.ts +0 -1194
  137. package/dist/react/icons.d.ts.map +0 -1
  138. package/dist/react/icons.js +0 -1196
  139. package/dist/react/icons.js.map +0 -1
  140. package/dist/react/index.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsx-types.js","sourceRoot":"","sources":["../src/jsx-types.ts"],"names":[],"mappings":"AAAA,0EAA0E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { RouterPlugin, RouterPluginConfig } from './types.js';
2
- export declare function createRouter(config?: RouterPluginConfig): RouterPlugin;
3
- export declare function useRouter(): RouterPlugin;
4
- //# sourceMappingURL=router.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/plugins/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAenE,wBAAgB,YAAY,CAAC,MAAM,GAAE,kBAAuB,GAAG,YAAY,CAyE1E;AAED,wBAAgB,SAAS,IAAI,YAAY,CAOxC"}
@@ -1,90 +0,0 @@
1
- import { registerPlugin, getPlugin } from '../core/plugin.js';
2
- import { signal } from '../core/signal.js';
3
- const isBrowser = typeof window !== 'undefined';
4
- function getBrowserPath(base, mode) {
5
- if (mode === 'memory')
6
- return '/';
7
- if (!isBrowser)
8
- return '/';
9
- if (mode === 'hash') {
10
- return window.location.hash.slice(1) || '/';
11
- }
12
- return window.location.pathname.replace(base, '') || '/';
13
- }
14
- export function createRouter(config = {}) {
15
- const mode = config.mode ?? 'history';
16
- const base = config.base ?? '';
17
- const currentPath = signal(getBrowserPath(base, mode));
18
- const listeners = new Set();
19
- function getInitialPath() {
20
- return getBrowserPath(base, mode);
21
- }
22
- function navigate(path) {
23
- const fullPath = base + path;
24
- if (isBrowser) {
25
- if (mode === 'hash') {
26
- window.location.hash = path;
27
- }
28
- else if (mode === 'history') {
29
- window.history.pushState(null, '', fullPath);
30
- }
31
- }
32
- currentPath.set(path);
33
- }
34
- function getCurrentPath() {
35
- return currentPath.get();
36
- }
37
- function getQuery() {
38
- if (!isBrowser)
39
- return {};
40
- const params = new URLSearchParams(window.location.search);
41
- const result = {};
42
- params.forEach((value, key) => {
43
- result[key] = value;
44
- });
45
- return result;
46
- }
47
- function subscribe(fn) {
48
- listeners.add(fn);
49
- return () => listeners.delete(fn);
50
- }
51
- currentPath.subscribe(() => {
52
- const path = currentPath.get();
53
- listeners.forEach((fn) => fn(path));
54
- });
55
- if (isBrowser) {
56
- if (mode === 'history') {
57
- window.addEventListener('popstate', () => {
58
- currentPath.set(window.location.pathname.replace(base, '') || '/');
59
- });
60
- }
61
- else if (mode === 'hash') {
62
- window.addEventListener('hashchange', () => {
63
- currentPath.set(window.location.hash.slice(1) || '/');
64
- });
65
- }
66
- }
67
- const router = {
68
- name: 'router',
69
- version: '0.2.0',
70
- setup(api) {
71
- api.registerHook('router:navigate', (path) => {
72
- navigate(path);
73
- });
74
- },
75
- navigate,
76
- getCurrentPath,
77
- getQuery,
78
- subscribe,
79
- };
80
- return router;
81
- }
82
- export function useRouter() {
83
- const existing = getPlugin('router');
84
- if (existing)
85
- return existing;
86
- const router = createRouter();
87
- registerPlugin(router);
88
- return router;
89
- }
90
- //# sourceMappingURL=router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/plugins/router.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AAEhD,SAAS,cAAc,CAAC,IAAY,EAAE,IAAY;IAChD,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IAClC,IAAI,CAAC,SAAS;QAAE,OAAO,GAAG,CAAC;IAC3B,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;IAC9C,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,SAA6B,EAAE;IAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC;IACtC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACvD,MAAM,SAAS,GAAG,IAAI,GAAG,EAA0B,CAAC;IAEpD,SAAS,cAAc;QACrB,OAAO,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,QAAQ,CAAC,IAAY;QAC5B,M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S,EAAE,CAAC;QACd,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,GAAG,EAAE;gBACvC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC;YACrE,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YAC3B,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,GAAG,EAAE;gBACzC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAiB;QAC3B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,OAAO;QAChB,KAAK,CAAC,GAAG;YACP,GAAG,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC,IAAY,EAAE,EAAE;gBACnD,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC,CAAC,CAAC;QACL,CAAC;QACD,QAAQ;QACR,cAAc;QACd,QAAQ;QACR,SAAS;KACV,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IACrC,IAAI,QAAQ;QAAE,OAAO,QAAwB,CAAC;IAE9C,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,cAAc,CAAC,MAAM,CAAC,CAAC;IACvB,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,16 +0,0 @@
1
- import type { Plugin } from '../core/types.js';
2
- export interface RouterPluginConfig {
3
- mode?: 'history' | 'hash' | 'memory';
4
- base?: string;
5
- }
6
- export interface RouterPlugin extends Plugin {
7
- navigate(path: string): void;
8
- getCurrentPath(): string;
9
- getQuery(): Record<string, string>;
10
- subscribe(fn: (path: string) => void): () => void;
11
- }
12
- export interface DevToolsPlugin extends Plugin {
13
- sendEvent(name: string, data?: any): void;
14
- logStateChange(path: string, oldVal: any, newVal: any): void;
15
- }
16
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAa,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,IAAI,MAAM,CAAC;IACzB,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACnD;AAED,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IAC1C,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC;CAC9D"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export interface IconBaseProps {
2
- size?: number | string;
3
- strokeWidth?: number | string;
4
- className?: string;
5
- style?: React.CSSProperties;
6
- }
7
- export declare function createIcon(name: string): import("react").ForwardRefExoticComponent<IconBaseProps & import("react").RefAttributes<HTMLElement>>;
8
- //# sourceMappingURL=icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/react/icon.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,yGAItC"}
@@ -1,7 +0,0 @@
1
- import { createElement, forwardRef } from 'react';
2
- export function createIcon(name) {
3
- return forwardRef((props, ref) => {
4
- return createElement('u-icon', { ...props, name, ref });
5
- });
6
- }
7
- //# sourceMappingURL=icon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/react/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AASlD,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,UAAU,CAA6B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAC3D,OAAO,aAAa,CAAC,QAAQ,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;AACL,CAAC"}