@editora/ui-core 0.1.22 → 0.1.24

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 (278) hide show
  1. package/README.md +292 -221
  2. package/dist/{ElementBase-YlTLMsGk.mjs → ElementBase-BeZT54Hj.mjs} +3 -2
  3. package/dist/ElementBase-DxbvhLJs.js +1 -0
  4. package/dist/ElementBase.d.ts +2 -1
  5. package/dist/ElementBase.d.ts.map +1 -1
  6. package/dist/__tests__/setup.d.ts +0 -2
  7. package/dist/__tests__/setup.d.ts.map +1 -1
  8. package/dist/accordion.cjs.js +1 -1
  9. package/dist/accordion.esm.js +1 -1
  10. package/dist/alert-dialog.cjs.js +1 -1
  11. package/dist/alert-dialog.esm.js +1 -1
  12. package/dist/alert.cjs.js +1 -1
  13. package/dist/alert.esm.js +1 -1
  14. package/dist/anchor.cjs.js +3 -3
  15. package/dist/anchor.esm.js +6 -5
  16. package/dist/animated-beam.cjs.js +1 -1
  17. package/dist/animated-beam.esm.js +1 -1
  18. package/dist/animated-list.cjs.js +1 -1
  19. package/dist/animated-list.esm.js +1 -1
  20. package/dist/animated-text.cjs.js +1 -1
  21. package/dist/animated-text.esm.js +1 -1
  22. package/dist/app-header.cjs.js +1 -1
  23. package/dist/app-header.esm.js +1 -1
  24. package/dist/aspect-ratio.cjs.js +1 -1
  25. package/dist/aspect-ratio.esm.js +1 -1
  26. package/dist/avatar.cjs.js +1 -1
  27. package/dist/avatar.esm.js +1 -1
  28. package/dist/badge.cjs.js +1 -1
  29. package/dist/badge.esm.js +1 -1
  30. package/dist/block-controls.cjs.js +1 -1
  31. package/dist/block-controls.esm.js +1 -1
  32. package/dist/box.cjs.js +1 -1
  33. package/dist/box.esm.js +1 -1
  34. package/dist/breadcrumb.cjs.js +1 -1
  35. package/dist/breadcrumb.esm.js +1 -1
  36. package/dist/button.cjs.js +1 -1
  37. package/dist/button.esm.js +1 -1
  38. package/dist/{calendar-DbxYRdlv.mjs → calendar-B3PUKHQm.mjs} +1 -1
  39. package/dist/{calendar-Qa-cFOp3.js → calendar-D-mXMgqc.js} +1 -1
  40. package/dist/calendar.cjs.js +1 -1
  41. package/dist/calendar.esm.js +1 -1
  42. package/dist/card.cjs.js +1 -1
  43. package/dist/card.esm.js +1 -1
  44. package/dist/chart.cjs.js +1 -1
  45. package/dist/chart.esm.js +1 -1
  46. package/dist/checkbox.cjs.js +1 -1
  47. package/dist/checkbox.esm.js +1 -1
  48. package/dist/collapsible.cjs.js +1 -1
  49. package/dist/collapsible.esm.js +1 -1
  50. package/dist/collection.cjs.js +1 -1
  51. package/dist/collection.esm.js +9 -8
  52. package/dist/color-picker.cjs.js +4 -4
  53. package/dist/color-picker.esm.js +3 -3
  54. package/dist/combobox.cjs.js +1 -1
  55. package/dist/combobox.esm.js +1 -1
  56. package/dist/command-palette.cjs.js +1 -1
  57. package/dist/command-palette.esm.js +1 -1
  58. package/dist/command.cjs.js +1 -1
  59. package/dist/command.esm.js +1 -1
  60. package/dist/components/ui-anchor.d.ts +2 -1
  61. package/dist/components/ui-anchor.d.ts.map +1 -1
  62. package/dist/components/ui-button.d.ts.map +1 -1
  63. package/dist/components/ui-collection.d.ts +2 -1
  64. package/dist/components/ui-collection.d.ts.map +1 -1
  65. package/dist/components/ui-form.d.ts +1 -0
  66. package/dist/components/ui-form.d.ts.map +1 -1
  67. package/dist/components/ui-roving-focus-group.d.ts +2 -1
  68. package/dist/components/ui-roving-focus-group.d.ts.map +1 -1
  69. package/dist/components/ui-sortable.d.ts +209 -12
  70. package/dist/components/ui-sortable.d.ts.map +1 -1
  71. package/dist/container.cjs.js +1 -1
  72. package/dist/container.esm.js +1 -1
  73. package/dist/context-menu.cjs.js +1 -1
  74. package/dist/context-menu.esm.js +1 -1
  75. package/dist/control-group.cjs.js +1 -1
  76. package/dist/control-group.esm.js +1 -1
  77. package/dist/data-table.cjs.js +1 -1
  78. package/dist/data-table.esm.js +1 -1
  79. package/dist/date-field.cjs.js +1 -1
  80. package/dist/date-field.esm.js +3 -3
  81. package/dist/date-picker.cjs.js +1 -1
  82. package/dist/date-picker.esm.js +3 -3
  83. package/dist/date-range-picker.cjs.js +1 -1
  84. package/dist/date-range-picker.esm.js +3 -3
  85. package/dist/date-range-time-picker.cjs.js +1 -1
  86. package/dist/date-range-time-picker.esm.js +3 -3
  87. package/dist/date-time-picker.cjs.js +1 -1
  88. package/dist/date-time-picker.esm.js +3 -3
  89. package/dist/{date-time-utils-Cps2aSu2.mjs → date-time-utils-BTlxnz5j.mjs} +1 -1
  90. package/dist/{date-time-utils-BzfTpeU-.js → date-time-utils-y3AvNvGe.js} +1 -1
  91. package/dist/description.cjs.js +1 -1
  92. package/dist/description.esm.js +1 -1
  93. package/dist/dialog.cjs.js +1 -1
  94. package/dist/dialog.esm.js +1 -1
  95. package/dist/direction-provider.cjs.js +1 -1
  96. package/dist/direction-provider.esm.js +1 -1
  97. package/dist/dismissable-layer.cjs.js +1 -1
  98. package/dist/dismissable-layer.esm.js +1 -1
  99. package/dist/dock.cjs.js +1 -1
  100. package/dist/dock.esm.js +1 -1
  101. package/dist/domElement-DazSZBjV.js +1 -0
  102. package/dist/domElement-ZlSGVP0l.mjs +5 -0
  103. package/dist/domElement.d.ts +2 -0
  104. package/dist/domElement.d.ts.map +1 -0
  105. package/dist/drawer.cjs.js +1 -1
  106. package/dist/drawer.esm.js +1 -1
  107. package/dist/dropdown.cjs.js +1 -1
  108. package/dist/dropdown.esm.js +1 -1
  109. package/dist/empty-state.cjs.js +1 -1
  110. package/dist/empty-state.esm.js +1 -1
  111. package/dist/field-error.cjs.js +1 -1
  112. package/dist/field-error.esm.js +1 -1
  113. package/dist/field.cjs.js +1 -1
  114. package/dist/field.esm.js +1 -1
  115. package/dist/fieldset.cjs.js +1 -1
  116. package/dist/fieldset.esm.js +1 -1
  117. package/dist/file-upload.cjs.js +1 -1
  118. package/dist/file-upload.esm.js +1 -1
  119. package/dist/flex.cjs.js +1 -1
  120. package/dist/flex.esm.js +1 -1
  121. package/dist/floating-toolbar.cjs.js +1 -1
  122. package/dist/floating-toolbar.esm.js +1 -1
  123. package/dist/focus-scope.cjs.js +1 -1
  124. package/dist/focus-scope.esm.js +1 -1
  125. package/dist/form.cjs.js +2 -2
  126. package/dist/form.esm.js +12 -2
  127. package/dist/gantt.cjs.js +1 -1
  128. package/dist/gantt.esm.js +1 -1
  129. package/dist/grid.cjs.js +1 -1
  130. package/dist/grid.esm.js +1 -1
  131. package/dist/hover-card.cjs.js +1 -1
  132. package/dist/hover-card.esm.js +1 -1
  133. package/dist/icon-cloud.cjs.js +1 -1
  134. package/dist/icon-cloud.esm.js +1 -1
  135. package/dist/icon.cjs.js +1 -1
  136. package/dist/icon.esm.js +1 -1
  137. package/dist/index.cjs.js +1 -1
  138. package/dist/index.esm.js +6 -6
  139. package/dist/inline-edit.cjs.js +1 -1
  140. package/dist/inline-edit.esm.js +1 -1
  141. package/dist/input.cjs.js +1 -1
  142. package/dist/input.esm.js +1 -1
  143. package/dist/label.cjs.js +1 -1
  144. package/dist/label.esm.js +1 -1
  145. package/dist/layout.cjs.js +1 -1
  146. package/dist/layout.esm.js +1 -1
  147. package/dist/marquee.cjs.js +1 -1
  148. package/dist/marquee.esm.js +1 -1
  149. package/dist/masonry-grid.cjs.js +1 -1
  150. package/dist/masonry-grid.esm.js +1 -1
  151. package/dist/menu.cjs.js +1 -1
  152. package/dist/menu.esm.js +1 -1
  153. package/dist/menubar.cjs.js +1 -1
  154. package/dist/menubar.esm.js +1 -1
  155. package/dist/meter.cjs.js +1 -1
  156. package/dist/meter.esm.js +1 -1
  157. package/dist/multi-select.cjs.js +1 -1
  158. package/dist/multi-select.esm.js +1 -1
  159. package/dist/navigation-menu.cjs.js +1 -1
  160. package/dist/navigation-menu.esm.js +1 -1
  161. package/dist/number-field.cjs.js +2 -2
  162. package/dist/number-field.esm.js +2 -2
  163. package/dist/number-ticker.cjs.js +1 -1
  164. package/dist/number-ticker.esm.js +1 -1
  165. package/dist/odometer.cjs.js +1 -1
  166. package/dist/odometer.esm.js +1 -1
  167. package/dist/orbiter.cjs.js +1 -1
  168. package/dist/orbiter.esm.js +1 -1
  169. package/dist/pagination.cjs.js +1 -1
  170. package/dist/pagination.esm.js +1 -1
  171. package/dist/{panel-group-CaD0_KQf.js → panel-group-BVHJEdfx.js} +1 -1
  172. package/dist/{panel-group-8sVNnGxg.mjs → panel-group-BxO_eNW6.mjs} +1 -1
  173. package/dist/panel-group.cjs.js +1 -1
  174. package/dist/panel-group.esm.js +1 -1
  175. package/dist/panel.cjs.js +1 -1
  176. package/dist/panel.esm.js +1 -1
  177. package/dist/password-field.cjs.js +1 -1
  178. package/dist/password-field.esm.js +1 -1
  179. package/dist/pin-input.cjs.js +1 -1
  180. package/dist/pin-input.esm.js +1 -1
  181. package/dist/placement-grid.cjs.js +1 -1
  182. package/dist/placement-grid.esm.js +1 -1
  183. package/dist/plugin-panel.cjs.js +1 -1
  184. package/dist/plugin-panel.esm.js +1 -1
  185. package/dist/popover.cjs.js +1 -1
  186. package/dist/popover.esm.js +1 -1
  187. package/dist/portal.cjs.js +1 -1
  188. package/dist/portal.esm.js +1 -1
  189. package/dist/positioner.cjs.js +1 -1
  190. package/dist/positioner.esm.js +1 -1
  191. package/dist/presence.cjs.js +1 -1
  192. package/dist/presence.esm.js +1 -1
  193. package/dist/progress.cjs.js +1 -1
  194. package/dist/progress.esm.js +1 -1
  195. package/dist/quick-actions.cjs.js +1 -1
  196. package/dist/quick-actions.esm.js +1 -1
  197. package/dist/radio-group.cjs.js +1 -1
  198. package/dist/radio-group.esm.js +1 -1
  199. package/dist/radio.cjs.js +1 -1
  200. package/dist/radio.esm.js +1 -1
  201. package/dist/rating.cjs.js +1 -1
  202. package/dist/rating.esm.js +1 -1
  203. package/dist/roving-focus-group.cjs.js +1 -1
  204. package/dist/roving-focus-group.esm.js +11 -10
  205. package/dist/scroll-area.cjs.js +1 -1
  206. package/dist/scroll-area.esm.js +1 -1
  207. package/dist/section.cjs.js +1 -1
  208. package/dist/section.esm.js +1 -1
  209. package/dist/select.cjs.js +1 -1
  210. package/dist/select.esm.js +1 -1
  211. package/dist/selection-popup.cjs.js +1 -1
  212. package/dist/selection-popup.esm.js +1 -1
  213. package/dist/separator.cjs.js +1 -1
  214. package/dist/separator.esm.js +1 -1
  215. package/dist/sidebar.cjs.js +2 -2
  216. package/dist/sidebar.esm.js +9 -9
  217. package/dist/skeleton.cjs.js +1 -1
  218. package/dist/skeleton.esm.js +1 -1
  219. package/dist/slider.cjs.js +1 -1
  220. package/dist/slider.esm.js +1 -1
  221. package/dist/slot.cjs.js +1 -1
  222. package/dist/slot.esm.js +1 -1
  223. package/dist/sortable.cjs.js +504 -369
  224. package/dist/sortable.d.ts +1 -1
  225. package/dist/sortable.d.ts.map +1 -1
  226. package/dist/sortable.esm.js +1758 -1168
  227. package/dist/spinning-text.cjs.js +1 -1
  228. package/dist/spinning-text.esm.js +1 -1
  229. package/dist/split-button.cjs.js +1 -1
  230. package/dist/split-button.esm.js +1 -1
  231. package/dist/splitter.cjs.js +1 -1
  232. package/dist/splitter.esm.js +1 -1
  233. package/dist/stepper.cjs.js +1 -1
  234. package/dist/stepper.esm.js +1 -1
  235. package/dist/switch.cjs.js +1 -1
  236. package/dist/switch.esm.js +1 -1
  237. package/dist/table.cjs.js +1 -1
  238. package/dist/table.esm.js +1 -1
  239. package/dist/tabs.cjs.js +1 -1
  240. package/dist/tabs.esm.js +1 -1
  241. package/dist/tags-input.cjs.js +1 -1
  242. package/dist/tags-input.esm.js +1 -1
  243. package/dist/textarea.cjs.js +1 -1
  244. package/dist/textarea.esm.js +1 -1
  245. package/dist/time-field.cjs.js +1 -1
  246. package/dist/time-field.esm.js +2 -2
  247. package/dist/time-picker.cjs.js +1 -1
  248. package/dist/time-picker.esm.js +3 -3
  249. package/dist/timeline.cjs.js +1 -1
  250. package/dist/timeline.esm.js +1 -1
  251. package/dist/toast.cjs.js +1 -1
  252. package/dist/toast.esm.js +1 -1
  253. package/dist/toggle-group.cjs.js +1 -1
  254. package/dist/toggle-group.esm.js +1 -1
  255. package/dist/toggle.cjs.js +1 -1
  256. package/dist/toggle.esm.js +1 -1
  257. package/dist/toolbar.cjs.js +1 -1
  258. package/dist/toolbar.esm.js +1 -1
  259. package/dist/tooltip.cjs.js +1 -1
  260. package/dist/tooltip.esm.js +1 -1
  261. package/dist/transfer-list.cjs.js +1 -1
  262. package/dist/transfer-list.esm.js +1 -1
  263. package/dist/{tree-Deoft-kO.mjs → tree-B_oQput6.mjs} +1 -1
  264. package/dist/{tree-7qbVnpGp.js → tree-SivHxcAy.js} +1 -1
  265. package/dist/tree-item.cjs.js +1 -1
  266. package/dist/tree-item.esm.js +1 -1
  267. package/dist/tree.cjs.js +1 -1
  268. package/dist/tree.esm.js +1 -1
  269. package/dist/{ui-button-BInsgSbr.js → ui-button-BPrzJScZ.js} +5 -5
  270. package/dist/{ui-button-rfiuUnUD.mjs → ui-button-Co8Sid6t.mjs} +11 -7
  271. package/dist/{ui-icon-Bvt9oIIR.js → ui-icon-D3avtxX_.js} +1 -1
  272. package/dist/{ui-icon-BSi_GtqO.mjs → ui-icon-DLhB08Fo.mjs} +1 -1
  273. package/dist/visually-hidden.cjs.js +1 -1
  274. package/dist/visually-hidden.esm.js +1 -1
  275. package/dist/wizard.cjs.js +1 -1
  276. package/dist/wizard.esm.js +1 -1
  277. package/package.json +2 -2
  278. package/dist/ElementBase-EV6mVBUV.js +0 -1
package/README.md CHANGED
@@ -1,55 +1,120 @@
1
- # @editora/ui-core
1
+ <h1 align="center">@editora/ui-core</h1>
2
+
3
+ <p align="center">
4
+ More than a hundred web components for building application UIs: forms, data tables, dialogs, charts, a Gantt chart
5
+ and more. Standard custom elements, so they work in plain HTML, React, Vue, Svelte and Angular, with promise-based
6
+ dialogs, theming and positioning helpers.
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/@editora/ui-core"><img src="https://img.shields.io/npm/v/@editora/ui-core.svg" alt="npm version"></a>
11
+ <a href="https://www.npmjs.com/package/@editora/ui-core"><img src="https://img.shields.io/npm/dm/@editora/ui-core.svg" alt="npm downloads"></a>
12
+ <a href="https://github.com/ajaykr089/Editora/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@editora/ui-core.svg" alt="license"></a>
13
+ <a href="https://www.npmjs.com/package/@editora/ui-core"><img src="https://img.shields.io/npm/types/@editora/ui-core.svg" alt="TypeScript types included"></a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://editora-ecosystem.netlify.app/">Component catalog</a> ·
18
+ <a href="https://editora-ecosystem-storybook.netlify.app/">Storybook</a> ·
19
+ <a href="https://codesandbox.io/p/github/ajaykr089/editora-codesandbox/main">CodeSandbox</a> ·
20
+ <a href="https://github.com/ajaykr089/Editora">GitHub</a>
21
+ </p>
22
+
23
+ <p align="center">
24
+ <img src="https://raw.githubusercontent.com/ajaykr089/Editora/main/packages/ui-core/docs/images/components.png" alt="A set of components: a labelled text field, buttons, badges and avatars, a warning alert, a switch, a checkbox, a progress bar and a date picker" width="900">
25
+ </p>
26
+
27
+ ## Features
28
+
29
+ - **A broad catalog.** Inputs and forms, pickers, tables, tabs, menus, dialogs, drawers, charts, a calendar and a
30
+ Gantt planner: [the full list](#components).
31
+ - **Standard custom elements.** Use them from any framework, or with no framework and no build step.
32
+ - **Forms that validate.** `<ui-form>` collects the values of the controls inside it, validates them and reports
33
+ `submit`, `invalid` and `dirty-change`.
34
+ - **Promise-based dialogs.** `await dialogs.confirm({...})` instead of wiring open/close state.
35
+ - **Themeable** with design tokens, for the whole page or for one element.
36
+ - **Positioning helpers** for menus, popovers and tooltips: flip, shift and fit to the viewport.
37
+ - Typed, and every component is also available on its own, so you can ship only the ones you use
38
+ ([measured below](#import-only-what-you-use)).
39
+
40
+ ## Install
2
41
 
3
- [![Version](https://img.shields.io/npm/v/@editora/ui-core)](https://www.npmjs.com/package/@editora/ui-core)
4
- [![License](https://img.shields.io/npm/l/@editora/ui-core)](https://github.com/ajaykr089/Editora/blob/main/LICENSE)
5
- [![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
6
- [![Size](https://img.shields.io/bundlephobia/minzip/@editora/ui-core)](https://bundlephobia.com/package/@editora/ui-core)
7
-
8
- ![Editora UI Components](../../images/editora-ui-components-linkedin-graphic.png)
42
+ ```bash
43
+ npm install @editora/ui-core
44
+ ```
9
45
 
10
- ## Demos
46
+ ## Quick start
11
47
 
12
- - **CodeSandbox:** https://codesandbox.io/p/github/ajaykr089/editora-codesandbox/main
13
- - **CodeSandboxUI Components:** https://qjr47y-5173.csb.app/button
14
- - **UI Component Catalog:** https://editora-ecosystem.netlify.app/
15
- - **Web Demo:** https://editora-free.netlify.app/
16
- - **Storybook:** https://editora-ecosystem-storybook.netlify.app/
48
+ With a bundler, import the package once to register the elements: `import '@editora/ui-core';`.
17
49
 
18
- Production-oriented Web Components for Editora UI.
50
+ With no build step, map the package to a CDN and import it in a module script:
19
51
 
20
- `@editora/ui-core` is the framework-agnostic layer. It ships:
21
- - Custom elements (`<ui-button>`, `<ui-data-table>`, `<ui-date-picker>`, etc.)
22
- - Imperative managers for Promise-based dialogs
23
- - Theming/token utilities
24
- - Overlay, focus, portal, and plugin helpers
52
+ ```html
53
+ <script type="importmap">
54
+ {
55
+ "imports": {
56
+ "@editora/ui-core": "https://cdn.jsdelivr.net/npm/@editora/ui-core/dist/index.esm.js",
57
+ "@editora/icons": "https://cdn.jsdelivr.net/npm/@editora/icons/dist/index.esm.js"
58
+ }
59
+ }
60
+ </script>
61
+ <script type="module">
62
+ import '@editora/ui-core';
63
+ </script>
25
64
 
26
- ## Installation
65
+ <ui-field label="Email" description="Work email" required>
66
+ <ui-input name="email" type="email" placeholder="you@company.com" clearable></ui-input>
67
+ </ui-field>
27
68
 
28
- ```bash
29
- npm install @editora/ui-core
69
+ <ui-button variant="primary">Save</ui-button>
30
70
  ```
31
71
 
32
- ## Quick Start (Vanilla / Any Framework)
72
+ The examples below assume `@editora/ui-core` resolves, through a bundler or the import map above.
33
73
 
34
- Import once at app bootstrap to register all custom elements.
35
-
36
- ```ts
37
- import '@editora/ui-core';
38
- ```
39
-
40
- Then use components directly:
74
+ The picture at the top of this page is made of these elements:
41
75
 
42
76
  ```html
43
- <ui-field label="Email" hint="Work email">
44
- <ui-input name="email" type="email" placeholder="you@company.com" required></ui-input>
45
- </ui-field>
77
+ <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start">
78
+ <div style="display: grid; gap: 16px">
79
+ <ui-field label="Project name" description="Shown in the sidebar">
80
+ <ui-input placeholder="Untitled" clearable></ui-input>
81
+ </ui-field>
82
+
83
+ <div style="display: flex; gap: 8px; flex-wrap: wrap">
84
+ <ui-button variant="primary">Save</ui-button>
85
+ <ui-button variant="secondary">Cancel</ui-button>
86
+ <ui-button variant="ghost">Skip</ui-button>
87
+ <ui-button variant="danger">Delete</ui-button>
88
+ </div>
89
+
90
+ <div style="display: flex; gap: 8px; align-items: center">
91
+ <ui-badge tone="success" text="Live"></ui-badge>
92
+ <ui-badge tone="warning" text="Review"></ui-badge>
93
+ <ui-badge tone="danger" text="Failed"></ui-badge>
94
+ <ui-avatar initials="AM" size="md"></ui-avatar>
95
+ <ui-avatar initials="JK" size="md"></ui-avatar>
96
+ </div>
97
+
98
+ <ui-alert title="Heads up" description="Your trial ends in 3 days." tone="warning"></ui-alert>
99
+ </div>
100
+
101
+ <div style="display: grid; gap: 16px">
102
+ <ui-switch checked label="Email notifications" description="A summary every Monday"></ui-switch>
103
+ <ui-checkbox checked>Remember me</ui-checkbox>
104
+ <ui-progress value="64"></ui-progress>
105
+ <ui-date-picker label="Start date" clearable></ui-date-picker>
106
+ </div>
107
+ </div>
46
108
 
47
- <ui-button variant="primary">Save</ui-button>
109
+ <script type="module">
110
+ import '@editora/ui-core';
111
+ </script>
48
112
  ```
49
113
 
50
- ## Standalone Component Imports
114
+ ## Import only what you use
51
115
 
52
- If you only want a specific custom element instead of registering the full catalog, import its standalone subpath:
116
+ `import '@editora/ui-core'` registers every component. Each component also has its own entry, named after its tag
117
+ without the `ui-` prefix, and registers just that element:
53
118
 
54
119
  ```ts
55
120
  import '@editora/ui-core/button';
@@ -57,85 +122,17 @@ import '@editora/ui-core/input';
57
122
  import '@editora/ui-core/date-picker';
58
123
  ```
59
124
 
60
- That registers only those elements and keeps the rest of the catalog out of the import path. The dedicated sortable entry remains:
61
-
62
- ```ts
63
- import '@editora/ui-core/sortable';
64
- ```
65
-
66
- The standalone wrappers live in `src/standalone` and are checked into the package. The build reads from that folder directly, so there is no generator step in the normal build or publish flow.
67
-
68
- ## Framework Direct Usage
69
-
70
- `@editora/ui-core` can be used directly in Vue, Svelte, and Angular because the package ships standards-based custom elements.
71
-
72
- - Vue and Svelte work well directly for attribute/event-driven components, and can also handle richer elements like `ui-sortable` through refs.
73
- - Angular also works directly, but you should add `CUSTOM_ELEMENTS_SCHEMA` and use `@ViewChild` for array or object-valued properties.
74
- - Production wrappers are optional DX improvements, not a requirement for using `ui-core`.
75
-
76
- Examples:
77
-
78
- - Vue direct example: [`examples/ui-core-vue-direct`](https://github.com/ajaykr089/Editora/tree/main/examples/ui-core-vue-direct)
79
- - Svelte direct example: [`examples/ui-core-svelte-direct`](/https://github.com/ajaykr089/Editora/tree/main/examples/ui-core-svelte-direct)
80
- - Angular direct example: [`examples/ui-core-angular-direct`](https://github.com/ajaykr089/Editora/tree/main/examples/ui-core-angular-direct)
81
-
82
- More guidance lives in [`docs/FRAMEWORK_DIRECT_USAGE.md`](https://github.com/ajaykr089/Editora/tree/main/packages/ui-core/docs/FRAMEWORK_DIRECT_USAGE.md).
125
+ Bundle sizes, measured with esbuild (minified ES modules):
83
126
 
84
- ## What You Get
85
-
86
- ### Core utilities
87
- - `createSignal`, `computed`, `effect`
88
- - `ElementBase`
89
- - `applyTheme`, `defaultTokens`
90
- - `showPortalFor`, `autoUpdatePosition`, portal helpers
91
- - `createPositioner`, `computePositionState`, `autoUpdatePositioner`, middleware helpers, virtual anchors
92
- - focus/overlay managers
93
- - `showToast`
94
-
95
- ### Dialog managers (Promise API)
96
- - `createDialogManager`, `DialogManager`
97
- - `createAlertDialogManager`, `AlertDialogManager`
98
-
99
- ## Component Catalog
100
-
101
- ### Primitives and forms
102
- - `ui-button`, `ui-split-button`, `ui-input`, `ui-textarea`, `ui-label`, `ui-description`, `ui-field-error`, `ui-control-group`, `ui-fieldset`, `ui-field`, `ui-form`, `ui-pin-input`, `ui-otp-input`, `ui-inline-edit`
103
- - `ui-checkbox`, `ui-radio`, `ui-radio-group`, `ui-switch`, `ui-slider`, `ui-select`, `ui-combobox`
104
- - `ui-date-picker`, `ui-date-range-picker`, `ui-time-picker`, `ui-date-time-picker`, `ui-date-range-time-picker`
105
- - `ui-color-picker`
106
-
107
- ### Navigation and layout
108
- - `ui-layout`, `ui-sidebar`, `ui-app-header`, `ui-breadcrumb`, `ui-navigation-menu`, `ui-menubar`, `ui-tabs`
109
- - `ui-box`, `ui-flex`, `ui-grid`, `ui-section`, `ui-container`
110
- - `ui-drawer`
111
-
112
- ### Overlays and interactions
113
- - `ui-dialog`, `ui-alert-dialog`, `ui-popover`, `ui-dropdown`, `ui-menu`, `ui-context-menu`, `ui-tooltip`, `ui-hover-card`
114
- - `ui-command`, `ui-command-palette`, `ui-quick-actions`, `ui-selection-popup`, `ui-plugin-panel`, `ui-floating-toolbar`, `ui-toolbar`
115
- - `ui-portal`, `ui-presence`, `ui-slot`, `ui-visually-hidden`
116
-
117
- ### Data and display
118
- - `ui-table`, `ui-data-table`, `ui-pagination`, `ui-empty-state`, `ui-skeleton`, `ui-alert`, `ui-badge`, `ui-transfer-list`
119
- - `ui-chart`, `ui-timeline`, `ui-gantt`, `ui-calendar`, `ui-progress`, `ui-scroll-area`, `ui-separator`
120
- - `ui-accordion`, `ui-collapsible`, `ui-stepper`, `ui-wizard`, `ui-avatar`, `ui-aspect-ratio`, `ui-block-controls`, `ui-icon`
121
-
122
- ## Usage Patterns
123
-
124
- ### 1. Attributes + events
125
-
126
- ```html
127
- <ui-date-picker id="start" name="startDate" clearable></ui-date-picker>
128
- <script type="module">
129
- import '@editora/ui-core';
127
+ | Import | Size |
128
+ | --- | --- |
129
+ | `@editora/ui-core` (everything) | 2.4 MB (493 KB gzipped) |
130
+ | `@editora/ui-core/button` | 165 KB (54 KB gzipped) |
131
+ | `button`, `input` and `date-picker` together | 296 KB (85 KB gzipped) |
130
132
 
131
- const picker = document.getElementById('start');
132
- picker.addEventListener('change', (e) => {
133
- console.log('new date', e.detail.value);
134
- });
135
- </script>
136
- ```
133
+ ## Forms
137
134
 
138
- ### 2. Form validation and submit
135
+ `<ui-form>` finds the `name`d controls inside it, so you do not wire up each field:
139
136
 
140
137
  ```html
141
138
  <ui-form id="profileForm" autosave guard-unsaved>
@@ -158,10 +155,26 @@ More guidance lives in [`docs/FRAMEWORK_DIRECT_USAGE.md`](https://github.com/aja
158
155
  </script>
159
156
  ```
160
157
 
161
- ### 3. Data table + pagination
158
+ <p align="center">
159
+ <img src="https://raw.githubusercontent.com/ajaykr089/Editora/main/packages/ui-core/docs/images/form.png" alt="The form after pressing Save with both required fields empty: each field is outlined in red with the message Please fill out this field." width="900">
160
+ </p>
161
+
162
+ | Event | `event.detail` |
163
+ | --- | --- |
164
+ | `submit` | `{ values }`: fired when the form is valid. |
165
+ | `invalid` | `{ errors }`: the error message of each invalid field. |
166
+ | `dirty-change` | `{ dirty }`: whether the values differ from the starting values. |
167
+ | `autosave` | `{ values, dirty }`: with the `autosave` attribute, fired once the values have stopped changing for `autosave-delay` milliseconds (800 by default) and differ from the starting values. Save your draft in the handler. |
168
+
169
+ A button with `type="submit"` or `type="reset"` inside the form submits or resets it. The form also has `submit()`,
170
+ `validate()`, `getValues()` and `reset()` methods. `guard-unsaved` warns before the page is left with unsaved changes.
171
+
172
+ ## Data tables
173
+
174
+ A table in `<ui-data-table>` gets sorting, selection and paging; a `<ui-pagination>` with a matching id is the pager:
162
175
 
163
176
  ```html
164
- <ui-data-table id="usersTable" sortable selectable page-size="10" pagination-id="usersPager">
177
+ <ui-data-table id="usersTable" sortable selectable page-size="2" pagination-id="usersPager">
165
178
  <table>
166
179
  <thead>
167
180
  <tr>
@@ -173,16 +186,29 @@ More guidance lives in [`docs/FRAMEWORK_DIRECT_USAGE.md`](https://github.com/aja
173
186
  <tbody>
174
187
  <tr><td>1</td><td>Asha</td><td>Admin</td></tr>
175
188
  <tr><td>2</td><td>Marco</td><td>Editor</td></tr>
189
+ <tr><td>3</td><td>Lena</td><td>Viewer</td></tr>
190
+ <tr><td>4</td><td>Tariq</td><td>Editor</td></tr>
176
191
  </tbody>
177
192
  </table>
178
193
  </ui-data-table>
179
194
 
180
195
  <ui-pagination id="usersPager"></ui-pagination>
196
+
197
+ <script type="module">
198
+ import '@editora/ui-core';
199
+ </script>
181
200
  ```
182
201
 
183
- ### 4. Gantt planning timeline
202
+ <p align="center">
203
+ <img src="https://raw.githubusercontent.com/ajaykr089/Editora/main/packages/ui-core/docs/images/data-table.png" alt="A table with sortable ID, Name and Role columns showing two rows, and a pager that reads Showing 1-2 of 4" width="900">
204
+ </p>
205
+
206
+ For long tables, `virtualize` renders only the rows that are on screen.
184
207
 
185
- `ui-gantt` is a framework-agnostic planning workspace for schedules, release plans, and project roadmaps. It includes task, summary, and milestone rows; dependency links; drag/resize editing; baselines; critical tasks; split segments; keyboard navigation; and automatic row virtualization for large schedules.
208
+ ## Gantt chart
209
+
210
+ `<ui-gantt>` is a planning timeline: tasks, summary rows and milestones, dependencies, baselines, critical tasks, drag
211
+ and resize, and a toolbar for zoom, filter and sort. Give it `tasks` and `links` as JSON:
186
212
 
187
213
  ```html
188
214
  <ui-gantt id="releasePlan" zoom="week" sort="start" bar-variant="soft"></ui-gantt>
@@ -222,138 +248,183 @@ More guidance lives in [`docs/FRAMEWORK_DIRECT_USAGE.md`](https://github.com/aja
222
248
  </script>
223
249
  ```
224
250
 
225
- Useful attributes:
251
+ <p align="center">
252
+ <img src="https://raw.githubusercontent.com/ajaykr089/Editora/main/packages/ui-core/docs/images/gantt.png" alt="A Gantt chart with a task bar for API contracts, a baseline under it, and an arrow to the QA sign-off milestone" width="900">
253
+ </p>
226
254
 
227
- - `zoom`: `day`, `week`, `month`, `quarter`, or `year`
228
- - `sort`: `none`, `start`, `end`, `label`, or `progress`
229
- - `bar-variant`: `solid`, `soft`, `striped`, `outline`, or `glass`
230
- - `readonly`, `show-toolbar`, `show-today`, `filter`, `virtualized="false"`
255
+ - `zoom`: `day`, `week`, `month`, `quarter` or `year`. `sort`: `none`, `start`, `end`, `label` or `progress`.
256
+ - `bar-variant`: `solid`, `soft`, `striped`, `outline` or `glass`.
257
+ - Dependency types: `e2s`, `s2s`, `e2e` and `s2e`.
258
+ - Also: `readonly`, `show-toolbar`, `show-today`, `filter`, and `virtualized="false"` for small layouts (large task sets are
259
+ virtualized automatically).
231
260
 
232
- ### 5. Promise dialog manager
261
+ ## Promise dialogs
233
262
 
234
- ```ts
235
- import '@editora/ui-core';
236
- import { createDialogManager } from '@editora/ui-core';
237
-
238
- const dialogs = createDialogManager();
239
-
240
- const result = await dialogs.confirm({
241
- title: 'Delete record',
242
- description: 'This action cannot be undone.',
243
- submitText: 'Delete',
244
- cancelText: 'Cancel',
245
- mode: 'queue'
246
- });
247
-
248
- if (result.action === 'submit') {
249
- // perform delete
250
- }
251
- ```
263
+ The dialog managers open a dialog and give you a promise for the answer:
252
264
 
253
- ### 6. Promise alert dialog manager
254
-
255
- ```ts
256
- import '@editora/ui-core';
257
- import { createAlertDialogManager } from '@editora/ui-core';
265
+ ```html
266
+ <ui-button id="remove" variant="danger">Delete record</ui-button>
267
+ <ui-button id="publish" variant="secondary">Publish</ui-button>
268
+ <pre id="result"></pre>
258
269
 
259
- const alerts = createAlertDialogManager();
270
+ <script type="module">
271
+ import { createAlertDialogManager, createDialogManager } from '@editora/ui-core';
272
+
273
+ const dialogs = createDialogManager();
274
+ const alerts = createAlertDialogManager();
275
+ const result = document.getElementById('result');
276
+
277
+ document.getElementById('remove').onclick = async () => {
278
+ const answer = await dialogs.confirm({
279
+ title: 'Delete record',
280
+ description: 'This action cannot be undone.',
281
+ submitText: 'Delete',
282
+ cancelText: 'Cancel',
283
+ mode: 'queue'
284
+ });
285
+
286
+ result.textContent = answer.action === 'submit' ? 'Deleted' : 'Kept';
287
+ };
288
+
289
+ document.getElementById('publish').onclick = async () => {
290
+ const answer = await alerts.confirm({
291
+ title: 'Publish changes?',
292
+ description: 'You can still unpublish later.',
293
+ confirmText: 'Publish',
294
+ cancelText: 'Not now'
295
+ });
296
+
297
+ result.textContent = answer.action === 'confirm' ? 'Published' : 'Not published';
298
+ };
299
+ </script>
300
+ ```
260
301
 
261
- const confirm = await alerts.confirm({
262
- title: 'Publish changes?',
263
- description: 'You can still unpublish later.',
264
- confirmText: 'Publish',
265
- cancelText: 'Not now'
266
- });
302
+ <p align="center">
303
+ <img src="https://raw.githubusercontent.com/ajaykr089/Editora/main/packages/ui-core/docs/images/dialog.png" alt="A confirm dialog titled Delete record with the text This action cannot be undone, and Cancel and Delete buttons, over a dimmed page" width="700">
304
+ </p>
267
305
 
268
- if (confirm.action === 'confirm') {
269
- // publish
270
- }
271
- ```
306
+ `createDialogManager()` is for general dialogs and `createAlertDialogManager()` for confirmations that need an answer.
307
+ Call `destroy()` on a manager when your app shuts down, not right after opening a dialog.
272
308
 
273
309
  ## Theming
274
310
 
275
- Use `applyTheme` with token overrides:
311
+ `applyTheme` writes the design tokens as CSS variables on the page, or on one element if you pass it as the second
312
+ argument:
276
313
 
277
- ```ts
278
- import { applyTheme, defaultTokens } from '@editora/ui-core';
279
-
280
- applyTheme({
281
- ...defaultTokens,
282
- colors: {
283
- ...defaultTokens.colors,
284
- primary: '#0f766e',
285
- text: '#0f172a',
286
- background: '#ffffff'
287
- },
288
- radius: '10px'
289
- });
314
+ ```html
315
+ <ui-button variant="primary">Save</ui-button>
316
+ <ui-badge tone="success" text="Live"></ui-badge>
317
+
318
+ <script type="module">
319
+ import { applyTheme, defaultTokens } from '@editora/ui-core';
320
+
321
+ applyTheme({
322
+ ...defaultTokens,
323
+ colors: {
324
+ ...defaultTokens.colors,
325
+ primary: '#0f766e',
326
+ text: '#0f172a',
327
+ background: '#ffffff'
328
+ },
329
+ radius: '10px'
330
+ });
331
+ </script>
290
332
  ```
291
333
 
292
- ## Floating Positioning
334
+ Apply the theme early, before the first render. To theme one part of the page, call
335
+ `applyTheme(tokens, element)`.
293
336
 
294
- `@editora/ui-core` includes the shared floating engine used by menus, context menus, hover cards, floating toolbars, and picker overlays.
337
+ ## Floating positioning
295
338
 
296
- Use `@editora/ui-core/runtime` for framework-agnostic floating behavior:
339
+ The positioning engine behind the menus, popovers and tooltips is available on its own, from
340
+ `@editora/ui-core/runtime`:
297
341
 
298
- ```ts
299
- import { createPositioner } from '@editora/ui-core/runtime';
300
-
301
- const handle = createPositioner({
302
- anchor: trigger,
303
- floating: panel,
304
- placement: 'bottom-start',
305
- strategy: 'fixed',
306
- offset: 8,
307
- flip: true,
308
- shift: true,
309
- fitViewport: true
310
- });
311
-
312
- // later
313
- handle.destroy();
342
+ ```html
343
+ <ui-button id="trigger" variant="secondary">Open</ui-button>
344
+ <div id="panel" style="padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);">
345
+ A panel that stays next to its button.
346
+ </div>
347
+
348
+ <script type="module">
349
+ import { createPositioner } from '@editora/ui-core/runtime';
350
+
351
+ const trigger = document.getElementById('trigger');
352
+ const panel = document.getElementById('panel');
353
+
354
+ const handle = createPositioner({
355
+ anchor: trigger,
356
+ floating: panel,
357
+ placement: 'bottom-start',
358
+ strategy: 'fixed',
359
+ offset: 8,
360
+ flip: true,
361
+ shift: true,
362
+ fitViewport: true
363
+ });
364
+
365
+ // later: handle.destroy();
366
+ </script>
314
367
  ```
315
368
 
316
- You can also use:
369
+ Also exported: `computePositionState()` for one-off coordinates, `autoUpdatePositioner()` for observer-driven updates,
370
+ `createVirtualPoint()`, `createVirtualRect()` and `createVirtualRange()` for virtual anchors, and
371
+ `detectPositionerOverflow()` for diagnostics. See the
372
+ [floating guide](https://github.com/ajaykr089/Editora/blob/main/packages/ui-core/docs/FLOATING_USAGE.md).
317
373
 
318
- - `computePositionState()` for one-shot coordinate calculation
319
- - `autoUpdatePositioner()` for observer-driven updates
320
- - `createVirtualPoint()`, `createVirtualRect()`, `createVirtualRange()` for virtual anchors
321
- - `detectPositionerOverflow()` for diagnostics and custom middleware
374
+ ## Components
322
375
 
323
- Full guide:
376
+ Each component is a custom element named `ui-*`; the standalone entry is the name without the prefix.
324
377
 
325
- - `docs/FLOATING_USAGE.md`
378
+ **Forms and inputs:**
379
+ `ui-button`, `ui-split-button`, `ui-input`, `ui-textarea`, `ui-label`, `ui-description`, `ui-field-error`, `ui-control-group`, `ui-fieldset`, `ui-field`, `ui-form`,
380
+ `ui-checkbox`, `ui-radio`, `ui-radio-group`, `ui-switch`, `ui-slider`, `ui-select`, `ui-combobox`,
381
+ `ui-date-picker`, `ui-date-range-picker`, `ui-time-picker`, `ui-date-time-picker`, `ui-date-range-time-picker`, `ui-color-picker`
326
382
 
327
- ## Docs
383
+ **Navigation and layout:**
384
+ `ui-layout`, `ui-sidebar`, `ui-app-header`, `ui-breadcrumb`, `ui-navigation-menu`, `ui-menubar`, `ui-tabs`, `ui-drawer`,
385
+ `ui-box`, `ui-flex`, `ui-grid`, `ui-section`, `ui-container`
328
386
 
329
- - `docs/FRAMEWORK_DIRECT_USAGE.md` for Vue, Svelte, and Angular direct-use guidance
330
- - `docs/ATTRIBUTE_RENDER_MATRIX.md` for component render strategy coverage
331
- - `docs/FLOATING_USAGE.md` for first-party floating primitives and Floating UI-style usage
332
- - `docs/PRIMITIVE_GAP_MATRIX.md` for the missing primitive roadmap
333
- - `docs/PRIMITIVE_IMPLEMENTATION_PLAN.md` for proposed APIs and rollout order
387
+ **Overlays and interaction:**
388
+ `ui-dialog`, `ui-alert-dialog`, `ui-popover`, `ui-dropdown`, `ui-menu`, `ui-context-menu`, `ui-tooltip`, `ui-hover-card`,
389
+ `ui-command`, `ui-command-palette`, `ui-quick-actions`, `ui-selection-popup`, `ui-plugin-panel`, `ui-floating-toolbar`, `ui-toolbar`,
390
+ `ui-portal`, `ui-presence`, `ui-slot`, `ui-visually-hidden`
334
391
 
335
- ## Developer Notes
392
+ **Data and display:**
393
+ `ui-table`, `ui-data-table`, `ui-pagination`, `ui-empty-state`, `ui-skeleton`, `ui-alert`, `ui-badge`, `ui-transfer-list`,
394
+ `ui-chart`, `ui-timeline`, `ui-gantt`, `ui-calendar`, `ui-progress`, `ui-scroll-area`, `ui-separator`,
395
+ `ui-accordion`, `ui-collapsible`, `ui-stepper`, `ui-wizard`, `ui-avatar`, `ui-aspect-ratio`, `ui-block-controls`, `ui-icon`
336
396
 
337
- - This package is `sideEffects: true` because component registration happens via module import.
338
- - Use one global import (`import '@editora/ui-core'`) in app entry.
339
- - Events are dispatched as `CustomEvent` with `detail`, usually `bubbles: true` and `composed: true`.
340
- - For best performance, keep long tables virtualized (`ui-data-table[virtualize]`) and avoid unnecessary DOM churn in cell renderers.
397
+ Besides these, the package exports `createSignal`, `computed` and `effect` (small reactive primitives), `ElementBase` (the
398
+ base class of the components), the portal, focus and overlay managers, and `showToast`.
341
399
 
342
- ## Development
400
+ ## Other frameworks
343
401
 
344
- ```bash
345
- cd packages/ui-core
346
- npm run build:tsc
347
- npm test
348
- ```
402
+ The elements are standard custom elements, so Vue, Svelte and Angular can use them directly. Vue and Svelte work well
403
+ with attributes and events; in Angular, add `CUSTOM_ELEMENTS_SCHEMA` and use `@ViewChild` for array and object values.
404
+ Working examples:
405
+ [Vue](https://github.com/ajaykr089/Editora/tree/main/examples/ui-core-vue-direct),
406
+ [Svelte](https://github.com/ajaykr089/Editora/tree/main/examples/ui-core-svelte-direct) and
407
+ [Angular](https://github.com/ajaykr089/Editora/tree/main/examples/ui-core-angular-direct), and the
408
+ [guide](https://github.com/ajaykr089/Editora/blob/main/packages/ui-core/docs/FRAMEWORK_DIRECT_USAGE.md). For React,
409
+ use [`@editora/ui-react`](https://www.npmjs.com/package/@editora/ui-react).
410
+
411
+ ## Good to know
412
+
413
+ - Components register when their module is imported, so the package is marked `sideEffects: true`. Import it before the
414
+ first render.
415
+ - Events are `CustomEvent`s with a `detail`; they usually bubble and cross shadow boundaries.
416
+ - If a component renders as an empty tag, `@editora/ui-core` (or its standalone entry) was not imported before it.
417
+ - If the styles look unthemed, apply the tokens early with `applyTheme(...)`.
418
+
419
+ ## The rest of the family
349
420
 
350
- Full `npm run build` also runs Vite bundle output.
421
+ | Package | |
422
+ | --- | --- |
423
+ | [`@editora/ui-react`](https://www.npmjs.com/package/@editora/ui-react) | These components as React components. |
424
+ | [`@editora/ui-sortable`](https://www.npmjs.com/package/@editora/ui-sortable) | Sortable lists and boards. |
425
+ | [`@editora/icons`](https://www.npmjs.com/package/@editora/icons) | The icon set the components use. |
426
+ | [`@editora/toast`](https://www.npmjs.com/package/@editora/toast) | Toast notifications. |
351
427
 
352
- ## Troubleshooting
428
+ ## License
353
429
 
354
- - Components not rendering:
355
- - Ensure `@editora/ui-core` is imported before first render.
356
- - Styles look unthemed:
357
- - Apply tokens early in bootstrap with `applyTheme(...)`.
358
- - Dialog promises never resolving:
359
- - Ensure you call `destroy()` on manager during app teardown only, not immediately after open.
430
+ MIT © [Ajay Kumar](https://github.com/ajaykr089)
@@ -1,4 +1,5 @@
1
- class n extends HTMLElement {
1
+ import { D as s } from "./domElement-ZlSGVP0l.mjs";
2
+ class d extends s {
2
3
  constructor() {
3
4
  super(), this._isRendering = !1, this._renderRequested = !1, this._renderScheduled = !1, this._hasRendered = !1, this._visibilityGuardApplied = !1, this._lastRenderedContent = null, this.root = this.attachShadow({ mode: "open" });
4
5
  }
@@ -75,5 +76,5 @@ class n extends HTMLElement {
75
76
  }
76
77
  }
77
78
  export {
78
- n as E
79
+ d as E
79
80
  };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./domElement-DazSZBjV.js");class n extends s.DOMElement{constructor(){super(),this._isRendering=!1,this._renderRequested=!1,this._renderScheduled=!1,this._hasRendered=!1,this._visibilityGuardApplied=!1,this._lastRenderedContent=null,this.root=this.attachShadow({mode:"open"})}connectedCallback(){if(!this._hasRendered&&!this._visibilityGuardApplied&&(this.style.getPropertyValue("visibility").trim()||(this.style.setProperty("visibility","hidden"),this._visibilityGuardApplied=!0)),!this._hasRendered){this._requestRender();return}this._scheduleRender()}disconnectedCallback(){try{if(typeof this.close=="function")try{this.close()}catch{}if(typeof this._cleanup=="function"){try{this._cleanup()}catch{}this._cleanup=void 0}if(typeof this.__menuCleanup=="function"){try{this.__menuCleanup()}catch{}this.__menuCleanup=null}const e=this._portalEl;if(e&&e.parentElement)try{e.parentElement.removeChild(e)}catch{}}catch{}}attributeChangedCallback(e,t,i){t!==i&&this.isConnected&&(e&&!this.shouldRenderOnAttributeChange(e,t??null,i??null)||this._scheduleRender())}shouldRenderOnAttributeChange(e,t,i){return!0}setContent(e,t){!t?.force&&this._lastRenderedContent===e||(this.root.innerHTML=e,this._lastRenderedContent=e)}invalidateContentCache(){this._lastRenderedContent=null}requestRender(){this._scheduleRender()}_scheduleRender(){this._renderScheduled||(this._renderScheduled=!0,queueMicrotask(()=>{this._renderScheduled=!1,this._requestRender()}))}_requestRender(){if(this._isRendering){this._renderRequested=!0;return}this._isRendering=!0;try{this.render()}finally{this._isRendering=!1,this._hasRendered||(this._hasRendered=!0,this._visibilityGuardApplied&&(this.style.removeProperty("visibility"),this._visibilityGuardApplied=!1))}this._renderRequested&&(this._renderRequested=!1,this._scheduleRender())}}exports.ElementBase=n;
@@ -1,4 +1,5 @@
1
- export declare abstract class ElementBase extends HTMLElement {
1
+ import { DOMElement } from './domElement';
2
+ export declare abstract class ElementBase extends DOMElement {
2
3
  protected root: ShadowRoot;
3
4
  private _isRendering;
4
5
  private _renderRequested;
@@ -1 +1 @@
1
- {"version":3,"file":"ElementBase.d.ts","sourceRoot":"","sources":["../src/ElementBase.ts"],"names":[],"mappings":"AAAA,8BAAsB,WAAY,SAAQ,WAAW;IACnD,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;IAC3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,oBAAoB,CAAuB;;IAOnD,iBAAiB;IAejB,oBAAoB;IA2BpB,wBAAwB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAS1F,SAAS,CAAC,6BAA6B,CACrC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO;IAIV,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;IAOhE,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAIxC,SAAS,CAAC,aAAa,IAAI,IAAI;IAI/B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,cAAc;IAwBtB,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI;CAClC"}
1
+ {"version":3,"file":"ElementBase.d.ts","sourceRoot":"","sources":["../src/ElementBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,8BAAsB,WAAY,SAAQ,UAAU;IAClD,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;IAC3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,oBAAoB,CAAuB;;IAOnD,iBAAiB;IAejB,oBAAoB;IA2BpB,wBAAwB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAS1F,SAAS,CAAC,6BAA6B,CACrC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO;IAIV,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;IAOhE,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAIxC,SAAS,CAAC,aAAa,IAAI,IAAI;IAI/B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,cAAc;IAwBtB,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI;CAClC"}
@@ -3,6 +3,4 @@ declare class ResizeObserverStub {
3
3
  unobserve(): void;
4
4
  disconnect(): void;
5
5
  }
6
- declare class PointerEventStub extends MouseEvent {
7
- }
8
6
  //# sourceMappingURL=setup.d.ts.map