juxscript 1.1.5 → 1.1.6

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 (204) hide show
  1. package/index.d.ts +10 -10
  2. package/index.d.ts.map +1 -0
  3. package/lib/components/alert.d.ts +32 -0
  4. package/lib/components/alert.d.ts.map +1 -0
  5. package/lib/components/alert.js +153 -0
  6. package/lib/components/alert.ts +200 -0
  7. package/lib/components/app.d.ts +89 -0
  8. package/lib/components/app.d.ts.map +1 -0
  9. package/lib/components/app.js +175 -0
  10. package/lib/components/app.ts +247 -0
  11. package/lib/components/badge.d.ts +27 -0
  12. package/lib/components/badge.d.ts.map +1 -0
  13. package/lib/components/badge.js +70 -0
  14. package/lib/components/badge.ts +101 -0
  15. package/lib/components/base/BaseComponent.d.ts +142 -0
  16. package/lib/components/base/BaseComponent.d.ts.map +1 -0
  17. package/lib/components/base/BaseComponent.js +363 -0
  18. package/lib/components/base/BaseComponent.ts +421 -0
  19. package/lib/components/base/FormInput.d.ts +73 -0
  20. package/lib/components/base/FormInput.d.ts.map +1 -0
  21. package/lib/components/base/FormInput.js +163 -0
  22. package/lib/components/base/FormInput.ts +227 -0
  23. package/lib/components/button.d.ts +48 -0
  24. package/lib/components/button.d.ts.map +1 -0
  25. package/lib/components/button.js +121 -0
  26. package/lib/components/button.ts +178 -0
  27. package/lib/components/card.d.ts +34 -0
  28. package/lib/components/card.d.ts.map +1 -0
  29. package/lib/components/card.js +127 -0
  30. package/lib/components/card.ts +173 -0
  31. package/lib/components/chart.d.ts +45 -0
  32. package/lib/components/chart.d.ts.map +1 -0
  33. package/lib/components/chart.js +186 -0
  34. package/lib/components/chart.ts +231 -0
  35. package/lib/components/checkbox.d.ts +31 -0
  36. package/lib/components/checkbox.d.ts.map +1 -0
  37. package/lib/components/checkbox.js +185 -0
  38. package/lib/components/checkbox.ts +242 -0
  39. package/lib/components/code.d.ts +24 -0
  40. package/lib/components/code.d.ts.map +1 -0
  41. package/lib/components/code.js +88 -0
  42. package/lib/components/code.ts +123 -0
  43. package/lib/components/container.d.ts +42 -0
  44. package/lib/components/container.d.ts.map +1 -0
  45. package/lib/components/container.js +93 -0
  46. package/lib/components/container.ts +140 -0
  47. package/lib/components/data.d.ts +36 -0
  48. package/lib/components/data.d.ts.map +1 -0
  49. package/lib/components/data.js +110 -0
  50. package/lib/components/data.ts +135 -0
  51. package/lib/components/datepicker.d.ts +38 -0
  52. package/lib/components/datepicker.d.ts.map +1 -0
  53. package/lib/components/datepicker.js +177 -0
  54. package/lib/components/datepicker.ts +234 -0
  55. package/lib/components/dialog.d.ts +38 -0
  56. package/lib/components/dialog.d.ts.map +1 -0
  57. package/lib/components/dialog.js +126 -0
  58. package/lib/components/dialog.ts +172 -0
  59. package/lib/components/divider.d.ts +30 -0
  60. package/lib/components/divider.d.ts.map +1 -0
  61. package/lib/components/divider.js +69 -0
  62. package/lib/components/divider.ts +100 -0
  63. package/lib/components/dropdown.d.ts +39 -0
  64. package/lib/components/dropdown.d.ts.map +1 -0
  65. package/lib/components/dropdown.js +133 -0
  66. package/lib/components/dropdown.ts +186 -0
  67. package/lib/components/element.d.ts +50 -0
  68. package/lib/components/element.d.ts.map +1 -0
  69. package/lib/components/element.js +206 -0
  70. package/lib/components/element.ts +267 -0
  71. package/lib/components/fileupload.d.ts +40 -0
  72. package/lib/components/fileupload.d.ts.map +1 -0
  73. package/lib/components/fileupload.js +241 -0
  74. package/lib/components/fileupload.ts +309 -0
  75. package/lib/components/grid.d.ts +87 -0
  76. package/lib/components/grid.d.ts.map +1 -0
  77. package/lib/components/grid.js +205 -0
  78. package/lib/components/grid.ts +291 -0
  79. package/lib/components/guard.d.ts +41 -0
  80. package/lib/components/guard.d.ts.map +1 -0
  81. package/lib/components/guard.js +56 -0
  82. package/lib/components/guard.ts +92 -0
  83. package/lib/components/heading.d.ts +24 -0
  84. package/lib/components/heading.d.ts.map +1 -0
  85. package/lib/components/heading.js +67 -0
  86. package/lib/components/heading.ts +96 -0
  87. package/lib/components/helpers.d.ts +9 -0
  88. package/lib/components/helpers.d.ts.map +1 -0
  89. package/lib/components/helpers.js +30 -0
  90. package/lib/components/helpers.ts +41 -0
  91. package/lib/components/hero.d.ts +45 -0
  92. package/lib/components/hero.d.ts.map +1 -0
  93. package/lib/components/hero.js +165 -0
  94. package/lib/components/hero.ts +224 -0
  95. package/lib/components/icon.d.ts +35 -0
  96. package/lib/components/icon.d.ts.map +1 -0
  97. package/lib/components/icon.js +132 -0
  98. package/lib/components/icon.ts +178 -0
  99. package/lib/components/icons.d.ts +25 -0
  100. package/lib/components/icons.d.ts.map +1 -0
  101. package/lib/components/icons.js +440 -0
  102. package/lib/components/icons.ts +464 -0
  103. package/lib/components/include.d.ts +120 -0
  104. package/lib/components/include.d.ts.map +1 -0
  105. package/lib/components/include.js +350 -0
  106. package/lib/components/include.ts +410 -0
  107. package/lib/components/input.d.ts +83 -0
  108. package/lib/components/input.d.ts.map +1 -0
  109. package/lib/components/input.js +348 -0
  110. package/lib/components/input.ts +457 -0
  111. package/lib/components/list.d.ts +82 -0
  112. package/lib/components/list.d.ts.map +1 -0
  113. package/lib/components/list.js +311 -0
  114. package/lib/components/list.ts +419 -0
  115. package/lib/components/loading.d.ts +24 -0
  116. package/lib/components/loading.d.ts.map +1 -0
  117. package/lib/components/loading.js +73 -0
  118. package/lib/components/loading.ts +100 -0
  119. package/lib/components/menu.d.ts +37 -0
  120. package/lib/components/menu.d.ts.map +1 -0
  121. package/lib/components/menu.js +202 -0
  122. package/lib/components/menu.ts +275 -0
  123. package/lib/components/modal.d.ts +51 -0
  124. package/lib/components/modal.d.ts.map +1 -0
  125. package/lib/components/modal.js +227 -0
  126. package/lib/components/modal.ts +284 -0
  127. package/lib/components/nav.d.ts +45 -0
  128. package/lib/components/nav.d.ts.map +1 -0
  129. package/lib/components/nav.js +190 -0
  130. package/lib/components/nav.ts +257 -0
  131. package/lib/components/paragraph.d.ts +21 -0
  132. package/lib/components/paragraph.d.ts.map +1 -0
  133. package/lib/components/paragraph.js +70 -0
  134. package/lib/components/paragraph.ts +97 -0
  135. package/lib/components/progress.d.ts +39 -0
  136. package/lib/components/progress.d.ts.map +1 -0
  137. package/lib/components/progress.js +113 -0
  138. package/lib/components/progress.ts +159 -0
  139. package/lib/components/radio.d.ts +41 -0
  140. package/lib/components/radio.d.ts.map +1 -0
  141. package/lib/components/radio.js +203 -0
  142. package/lib/components/radio.ts +278 -0
  143. package/lib/components/req.d.ts +155 -0
  144. package/lib/components/req.d.ts.map +1 -0
  145. package/lib/components/req.js +253 -0
  146. package/lib/components/req.ts +303 -0
  147. package/lib/components/script.d.ts +14 -0
  148. package/lib/components/script.d.ts.map +1 -0
  149. package/lib/components/script.js +33 -0
  150. package/lib/components/script.ts +41 -0
  151. package/lib/components/select.d.ts +40 -0
  152. package/lib/components/select.d.ts.map +1 -0
  153. package/lib/components/select.js +183 -0
  154. package/lib/components/select.ts +252 -0
  155. package/lib/components/sidebar.d.ts +48 -0
  156. package/lib/components/sidebar.d.ts.map +1 -0
  157. package/lib/components/sidebar.js +207 -0
  158. package/lib/components/sidebar.ts +275 -0
  159. package/lib/components/style.d.ts +14 -0
  160. package/lib/components/style.d.ts.map +1 -0
  161. package/lib/components/style.js +33 -0
  162. package/lib/components/style.ts +41 -0
  163. package/lib/components/switch.d.ts +32 -0
  164. package/lib/components/switch.d.ts.map +1 -0
  165. package/lib/components/switch.js +186 -0
  166. package/lib/components/switch.ts +246 -0
  167. package/lib/components/table.d.ts +137 -0
  168. package/lib/components/table.d.ts.map +1 -0
  169. package/lib/components/table.js +1045 -0
  170. package/lib/components/table.ts +1249 -0
  171. package/lib/components/tabs.d.ts +36 -0
  172. package/lib/components/tabs.d.ts.map +1 -0
  173. package/lib/components/tabs.js +198 -0
  174. package/lib/components/tabs.ts +250 -0
  175. package/lib/components/theme-toggle.d.ts +44 -0
  176. package/lib/components/theme-toggle.d.ts.map +1 -0
  177. package/lib/components/theme-toggle.js +215 -0
  178. package/lib/components/theme-toggle.ts +293 -0
  179. package/lib/components/tooltip.d.ts +30 -0
  180. package/lib/components/tooltip.d.ts.map +1 -0
  181. package/lib/components/tooltip.js +109 -0
  182. package/lib/components/tooltip.ts +144 -0
  183. package/lib/components/view.d.ts +48 -0
  184. package/lib/components/view.d.ts.map +1 -0
  185. package/lib/components/view.js +149 -0
  186. package/lib/components/view.ts +190 -0
  187. package/lib/components/write.d.ts +107 -0
  188. package/lib/components/write.d.ts.map +1 -0
  189. package/lib/components/write.js +222 -0
  190. package/lib/components/write.ts +272 -0
  191. package/lib/layouts/default.css +260 -0
  192. package/lib/layouts/figma.css +334 -0
  193. package/lib/reactivity/state.d.ts +36 -0
  194. package/lib/reactivity/state.d.ts.map +1 -0
  195. package/lib/reactivity/state.js +67 -0
  196. package/lib/reactivity/state.ts +78 -0
  197. package/lib/utils/fetch.d.ts +176 -0
  198. package/lib/utils/fetch.d.ts.map +1 -0
  199. package/lib/utils/fetch.js +427 -0
  200. package/lib/utils/fetch.ts +553 -0
  201. package/machinery/doc-generator.js +136 -0
  202. package/machinery/imports.js +155 -0
  203. package/machinery/ts-shim.js +46 -0
  204. package/package.json +9 -15
package/index.d.ts CHANGED
@@ -104,8 +104,8 @@ export declare const jux: {
104
104
  onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
105
105
  send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
106
106
  fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
107
- then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: (value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
108
- catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
107
+ then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
108
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
109
109
  finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
110
110
  };
111
111
  post: <T = any>(url: string, body?: any, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method" | "body">) => {
@@ -124,8 +124,8 @@ export declare const jux: {
124
124
  onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
125
125
  send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
126
126
  fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
127
- then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: (value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
128
- catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
127
+ then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
128
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
129
129
  finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
130
130
  };
131
131
  put: <T = any>(url: string, body?: any, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method" | "body">) => {
@@ -144,8 +144,8 @@ export declare const jux: {
144
144
  onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
145
145
  send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
146
146
  fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
147
- then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: (value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
148
- catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
147
+ then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
148
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
149
149
  finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
150
150
  };
151
151
  patch: <T = any>(url: string, body?: any, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method" | "body">) => {
@@ -164,8 +164,8 @@ export declare const jux: {
164
164
  onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
165
165
  send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
166
166
  fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
167
- then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: (value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
168
- catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
167
+ then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
168
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
169
169
  finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
170
170
  };
171
171
  delete: <T = any>(url: string, options?: Omit<import("./lib/utils/fetch.js").FetchOptions, "method">) => {
@@ -184,8 +184,8 @@ export declare const jux: {
184
184
  onError(callback: (error: import("./lib/utils/fetch.js").FetchError) => void): /*elided*/ any;
185
185
  send(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
186
186
  fetch(): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
187
- then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: (value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
188
- catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
187
+ then<TResult1 = import("./lib/utils/fetch.js").FetchResult<T>, TResult2 = never>(onfulfilled?: ((value: import("./lib/utils/fetch.js").FetchResult<T>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
188
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("./lib/utils/fetch.js").FetchResult<T> | TResult>;
189
189
  finally(onfinally?: (() => void) | null): Promise<import("./lib/utils/fetch.js").FetchResult<T>>;
190
190
  };
191
191
  config: typeof import("./lib/utils/fetch.js").configureFetch;
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,32 @@
1
+ import { BaseComponent } from './base/BaseComponent.js';
2
+ export interface AlertOptions {
3
+ content?: string;
4
+ type?: 'info' | 'success' | 'warning' | 'error';
5
+ dismissible?: boolean;
6
+ icon?: string;
7
+ style?: string;
8
+ class?: string;
9
+ }
10
+ type AlertState = {
11
+ content: string;
12
+ type: string;
13
+ dismissible: boolean;
14
+ icon: string;
15
+ visible: boolean;
16
+ style: string;
17
+ class: string;
18
+ };
19
+ export declare class Alert extends BaseComponent<AlertState> {
20
+ private _alert;
21
+ constructor(id: string, options?: AlertOptions);
22
+ protected getTriggerEvents(): readonly string[];
23
+ protected getCallbackEvents(): readonly string[];
24
+ content(value: string): this;
25
+ type(value: 'info' | 'success' | 'warning' | 'error'): this;
26
+ dismissible(value: boolean): this;
27
+ icon(value: string): this;
28
+ render(targetId?: string): this;
29
+ }
30
+ export declare function alert(id: string, options?: AlertOptions): Alert;
31
+ export {};
32
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAOxD,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,UAAU,GAAG;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,KAAM,SAAQ,aAAa,CAAC,UAAU,CAAC;IAChD,OAAO,CAAC,MAAM,CAA4B;gBAE9B,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB;IAYlD,SAAS,CAAC,gBAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAiBhD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK5B,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI;IAK3D,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAKjC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IASzB,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;CA6GlC;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,KAAK,CAEnE"}
@@ -0,0 +1,153 @@
1
+ import { BaseComponent } from './base/BaseComponent.js';
2
+ import { renderIcon } from './icons.js';
3
+ // Event definitions
4
+ const TRIGGER_EVENTS = [];
5
+ const CALLBACK_EVENTS = ['dismiss'];
6
+ export class Alert extends BaseComponent {
7
+ constructor(id, options = {}) {
8
+ super(id, {
9
+ content: options.content ?? '',
10
+ type: options.type ?? 'info',
11
+ dismissible: options.dismissible ?? true,
12
+ icon: options.icon ?? '',
13
+ visible: true,
14
+ style: options.style ?? '',
15
+ class: options.class ?? ''
16
+ });
17
+ this._alert = null;
18
+ }
19
+ getTriggerEvents() {
20
+ return TRIGGER_EVENTS;
21
+ }
22
+ getCallbackEvents() {
23
+ return CALLBACK_EVENTS;
24
+ }
25
+ /* ═════════════════════════════════════════════════════════════════
26
+ * FLUENT API
27
+ * ═════════════════════════════════════════════════════════════════ */
28
+ // ✅ Inherited from BaseComponent:
29
+ // - style(), class()
30
+ // - bind(), sync(), renderTo()
31
+ // - addClass(), removeClass(), toggleClass()
32
+ // - visible(), show(), hide(), toggleVisibility()
33
+ // - attr(), attrs(), removeAttr()
34
+ // - disabled(), enable(), disable()
35
+ // - loading(), focus(), blur(), remove()
36
+ content(value) {
37
+ this.state.content = value;
38
+ return this;
39
+ }
40
+ type(value) {
41
+ this.state.type = value;
42
+ return this;
43
+ }
44
+ dismissible(value) {
45
+ this.state.dismissible = value;
46
+ return this;
47
+ }
48
+ icon(value) {
49
+ this.state.icon = value;
50
+ return this;
51
+ }
52
+ /* ═════════════════════════════════════════════════════════════════
53
+ * RENDER
54
+ * ═════════════════════════════════════════════════════════════════ */
55
+ render(targetId) {
56
+ const container = this._setupContainer(targetId);
57
+ const { content, type, dismissible, icon, style, class: className } = this.state;
58
+ const hasVisibleSync = this._syncBindings.some(b => b.property === 'visible');
59
+ // Build alert element
60
+ const alert = document.createElement('div');
61
+ alert.className = `jux-alert jux-alert-${type}`;
62
+ alert.id = this._id;
63
+ if (className)
64
+ alert.className += ` ${className}`;
65
+ if (style)
66
+ alert.setAttribute('style', style);
67
+ if (icon) {
68
+ const iconEl = document.createElement('span');
69
+ iconEl.className = 'jux-alert-icon';
70
+ iconEl.appendChild(renderIcon(icon));
71
+ alert.appendChild(iconEl);
72
+ }
73
+ const contentEl = document.createElement('div');
74
+ contentEl.className = 'jux-alert-content';
75
+ contentEl.textContent = content;
76
+ alert.appendChild(contentEl);
77
+ if (dismissible) {
78
+ const closeBtn = document.createElement('button');
79
+ closeBtn.className = 'jux-alert-close';
80
+ closeBtn.innerHTML = '×';
81
+ alert.appendChild(closeBtn);
82
+ }
83
+ // Default dismiss behavior (only if NOT using sync)
84
+ if (!hasVisibleSync && dismissible) {
85
+ const closeBtn = alert.querySelector('.jux-alert-close');
86
+ closeBtn?.addEventListener('click', () => {
87
+ // 🎯 Fire the dismiss callback event
88
+ this._triggerCallback('dismiss');
89
+ alert.remove();
90
+ });
91
+ }
92
+ // Wire events using inherited method
93
+ this._wireStandardEvents(alert);
94
+ // Wire sync bindings
95
+ this._syncBindings.forEach(({ property, stateObj, toState, toComponent }) => {
96
+ if (property === 'content') {
97
+ const transform = toComponent || ((v) => String(v));
98
+ stateObj.subscribe((val) => {
99
+ const transformed = transform(val);
100
+ contentEl.textContent = transformed;
101
+ this.state.content = transformed;
102
+ });
103
+ }
104
+ else if (property === 'type') {
105
+ const transform = toComponent || ((v) => String(v));
106
+ stateObj.subscribe((val) => {
107
+ const transformed = transform(val);
108
+ alert.className = `jux-alert jux-alert-${transformed}`;
109
+ if (className)
110
+ alert.className += ` ${className}`;
111
+ this.state.type = transformed;
112
+ });
113
+ }
114
+ else if (property === 'visible') {
115
+ const transformToState = toState || ((v) => Boolean(v));
116
+ const transform = toComponent || ((v) => Boolean(v));
117
+ let isUpdating = false;
118
+ // State → Component
119
+ stateObj.subscribe((val) => {
120
+ if (isUpdating)
121
+ return;
122
+ const transformed = transform(val);
123
+ alert.style.display = transformed ? 'flex' : 'none';
124
+ });
125
+ // Component → State (close button)
126
+ if (dismissible) {
127
+ const closeBtn = alert.querySelector('.jux-alert-close');
128
+ closeBtn?.addEventListener('click', () => {
129
+ if (isUpdating)
130
+ return;
131
+ isUpdating = true;
132
+ alert.style.display = 'none';
133
+ stateObj.set(transformToState(false));
134
+ // 🎯 Fire the dismiss callback event
135
+ this._triggerCallback('dismiss');
136
+ setTimeout(() => { isUpdating = false; }, 0);
137
+ });
138
+ }
139
+ }
140
+ });
141
+ container.appendChild(alert);
142
+ this._alert = alert;
143
+ requestAnimationFrame(() => {
144
+ if (window.lucide) {
145
+ window.lucide.createIcons();
146
+ }
147
+ });
148
+ return this;
149
+ }
150
+ }
151
+ export function alert(id, options = {}) {
152
+ return new Alert(id, options);
153
+ }
@@ -0,0 +1,200 @@
1
+ import { BaseComponent } from './base/BaseComponent.js';
2
+ import { renderIcon } from './icons.js';
3
+
4
+ // Event definitions
5
+ const TRIGGER_EVENTS = [] as const;
6
+ const CALLBACK_EVENTS = ['dismiss'] as const;
7
+
8
+ export interface AlertOptions {
9
+ content?: string;
10
+ type?: 'info' | 'success' | 'warning' | 'error';
11
+ dismissible?: boolean;
12
+ icon?: string;
13
+ style?: string;
14
+ class?: string;
15
+ }
16
+
17
+ type AlertState = {
18
+ content: string;
19
+ type: string;
20
+ dismissible: boolean;
21
+ icon: string;
22
+ visible: boolean;
23
+ style: string;
24
+ class: string;
25
+ };
26
+
27
+ export class Alert extends BaseComponent<AlertState> {
28
+ private _alert: HTMLElement | null = null;
29
+
30
+ constructor(id: string, options: AlertOptions = {}) {
31
+ super(id, {
32
+ content: options.content ?? '',
33
+ type: options.type ?? 'info',
34
+ dismissible: options.dismissible ?? true,
35
+ icon: options.icon ?? '',
36
+ visible: true,
37
+ style: options.style ?? '',
38
+ class: options.class ?? ''
39
+ });
40
+ }
41
+
42
+ protected getTriggerEvents(): readonly string[] {
43
+ return TRIGGER_EVENTS;
44
+ }
45
+
46
+ protected getCallbackEvents(): readonly string[] {
47
+ return CALLBACK_EVENTS;
48
+ }
49
+
50
+ /* ═════════════════════════════════════════════════════════════════
51
+ * FLUENT API
52
+ * ═════════════════════════════════════════════════════════════════ */
53
+
54
+ // ✅ Inherited from BaseComponent:
55
+ // - style(), class()
56
+ // - bind(), sync(), renderTo()
57
+ // - addClass(), removeClass(), toggleClass()
58
+ // - visible(), show(), hide(), toggleVisibility()
59
+ // - attr(), attrs(), removeAttr()
60
+ // - disabled(), enable(), disable()
61
+ // - loading(), focus(), blur(), remove()
62
+
63
+ content(value: string): this {
64
+ this.state.content = value;
65
+ return this;
66
+ }
67
+
68
+ type(value: 'info' | 'success' | 'warning' | 'error'): this {
69
+ this.state.type = value;
70
+ return this;
71
+ }
72
+
73
+ dismissible(value: boolean): this {
74
+ this.state.dismissible = value;
75
+ return this;
76
+ }
77
+
78
+ icon(value: string): this {
79
+ this.state.icon = value;
80
+ return this;
81
+ }
82
+
83
+ /* ═════════════════════════════════════════════════════════════════
84
+ * RENDER
85
+ * ═════════════════════════════════════════════════════════════════ */
86
+
87
+ render(targetId?: string): this {
88
+ const container = this._setupContainer(targetId);
89
+
90
+ const { content, type, dismissible, icon, style, class: className } = this.state;
91
+ const hasVisibleSync = this._syncBindings.some(b => b.property === 'visible');
92
+
93
+ // Build alert element
94
+ const alert = document.createElement('div');
95
+ alert.className = `jux-alert jux-alert-${type}`;
96
+ alert.id = this._id;
97
+ if (className) alert.className += ` ${className}`;
98
+ if (style) alert.setAttribute('style', style);
99
+
100
+ if (icon) {
101
+ const iconEl = document.createElement('span');
102
+ iconEl.className = 'jux-alert-icon';
103
+ iconEl.appendChild(renderIcon(icon));
104
+ alert.appendChild(iconEl);
105
+ }
106
+
107
+ const contentEl = document.createElement('div');
108
+ contentEl.className = 'jux-alert-content';
109
+ contentEl.textContent = content;
110
+ alert.appendChild(contentEl);
111
+
112
+ if (dismissible) {
113
+ const closeBtn = document.createElement('button');
114
+ closeBtn.className = 'jux-alert-close';
115
+ closeBtn.innerHTML = '×';
116
+ alert.appendChild(closeBtn);
117
+ }
118
+
119
+ // Default dismiss behavior (only if NOT using sync)
120
+ if (!hasVisibleSync && dismissible) {
121
+ const closeBtn = alert.querySelector('.jux-alert-close');
122
+ closeBtn?.addEventListener('click', () => {
123
+ // 🎯 Fire the dismiss callback event
124
+ this._triggerCallback('dismiss');
125
+ alert.remove();
126
+ });
127
+ }
128
+
129
+ // Wire events using inherited method
130
+ this._wireStandardEvents(alert);
131
+
132
+ // Wire sync bindings
133
+ this._syncBindings.forEach(({ property, stateObj, toState, toComponent }) => {
134
+ if (property === 'content') {
135
+ const transform = toComponent || ((v: any) => String(v));
136
+
137
+ stateObj.subscribe((val: any) => {
138
+ const transformed = transform(val);
139
+ contentEl.textContent = transformed;
140
+ this.state.content = transformed;
141
+ });
142
+ }
143
+ else if (property === 'type') {
144
+ const transform = toComponent || ((v: any) => String(v));
145
+
146
+ stateObj.subscribe((val: any) => {
147
+ const transformed = transform(val);
148
+ alert.className = `jux-alert jux-alert-${transformed}`;
149
+ if (className) alert.className += ` ${className}`;
150
+ this.state.type = transformed;
151
+ });
152
+ }
153
+ else if (property === 'visible') {
154
+ const transformToState = toState || ((v: any) => Boolean(v));
155
+ const transform = toComponent || ((v: any) => Boolean(v));
156
+
157
+ let isUpdating = false;
158
+
159
+ // State → Component
160
+ stateObj.subscribe((val: any) => {
161
+ if (isUpdating) return;
162
+ const transformed = transform(val);
163
+ alert.style.display = transformed ? 'flex' : 'none';
164
+ });
165
+
166
+ // Component → State (close button)
167
+ if (dismissible) {
168
+ const closeBtn = alert.querySelector('.jux-alert-close');
169
+ closeBtn?.addEventListener('click', () => {
170
+ if (isUpdating) return;
171
+ isUpdating = true;
172
+
173
+ alert.style.display = 'none';
174
+ stateObj.set(transformToState(false));
175
+
176
+ // 🎯 Fire the dismiss callback event
177
+ this._triggerCallback('dismiss');
178
+
179
+ setTimeout(() => { isUpdating = false; }, 0);
180
+ });
181
+ }
182
+ }
183
+ });
184
+
185
+ container.appendChild(alert);
186
+ this._alert = alert;
187
+
188
+ requestAnimationFrame(() => {
189
+ if ((window as any).lucide) {
190
+ (window as any).lucide.createIcons();
191
+ }
192
+ });
193
+
194
+ return this;
195
+ }
196
+ }
197
+
198
+ export function alert(id: string, options: AlertOptions = {}): Alert {
199
+ return new Alert(id, options);
200
+ }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * App component options
3
+ */
4
+ export interface AppOptions {
5
+ title?: string;
6
+ theme?: 'light' | 'dark' | 'auto';
7
+ favicon?: string;
8
+ meta?: Record<string, string>;
9
+ stylesheets?: string[];
10
+ scripts?: string[];
11
+ layout?: {
12
+ header?: boolean | string;
13
+ subheader?: boolean | string;
14
+ sidebar?: boolean | string;
15
+ main?: boolean | string;
16
+ aside?: boolean | string;
17
+ footer?: boolean | string;
18
+ };
19
+ }
20
+ /**
21
+ * App component state
22
+ */
23
+ type AppState = {
24
+ title: string;
25
+ theme: string;
26
+ favicon: string;
27
+ meta: Map<string, string>;
28
+ stylesheets: string[];
29
+ scripts: string[];
30
+ layout: {
31
+ header: boolean | string;
32
+ subheader: boolean | string;
33
+ sidebar: boolean | string;
34
+ main: boolean | string;
35
+ aside: boolean | string;
36
+ footer: boolean | string;
37
+ };
38
+ };
39
+ /**
40
+ * App - Configure application-level settings
41
+ * Manages document metadata, theme, and global configuration
42
+ *
43
+ * Usage:
44
+ * jux.app('myApp').setup({
45
+ * title: 'My App',
46
+ * theme: 'dark',
47
+ * favicon: '/favicon.ico',
48
+ * stylesheets: [
49
+ * '/lib/layouts/notion.css',
50
+ * '/lib/presets/light.css'
51
+ * ],
52
+ * layout: {
53
+ * header: true,
54
+ * sidebar: true,
55
+ * main: true,
56
+ * footer: true
57
+ * }
58
+ * });
59
+ *
60
+ * // Or fluent
61
+ * jux.app('myApp')
62
+ * .title('My App')
63
+ * .theme('dark')
64
+ * .addStylesheet('/presets/main.css')
65
+ * .render();
66
+ */
67
+ export declare class App {
68
+ state: AppState;
69
+ _componentId: string;
70
+ id: string;
71
+ constructor(id: string, options?: AppOptions);
72
+ title(value: string): this;
73
+ theme(value: 'light' | 'dark' | 'auto'): this;
74
+ favicon(value: string): this;
75
+ meta(name: string, content: string): this;
76
+ addStylesheet(url: string): this;
77
+ addScript(url: string): this;
78
+ /**
79
+ * Setup app with comprehensive configuration
80
+ */
81
+ setup(options: AppOptions): this;
82
+ render(): this;
83
+ }
84
+ /**
85
+ * Factory helper
86
+ */
87
+ export declare function app(id: string, options?: AppOptions): App;
88
+ export {};
89
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC1B,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC7B,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACzB,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KAC3B,CAAC;CACH;AAED;;GAEG;AACH,KAAK,QAAQ,GAAG;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE;QACN,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;QACzB,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;QAC5B,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;QAC1B,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;QACvB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;QACxB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;KAC1B,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,GAAG;IACd,KAAK,EAAE,QAAQ,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;gBAEC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU;IA4B5C,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK1B,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI;IAK7C,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK5B,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAKzC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAOhC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAO5B;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI;IA8BhC,MAAM,IAAI,IAAI;CAqEf;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,GAAG,CAEzD"}