@threadlabs/looma 0.52.12 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/components/shared/overlay.js +7 -0
  2. package/components/ui-editor-toolbar/ui-editor-toolbar.html +2 -2
  3. package/components/ui-meter/ui-meter.html +1 -1
  4. package/dist/index.js +1 -1
  5. package/docs/catalog.json +1 -1
  6. package/editor/components.css +19 -19
  7. package/editor/index.js +1125 -853
  8. package/package.json +3 -3
  9. package/styles/ui-action-bar.css +1 -1
  10. package/styles/ui-affordance-scope.css +1 -1
  11. package/styles/ui-avatar-group.css +1 -1
  12. package/styles/ui-avatar.css +1 -1
  13. package/styles/ui-badge.css +1 -1
  14. package/styles/ui-breadcrumb-item.css +1 -1
  15. package/styles/ui-breadcrumbs.css +1 -1
  16. package/styles/ui-button.css +1 -1
  17. package/styles/ui-calendar.css +1 -1
  18. package/styles/ui-callout.css +1 -1
  19. package/styles/ui-card-group.css +1 -1
  20. package/styles/ui-card.css +1 -1
  21. package/styles/ui-checkbox.css +1 -1
  22. package/styles/ui-cluster.css +1 -1
  23. package/styles/ui-color-picker.css +1 -1
  24. package/styles/ui-column.css +1 -1
  25. package/styles/ui-combobox.css +1 -1
  26. package/styles/ui-compact-content.css +1 -1
  27. package/styles/ui-compact-editor.css +1 -1
  28. package/styles/ui-compact-mark.css +1 -1
  29. package/styles/ui-compact-node.css +1 -1
  30. package/styles/ui-container.css +1 -1
  31. package/styles/ui-context-menu.css +1 -1
  32. package/styles/ui-cover.css +1 -1
  33. package/styles/ui-curve-editor.css +1 -1
  34. package/styles/ui-cycle-button.css +1 -1
  35. package/styles/ui-data-table.css +1 -1
  36. package/styles/ui-date-field.css +1 -1
  37. package/styles/ui-date-picker.css +1 -1
  38. package/styles/ui-date-range-picker.css +1 -1
  39. package/styles/ui-description-item.css +1 -1
  40. package/styles/ui-description-list.css +1 -1
  41. package/styles/ui-dialog.css +1 -1
  42. package/styles/ui-disclosure.css +1 -1
  43. package/styles/ui-editable.css +1 -1
  44. package/styles/ui-editor-block-actions.css +1 -1
  45. package/styles/ui-editor-chip-editor.css +1 -1
  46. package/styles/ui-editor-code-language.css +1 -1
  47. package/styles/ui-editor-footnote-editor.css +1 -1
  48. package/styles/ui-editor-formatting-tools.css +1 -1
  49. package/styles/ui-editor-image-toolbar.css +1 -1
  50. package/styles/ui-editor-insert-table-grid.css +1 -1
  51. package/styles/ui-editor-link-card.css +1 -1
  52. package/styles/ui-editor-link-form.css +1 -1
  53. package/styles/ui-editor-mention-menu-item.css +1 -1
  54. package/styles/ui-editor-mention-menu.css +1 -1
  55. package/styles/ui-editor-slash-menu-group.css +1 -1
  56. package/styles/ui-editor-slash-menu-item.css +1 -1
  57. package/styles/ui-editor-slash-menu.css +1 -1
  58. package/styles/ui-editor-surface.css +1 -1
  59. package/styles/ui-editor-table-context-menu.css +1 -1
  60. package/styles/ui-editor-table-overlay.css +1 -1
  61. package/styles/ui-editor-table-toolbar.css +1 -1
  62. package/styles/ui-editor-toolbar.css +1 -1
  63. package/styles/ui-editor.css +1 -1
  64. package/styles/ui-file-input.css +1 -1
  65. package/styles/ui-floating-action-button.css +1 -1
  66. package/styles/ui-form-field.css +1 -1
  67. package/styles/ui-grid.css +1 -1
  68. package/styles/ui-icon-button.css +1 -1
  69. package/styles/ui-icon.css +1 -1
  70. package/styles/ui-image.css +1 -1
  71. package/styles/ui-input-group.css +1 -1
  72. package/styles/ui-input.css +1 -1
  73. package/styles/ui-light-editor.css +1 -1
  74. package/styles/ui-list-item.css +1 -1
  75. package/styles/ui-list.css +1 -1
  76. package/styles/ui-listbox.css +1 -1
  77. package/styles/ui-menu-group.css +1 -1
  78. package/styles/ui-menu-item.css +1 -1
  79. package/styles/ui-menu.css +1 -1
  80. package/styles/ui-meter.css +1 -1
  81. package/styles/ui-nav-item.css +1 -1
  82. package/styles/ui-notice-stripe.css +1 -1
  83. package/styles/ui-number-input.css +1 -1
  84. package/styles/ui-page-header.css +1 -1
  85. package/styles/ui-pagination.css +1 -1
  86. package/styles/ui-popover.css +1 -1
  87. package/styles/ui-radio-group.css +1 -1
  88. package/styles/ui-radio.css +1 -1
  89. package/styles/ui-reel.css +1 -1
  90. package/styles/ui-scroll-area.css +1 -1
  91. package/styles/ui-search-result-row.css +1 -1
  92. package/styles/ui-search-shell.css +1 -1
  93. package/styles/ui-section.css +1 -1
  94. package/styles/ui-segmented-control.css +1 -1
  95. package/styles/ui-select.css +1 -1
  96. package/styles/ui-separator.css +1 -1
  97. package/styles/ui-sidebar.css +1 -1
  98. package/styles/ui-site-header.css +1 -1
  99. package/styles/ui-skeleton.css +1 -1
  100. package/styles/ui-slider.css +1 -1
  101. package/styles/ui-spinner.css +1 -1
  102. package/styles/ui-stack.css +1 -1
  103. package/styles/ui-status-message.css +1 -1
  104. package/styles/ui-swatch.css +1 -1
  105. package/styles/ui-switch.css +1 -1
  106. package/styles/ui-switcher.css +1 -1
  107. package/styles/ui-table.css +1 -1
  108. package/styles/ui-tabs.css +1 -1
  109. package/styles/ui-text.css +1 -1
  110. package/styles/ui-textarea.css +1 -1
  111. package/styles/ui-time-field.css +1 -1
  112. package/styles/ui-time-picker.css +1 -1
  113. package/styles/ui-toast-region.css +1 -1
  114. package/styles/ui-toast.css +1 -1
  115. package/styles/ui-tooltip.css +1 -1
  116. package/styles/ui-top-bar.css +1 -1
  117. package/styles/ui-tree-item.css +1 -1
  118. package/styles/ui-tree.css +1 -1
  119. package/styles/ui-wizard.css +1 -1
  120. package/vanilla/UiActionBar.d.ts +1 -1
  121. package/vanilla/UiActionBar.js +14 -12
  122. package/vanilla/UiAffordanceScope.d.ts +1 -1
  123. package/vanilla/UiAffordanceScope.js +13 -11
  124. package/vanilla/UiAvatar.d.ts +1 -1
  125. package/vanilla/UiAvatar.js +27 -25
  126. package/vanilla/UiAvatarGroup.d.ts +1 -1
  127. package/vanilla/UiAvatarGroup.js +26 -23
  128. package/vanilla/UiBadge.d.ts +1 -1
  129. package/vanilla/UiBadge.js +14 -12
  130. package/vanilla/UiBreadcrumbItem.d.ts +1 -1
  131. package/vanilla/UiBreadcrumbItem.js +14 -13
  132. package/vanilla/UiBreadcrumbs.d.ts +1 -1
  133. package/vanilla/UiBreadcrumbs.js +10 -10
  134. package/vanilla/UiButton.d.ts +1 -1
  135. package/vanilla/UiButton.js +187 -244
  136. package/vanilla/UiCalendar.d.ts +1 -1
  137. package/vanilla/UiCalendar.js +272 -193
  138. package/vanilla/UiCallout.d.ts +1 -1
  139. package/vanilla/UiCallout.js +32 -27
  140. package/vanilla/UiCard.d.ts +1 -1
  141. package/vanilla/UiCard.js +72 -69
  142. package/vanilla/UiCardGroup.d.ts +1 -1
  143. package/vanilla/UiCardGroup.js +17 -15
  144. package/vanilla/UiCheckbox.d.ts +1 -1
  145. package/vanilla/UiCheckbox.js +32 -30
  146. package/vanilla/UiCluster.d.ts +1 -1
  147. package/vanilla/UiCluster.js +20 -18
  148. package/vanilla/UiColorPicker.d.ts +1 -1
  149. package/vanilla/UiColorPicker.js +22 -20
  150. package/vanilla/UiColumn.d.ts +2 -2
  151. package/vanilla/UiColumn.js +18 -15
  152. package/vanilla/UiCombobox.d.ts +3 -3
  153. package/vanilla/UiCombobox.js +237 -174
  154. package/vanilla/UiCompactContent.d.ts +1 -1
  155. package/vanilla/UiCompactContent.js +13 -8
  156. package/vanilla/UiCompactEditor.d.ts +1 -1
  157. package/vanilla/UiCompactEditor.js +17 -12
  158. package/vanilla/UiCompactMark.d.ts +1 -1
  159. package/vanilla/UiCompactMark.js +47 -45
  160. package/vanilla/UiCompactNode.d.ts +2 -2
  161. package/vanilla/UiCompactNode.js +37 -33
  162. package/vanilla/UiContainer.d.ts +1 -1
  163. package/vanilla/UiContainer.js +13 -11
  164. package/vanilla/UiContextMenu.d.ts +1 -1
  165. package/vanilla/UiContextMenu.js +11 -9
  166. package/vanilla/UiCover.d.ts +1 -1
  167. package/vanilla/UiCover.js +13 -11
  168. package/vanilla/UiCurveEditor.d.ts +1 -1
  169. package/vanilla/UiCurveEditor.js +40 -38
  170. package/vanilla/UiCycleButton.d.ts +2 -2
  171. package/vanilla/UiCycleButton.js +31 -26
  172. package/vanilla/UiDataTable.d.ts +1 -1
  173. package/vanilla/UiDataTable.js +26 -20
  174. package/vanilla/UiDateField.d.ts +1 -1
  175. package/vanilla/UiDateField.js +78 -75
  176. package/vanilla/UiDatePicker.d.ts +1 -1
  177. package/vanilla/UiDatePicker.js +155 -149
  178. package/vanilla/UiDateRangePicker.d.ts +1 -1
  179. package/vanilla/UiDateRangePicker.js +136 -128
  180. package/vanilla/UiDescriptionItem.d.ts +1 -1
  181. package/vanilla/UiDescriptionItem.js +13 -11
  182. package/vanilla/UiDescriptionList.d.ts +1 -1
  183. package/vanilla/UiDescriptionList.js +13 -11
  184. package/vanilla/UiDialog.d.ts +1 -1
  185. package/vanilla/UiDialog.js +14 -14
  186. package/vanilla/UiDisclosure.d.ts +1 -1
  187. package/vanilla/UiDisclosure.js +28 -26
  188. package/vanilla/UiEditable.d.ts +1 -1
  189. package/vanilla/UiEditable.js +29 -27
  190. package/vanilla/UiEditor.d.ts +1 -1
  191. package/vanilla/UiEditor.js +62 -58
  192. package/vanilla/UiEditorBlockActions.d.ts +1 -1
  193. package/vanilla/UiEditorBlockActions.js +14 -12
  194. package/vanilla/UiEditorChipEditor.d.ts +1 -1
  195. package/vanilla/UiEditorChipEditor.js +22 -14
  196. package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
  197. package/vanilla/UiEditorCodeLanguage.js +23 -16
  198. package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
  199. package/vanilla/UiEditorFootnoteEditor.js +17 -9
  200. package/vanilla/UiEditorFormattingTools.d.ts +1 -1
  201. package/vanilla/UiEditorFormattingTools.js +108 -71
  202. package/vanilla/UiEditorImageToolbar.d.ts +1 -1
  203. package/vanilla/UiEditorImageToolbar.js +68 -66
  204. package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
  205. package/vanilla/UiEditorInsertTableGrid.js +50 -35
  206. package/vanilla/UiEditorLinkCard.d.ts +1 -1
  207. package/vanilla/UiEditorLinkCard.js +27 -25
  208. package/vanilla/UiEditorLinkForm.d.ts +1 -1
  209. package/vanilla/UiEditorLinkForm.js +79 -57
  210. package/vanilla/UiEditorMentionMenu.d.ts +1 -1
  211. package/vanilla/UiEditorMentionMenu.js +63 -44
  212. package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
  213. package/vanilla/UiEditorMentionMenuItem.js +22 -16
  214. package/vanilla/UiEditorSlashMenu.d.ts +1 -1
  215. package/vanilla/UiEditorSlashMenu.js +52 -33
  216. package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
  217. package/vanilla/UiEditorSlashMenuGroup.js +19 -14
  218. package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
  219. package/vanilla/UiEditorSlashMenuItem.js +27 -25
  220. package/vanilla/UiEditorSurface.d.ts +1 -1
  221. package/vanilla/UiEditorSurface.js +13 -11
  222. package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
  223. package/vanilla/UiEditorTableContextMenu.js +81 -52
  224. package/vanilla/UiEditorTableOverlay.d.ts +1 -1
  225. package/vanilla/UiEditorTableOverlay.js +107 -68
  226. package/vanilla/UiEditorTableToolbar.d.ts +1 -1
  227. package/vanilla/UiEditorTableToolbar.js +121 -70
  228. package/vanilla/UiEditorToolbar.d.ts +1 -1
  229. package/vanilla/UiEditorToolbar.js +20 -12
  230. package/vanilla/UiFileInput.d.ts +1 -1
  231. package/vanilla/UiFileInput.js +94 -80
  232. package/vanilla/UiFloatingActionButton.d.ts +1 -1
  233. package/vanilla/UiFloatingActionButton.js +21 -20
  234. package/vanilla/UiFormField.d.ts +1 -1
  235. package/vanilla/UiFormField.js +21 -19
  236. package/vanilla/UiGrid.d.ts +1 -1
  237. package/vanilla/UiGrid.js +26 -23
  238. package/vanilla/UiIcon.d.ts +1 -1
  239. package/vanilla/UiIcon.js +20 -15
  240. package/vanilla/UiIconButton.d.ts +1 -1
  241. package/vanilla/UiIconButton.js +35 -43
  242. package/vanilla/UiImage.d.ts +1 -1
  243. package/vanilla/UiImage.js +16 -14
  244. package/vanilla/UiInput.d.ts +1 -1
  245. package/vanilla/UiInput.js +29 -35
  246. package/vanilla/UiInputGroup.d.ts +1 -1
  247. package/vanilla/UiInputGroup.js +16 -14
  248. package/vanilla/UiLightEditor.d.ts +1 -1
  249. package/vanilla/UiLightEditor.js +29 -27
  250. package/vanilla/UiList.d.ts +1 -1
  251. package/vanilla/UiList.js +33 -27
  252. package/vanilla/UiListItem.d.ts +1 -1
  253. package/vanilla/UiListItem.js +12 -12
  254. package/vanilla/UiListbox.d.ts +1 -1
  255. package/vanilla/UiListbox.js +90 -80
  256. package/vanilla/UiMenu.d.ts +1 -1
  257. package/vanilla/UiMenu.js +20 -12
  258. package/vanilla/UiMenuGroup.d.ts +1 -1
  259. package/vanilla/UiMenuGroup.js +14 -11
  260. package/vanilla/UiMenuItem.d.ts +1 -1
  261. package/vanilla/UiMenuItem.js +74 -75
  262. package/vanilla/UiMeter.d.ts +1 -1
  263. package/vanilla/UiMeter.js +67 -62
  264. package/vanilla/UiNavItem.d.ts +1 -1
  265. package/vanilla/UiNavItem.js +63 -65
  266. package/vanilla/UiNoticeStripe.d.ts +1 -1
  267. package/vanilla/UiNoticeStripe.js +16 -16
  268. package/vanilla/UiNumberInput.d.ts +1 -1
  269. package/vanilla/UiNumberInput.js +41 -38
  270. package/vanilla/UiPageHeader.d.ts +1 -1
  271. package/vanilla/UiPageHeader.js +17 -15
  272. package/vanilla/UiPagination.d.ts +1 -1
  273. package/vanilla/UiPagination.js +53 -44
  274. package/vanilla/UiPopover.d.ts +1 -1
  275. package/vanilla/UiPopover.js +13 -11
  276. package/vanilla/UiRadio.d.ts +1 -1
  277. package/vanilla/UiRadio.js +25 -23
  278. package/vanilla/UiRadioGroup.d.ts +1 -1
  279. package/vanilla/UiRadioGroup.js +33 -36
  280. package/vanilla/UiReel.d.ts +1 -1
  281. package/vanilla/UiReel.js +20 -12
  282. package/vanilla/UiScrollArea.d.ts +1 -1
  283. package/vanilla/UiScrollArea.js +13 -11
  284. package/vanilla/UiSearchResultRow.d.ts +1 -1
  285. package/vanilla/UiSearchResultRow.js +21 -20
  286. package/vanilla/UiSearchShell.d.ts +1 -1
  287. package/vanilla/UiSearchShell.js +16 -14
  288. package/vanilla/UiSection.d.ts +1 -1
  289. package/vanilla/UiSection.js +48 -45
  290. package/vanilla/UiSegmentedControl.d.ts +2 -2
  291. package/vanilla/UiSegmentedControl.js +52 -47
  292. package/vanilla/UiSelect.d.ts +1 -1
  293. package/vanilla/UiSelect.js +17 -21
  294. package/vanilla/UiSeparator.d.ts +1 -1
  295. package/vanilla/UiSeparator.js +12 -12
  296. package/vanilla/UiSidebar.d.ts +1 -1
  297. package/vanilla/UiSidebar.js +17 -15
  298. package/vanilla/UiSiteHeader.d.ts +1 -1
  299. package/vanilla/UiSiteHeader.js +25 -23
  300. package/vanilla/UiSkeleton.d.ts +1 -1
  301. package/vanilla/UiSkeleton.js +21 -20
  302. package/vanilla/UiSlider.d.ts +1 -1
  303. package/vanilla/UiSlider.js +50 -47
  304. package/vanilla/UiSpinner.d.ts +1 -1
  305. package/vanilla/UiSpinner.js +34 -27
  306. package/vanilla/UiStack.d.ts +1 -1
  307. package/vanilla/UiStack.js +12 -12
  308. package/vanilla/UiStatusMessage.d.ts +1 -1
  309. package/vanilla/UiStatusMessage.js +22 -21
  310. package/vanilla/UiSwatch.d.ts +1 -1
  311. package/vanilla/UiSwatch.js +20 -17
  312. package/vanilla/UiSwitch.d.ts +1 -1
  313. package/vanilla/UiSwitch.js +25 -23
  314. package/vanilla/UiSwitcher.d.ts +1 -1
  315. package/vanilla/UiSwitcher.js +13 -11
  316. package/vanilla/UiTable.d.ts +1 -1
  317. package/vanilla/UiTable.js +13 -11
  318. package/vanilla/UiTabs.d.ts +1 -1
  319. package/vanilla/UiTabs.js +39 -28
  320. package/vanilla/UiText.d.ts +1 -1
  321. package/vanilla/UiText.js +128 -125
  322. package/vanilla/UiTextarea.d.ts +1 -1
  323. package/vanilla/UiTextarea.js +27 -39
  324. package/vanilla/UiTimeField.d.ts +1 -1
  325. package/vanilla/UiTimeField.js +42 -40
  326. package/vanilla/UiTimePicker.d.ts +1 -1
  327. package/vanilla/UiTimePicker.js +105 -102
  328. package/vanilla/UiToast.d.ts +1 -1
  329. package/vanilla/UiToast.js +14 -14
  330. package/vanilla/UiToastRegion.d.ts +1 -1
  331. package/vanilla/UiToastRegion.js +61 -31
  332. package/vanilla/UiTooltip.d.ts +1 -1
  333. package/vanilla/UiTooltip.js +17 -14
  334. package/vanilla/UiTopBar.d.ts +1 -1
  335. package/vanilla/UiTopBar.js +24 -22
  336. package/vanilla/UiTree.d.ts +1 -1
  337. package/vanilla/UiTree.js +17 -12
  338. package/vanilla/UiTreeItem.d.ts +1 -1
  339. package/vanilla/UiTreeItem.js +73 -79
  340. package/vanilla/UiWizard.d.ts +1 -1
  341. package/vanilla/UiWizard.js +61 -40
@@ -1,5 +1,5 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, defineComponent } from "@nextwebwg/html-next/generated-runtime";
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, buildTemplate, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkFormat, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
3
3
  import "../styles/ui-cover.css";
4
4
 
5
5
  const T0 = ["",[],4];
@@ -9,12 +9,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-cover", b: generatedInputs
9
9
  const D = { g: "ui-cover", props: { "size": { "required":false,"values":["screen","fill"],"default":"screen", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
10
10
 
11
11
  export function createUiCover(options = {}, html) {
12
- const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
12
+ const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
13
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["size"].includes(name)));
13
14
  const element = document.createElement("div");
14
- for (const [name, value] of Object.entries(attributes)) {
15
- if (value === null || value === undefined || value === false) continue;
16
- element.setAttribute(name, value === true ? "" : String(value));
17
- }
18
15
  element.setAttribute("component", "ui-cover");
19
16
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
20
17
  const v = [null];
@@ -28,19 +25,24 @@ export function createUiCover(options = {}, html) {
28
25
  const p1 = (r, c, d) => {
29
26
  };
30
27
  const p0 = (r, c, d) => {
28
+ if (c === -1) {
29
+ resetForwardedAttributes(r.n, attributes, r.v0);
30
+ r.v0 = forwardAttributes(r.n, attributes);
31
+ }
31
32
  if (c & 1) {
32
33
  const x0 = hostState(["size"], [v[0]]);
33
- const s0 = x0;
34
- if (s0 !== r.v0) writeAttribute(r.n, "data-ui-cover-state", (r.v0 = s0) === "" ? null : s0);
34
+ const s1 = x0;
35
+ if (s1 !== r.v1) writeAttribute(r.n, "data-ui-cover-state", (r.v1 = s1) === "" ? null : s1);
35
36
  }
36
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a0, r.e0, "", J, false, undefined, d);
37
+ if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a1, r.e0, "", J, false, undefined, d);
37
38
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
38
39
  else if (r.b0 !== undefined) p1(r.b0, c, d);
39
40
  };
40
41
  const t0 = element.firstChild;
41
- const R = { n: element, v0: undefined, a0: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
42
+ const R = { n: element, v0: undefined, v1: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, f0: undefined };
42
43
  const I = { B };
43
44
  const J = project(I, children, slots);
45
+ I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
44
46
  attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
45
47
  manageProps(I);
46
48
  return element;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiCurveEditorEventMap {
3
3
  input: CustomEvent<{ readonly value: string }>;
4
4
  change: CustomEvent<{ readonly value: string }>;
@@ -1,5 +1,5 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, toAttribute, toText, writeAttribute, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, checkBoolean, checkFormat, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, buildTemplate, toAttribute, toText, writeAttribute, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, checkBoolean, checkFormat, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
3
  import * as controller from "../components/ui-curve-editor/ui-curve-editor.js";
4
4
  import "../styles/ui-curve-editor.css";
5
5
 
@@ -10,93 +10,94 @@ const D = { g: "ui-curve-editor", props: { "disabled": { "required":false,"defau
10
10
  const C = (host) => activateModule(controller, host);
11
11
 
12
12
  export function createUiCurveEditor(options = {}, html) {
13
- const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
13
+ const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
14
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["disabled","label","size","value"].includes(name)));
14
15
  const element = document.createElement("span");
15
- for (const [name, value] of Object.entries(attributes)) {
16
- if (value === null || value === undefined || value === false) continue;
17
- element.setAttribute(name, value === true ? "" : String(value));
18
- }
19
16
  element.setAttribute("component", "ui-curve-editor");
20
17
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
21
18
  const v = ["0.25", "0.1", "0.25", "1", null, null, null, null];
22
19
  const B = acceptProps(element, D, S.n, v, componentProps, [], html);
23
20
  const p0 = (r, c, d) => {
21
+ if (c === -1) {
22
+ resetForwardedAttributes(r.n, attributes, r.v0);
23
+ r.v0 = forwardAttributes(r.n, attributes);
24
+ }
24
25
  if (c & 32) {
25
26
  const x0 = v[5];
26
- const s0 = toAttribute(x0, "aria-label");
27
- if (s0 !== r.v0) writeAttribute(r.a0, "aria-label", r.v0 = s0);
27
+ const s1 = toAttribute(x0, "aria-label");
28
+ if (s1 !== r.v1) writeAttribute(r.a1, "aria-label", r.v1 = s1);
28
29
  }
29
30
  if (c & 16) {
30
31
  const x1 = v[4];
31
- const s1 = toAttribute(x1, "disabled");
32
- if (s1 !== r.v1) writeAttribute(r.a5, "disabled", r.v1 = s1);
33
32
  const s2 = toAttribute(x1, "disabled");
34
33
  if (s2 !== r.v2) writeAttribute(r.a6, "disabled", r.v2 = s2);
34
+ const s3 = toAttribute(x1, "disabled");
35
+ if (s3 !== r.v3) writeAttribute(r.a7, "disabled", r.v3 = s3);
35
36
  }
36
37
  if (c & 1) {
37
38
  const x2 = v[0];
38
- const s3 = toAttribute(x2, "value");
39
- if (s3 !== r.v3) writeAttribute(r.a7, "value", r.v3 = s3);
39
+ const s4 = toAttribute(x2, "value");
40
+ if (s4 !== r.v4) writeAttribute(r.a8, "value", r.v4 = s4);
40
41
  }
41
42
  if (c & 1073741888) {
42
43
  const x3 = v[6];
43
- const s4 = toAttribute(x3, "size");
44
- if (s4 !== r.v4) writeAttribute(r.a7, "size", r.v4 = s4);
44
+ const s5 = toAttribute(x3, "size");
45
+ if (s5 !== r.v5) writeAttribute(r.a8, "size", r.v5 = s5);
45
46
  }
46
47
  if (c & 16) {
47
48
  const x4 = v[4];
48
- const s5 = toAttribute(x4, "disabled");
49
- if (s5 !== r.v5) writeAttribute(r.a7, "disabled", r.v5 = s5);
49
+ const s6 = toAttribute(x4, "disabled");
50
+ if (s6 !== r.v6) writeAttribute(r.a8, "disabled", r.v6 = s6);
50
51
  }
51
52
  if (c & 2) {
52
53
  const x5 = v[1];
53
- const s6 = toAttribute(x5, "value");
54
- if (s6 !== r.v6) writeAttribute(r.a8, "value", r.v6 = s6);
54
+ const s7 = toAttribute(x5, "value");
55
+ if (s7 !== r.v7) writeAttribute(r.a9, "value", r.v7 = s7);
55
56
  }
56
57
  if (c & 1073741888) {
57
58
  const x6 = v[6];
58
- const s7 = toAttribute(x6, "size");
59
- if (s7 !== r.v7) writeAttribute(r.a8, "size", r.v7 = s7);
59
+ const s8 = toAttribute(x6, "size");
60
+ if (s8 !== r.v8) writeAttribute(r.a9, "size", r.v8 = s8);
60
61
  }
61
62
  if (c & 16) {
62
63
  const x7 = v[4];
63
- const s8 = toAttribute(x7, "disabled");
64
- if (s8 !== r.v8) writeAttribute(r.a8, "disabled", r.v8 = s8);
64
+ const s9 = toAttribute(x7, "disabled");
65
+ if (s9 !== r.v9) writeAttribute(r.a9, "disabled", r.v9 = s9);
65
66
  }
66
67
  if (c & 4) {
67
68
  const x8 = v[2];
68
- const s9 = toAttribute(x8, "value");
69
- if (s9 !== r.v9) writeAttribute(r.a9, "value", r.v9 = s9);
69
+ const s10 = toAttribute(x8, "value");
70
+ if (s10 !== r.v10) writeAttribute(r.a10, "value", r.v10 = s10);
70
71
  }
71
72
  if (c & 1073741888) {
72
73
  const x9 = v[6];
73
- const s10 = toAttribute(x9, "size");
74
- if (s10 !== r.v10) writeAttribute(r.a9, "size", r.v10 = s10);
74
+ const s11 = toAttribute(x9, "size");
75
+ if (s11 !== r.v11) writeAttribute(r.a10, "size", r.v11 = s11);
75
76
  }
76
77
  if (c & 16) {
77
78
  const x10 = v[4];
78
- const s11 = toAttribute(x10, "disabled");
79
- if (s11 !== r.v11) writeAttribute(r.a9, "disabled", r.v11 = s11);
79
+ const s12 = toAttribute(x10, "disabled");
80
+ if (s12 !== r.v12) writeAttribute(r.a10, "disabled", r.v12 = s12);
80
81
  }
81
82
  if (c & 8) {
82
83
  const x11 = v[3];
83
- const s12 = toAttribute(x11, "value");
84
- if (s12 !== r.v12) writeAttribute(r.a10, "value", r.v12 = s12);
84
+ const s13 = toAttribute(x11, "value");
85
+ if (s13 !== r.v13) writeAttribute(r.a11, "value", r.v13 = s13);
85
86
  }
86
87
  if (c & 1073741888) {
87
88
  const x12 = v[6];
88
- const s13 = toAttribute(x12, "size");
89
- if (s13 !== r.v13) writeAttribute(r.a10, "size", r.v13 = s13);
89
+ const s14 = toAttribute(x12, "size");
90
+ if (s14 !== r.v14) writeAttribute(r.a11, "size", r.v14 = s14);
90
91
  }
91
92
  if (c & 16) {
92
93
  const x13 = v[4];
93
- const s14 = toAttribute(x13, "disabled");
94
- if (s14 !== r.v14) writeAttribute(r.a10, "disabled", r.v14 = s14);
94
+ const s15 = toAttribute(x13, "disabled");
95
+ if (s15 !== r.v15) writeAttribute(r.a11, "disabled", r.v15 = s15);
95
96
  }
96
97
  if (c & 128) {
97
98
  const x14 = v[7];
98
- const s15 = toText(x14);
99
- if (s15 !== r.v15) r.a12.data = r.v15 = s15;
99
+ const s16 = toText(x14);
100
+ if (s16 !== r.v16) r.a13.data = r.v16 = s16;
100
101
  }
101
102
  };
102
103
  const t0 = element.firstChild.nextSibling;
@@ -117,9 +118,10 @@ export function createUiCurveEditor(options = {}, html) {
117
118
  const t15 = t13.nextSibling.nextSibling.firstChild.nextSibling;
118
119
  const t16 = t8.nextSibling.nextSibling;
119
120
  const t17 = t16.firstChild;
120
- const R = { a0: t0, a5: t6, a6: t7, a7: t10, a8: t12, a9: t14, a10: t15, a12: t17, v0: null, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null, v7: null, v8: null, v9: null, v10: null, v11: null, v12: null, v13: null, v14: null, v15: "" };
121
+ const R = { n: element, a1: t0, a6: t6, a7: t7, a8: t10, a9: t12, a10: t14, a11: t15, a13: t17, v0: undefined, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null, v7: null, v8: null, v9: null, v10: null, v11: null, v12: null, v13: null, v14: null, v15: null, v16: "" };
121
122
  const I = { B };
122
123
  I.R = new Set();
124
+ I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
123
125
  attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, undefined, I);
124
126
  manageProps(I);
125
127
  I.r["plot"] = t1;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiCycleButtonEventMap {
3
3
  change: CustomEvent<{ readonly value: string; readonly index: number }>;
4
4
  }
@@ -15,7 +15,7 @@ export interface UiCycleButtonProps {
15
15
  disabled?: boolean | null;
16
16
  emptyLabel?: string | null;
17
17
  index?: number | null;
18
- items: readonly ({ readonly value: string; readonly label: string; readonly icon: string })[];
18
+ items: readonly ({ readonly value: string; readonly label: string; readonly icon: string })[] | null;
19
19
  label?: string | null;
20
20
  size?: "sm" | "md" | "lg" | null;
21
21
  variant?: "ghost" | "outline" | "solid" | null;
@@ -1,21 +1,21 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, stateInitializers, binaryValue, buildTemplate, checkReference, defaultValue, NONCONFORMING, readDeclared, readFailing, readIndex, readMember, textCall, toAttribute, truthy, writeAttribute, computedCycle, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, awaitInput, evaluateInput, inputRead, inputDefault, READY_INPUT, UNRESOLVED_INPUT, notifyPropertySet, ABSENT, readonlyView, checkBoolean, checkFormat, checkList, checkNumber, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, checkedReferenceValue, referenceSchemaAt, stateInitializers, binaryValue, buildTemplate, NONCONFORMING, readFailing, readIndex, readMember, textCall, toAttribute, truthy, writeAttribute, computedCycle, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, awaitInput, evaluateInput, inputRead, inputDefault, READY_INPUT, UNRESOLVED_INPUT, notifyPropertySet, ABSENT, readonlyView, checkBoolean, checkFormat, checkList, checkNumber, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
3
  import * as controller from "../components/ui-cycle-button/ui-cycle-button.js";
4
4
  import "../styles/ui-cycle-button.css";
5
5
 
6
6
  const T0 = ["",[],["ui-icon-button",["tone","neutral"],["ui-icon",[]]]];
7
+ const RC0 = [["o"], "object({ value: string, label: string, icon: string })"];
8
+ const RC1 = [0, "", { }, RC0, 0];
9
+ const RC2 = ["n", "number"];
7
10
  let P0;
8
11
  const S = { n: ["current","selected"], t: ["n","?"], f: import.meta.url, g: "ui-cycle-button", k: 1, d: { "change": [detailCheck(checkObject([["value", checkString, false], ["index", checkNumber, false]], false)), true, true, false] }, x: dispatchDeclared, r: readonlyView, a: (host, I) => C(host, I), b: generatedInputs };
9
12
  const D = { g: "ui-cycle-button", props: { "description": { "required":false,"default":"Activate to choose the next state.", c: checkString, t: "string", j: 0, m: "s" }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "emptyLabel": { "required":false,"default":"No choices", c: checkString, t: "string", j: 0, m: "s" }, "index": { "required":false,"default":0, c: checkNumber, t: "number", j: 0, m: "n" }, "items": { "required":true, c: checkList(checkObject([["value", checkString, false], ["label", checkString, false], ["icon", checkString, false]], false)), j: 1, m: ["l",["o",["value","s","label","s","icon","s"]]] }, "label": { "required":false,"default":"State", c: checkString, t: "string", j: 0, m: "s" }, "size": { "required":false,"values":["sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["ghost","outline","solid"],"default":"outline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
10
13
  const C = (host) => activateModule(controller, host);
11
14
 
12
15
  export function createUiCycleButton(options, html) {
13
- const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
16
+ const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
17
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["description","disabled","empty-label","index","items","label","size","variant"].includes(name)));
14
18
  const element = document.createElement("span");
15
- for (const [name, value] of Object.entries(attributes)) {
16
- if (value === null || value === undefined || value === false) continue;
17
- element.setAttribute(name, value === true ? "" : String(value));
18
- }
19
19
  element.setAttribute("component", "ui-cycle-button");
20
20
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
21
21
  const v = [null, undefined, null, null, null, null, null, null, null, null];
@@ -24,7 +24,7 @@ export function createUiCycleButton(options, html) {
24
24
  const inputStatus = (j) => { if (j === 0) return E.status(j); if (j >= 1 && j < 2) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 2) return awaitInput(B, "description", true); if (j === 3) return awaitInput(B, "disabled", true); if (j === 4) return awaitInput(B, "emptyLabel", true); if (j === 5) return awaitInput(B, "index", true); if (j === 6) return awaitInput(B, "items", true); if (j === 7) return awaitInput(B, "label", true); if (j === 8) return awaitInput(B, "size", true); if (j === 9) return awaitInput(B, "variant", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
25
25
  const X = { e: 0, g: (j) => g(j), w: new Set(), a: CS, i: inputStatus };
26
26
  const ke = [];
27
- const K = [() => (checkReference(S, v[0], "n", "expression:default($items[default($current, 0)], $items[0]):current", "Reference `current` must satisfy number.") && checkReference(S, readDeclared(v[6], ["0"]), ["o",["value","s","label","s","icon","s"]], "expression:default($items[default($current, 0)], $items[0]):items.0", "Reference `items.0` must satisfy object({ value: string, label: string, icon: string }).") ? inputDefault(() => readIndex(inputRead(v[6], inputStatus(6)), inputDefault(() => inputRead(E.read(0), inputStatus(0)), () => 0, ABSENT)), () => readIndex(inputRead(v[6], inputStatus(6)), 0), ABSENT) : NONCONFORMING)];
27
+ const K = [() => inputDefault(() => (() => { let x = inputRead(v[6], inputStatus(6)), t = RC1, k; k = inputDefault(() => checkedReferenceValue(S, inputRead(E.read(0), inputStatus(0)), RC2, "expression:default($items[default($current, 0)], $items[0]):current", "current"), () => 0, ABSENT); x = readIndex(x, k); t = referenceSchemaAt(t, k); return checkedReferenceValue(S, x, t, "expression:default($items[default($current, 0)], $items[0]):items[computed]", "items[computed]"); })(), () => checkedReferenceValue(S, readIndex(inputRead(v[6], inputStatus(6)), 0), RC0, "expression:default($items[default($current, 0)], $items[0]):items.0", "items.0"), ABSENT)];
28
28
  const g = (j) => {
29
29
  const i = j - 1;
30
30
  if (ke[i] === X.e) return v[j];
@@ -37,52 +37,57 @@ export function createUiCycleButton(options, html) {
37
37
  if (!Object.is(previous, next)) { v[j] = next; X.n?.(j, previous, next); }
38
38
  return next;
39
39
  };
40
- const E = stateInitializers(S, v, X, { 0: () => inputRead(v[5], inputStatus(5)) });
40
+ const E = stateInitializers(S, v, X, { 0: () => (inputRead(v[5], inputStatus(5))) });
41
41
  const p0 = (r, c, d) => {
42
+ if (c === -1) {
43
+ resetForwardedAttributes(r.n, attributes, r.v0);
44
+ r.v0 = forwardAttributes(r.n, attributes);
45
+ }
42
46
  if (c & 1073742033) {
43
- const x0 = textCall("concat", [v[7], ": ", defaultValue(readFailing(g(1), "label"), v[4])]);
47
+ const x0 = textCall("concat", [v[7], ": ", ((q) => q === ABSENT || q == null ? v[4] : q)(readFailing(g(1), "label"))]);
44
48
  if (x0 !== NONCONFORMING) {
45
- const s0 = toAttribute(x0, "label");
46
- if (s0 !== r.v0) writeAttribute(r.a0, "label", r.v0 = s0);
49
+ const s1 = toAttribute(x0, "label");
50
+ if (s1 !== r.v1) writeAttribute(r.a1, "label", r.v1 = s1);
47
51
  }
48
52
  if (x0 !== NONCONFORMING) {
49
- const s1 = toAttribute(x0, "title");
50
- if (s1 !== r.v1) writeAttribute(r.a0, "title", r.v1 = s1);
53
+ const s2 = toAttribute(x0, "title");
54
+ if (s2 !== r.v2) writeAttribute(r.a1, "title", r.v2 = s2);
51
55
  }
52
56
  }
53
57
  if (c & 1073742080) {
54
58
  const x1 = v[8];
55
- const s2 = toAttribute(x1, "size");
56
- if (s2 !== r.v2) writeAttribute(r.a0, "size", r.v2 = s2);
59
+ const s3 = toAttribute(x1, "size");
60
+ if (s3 !== r.v3) writeAttribute(r.a1, "size", r.v3 = s3);
57
61
  }
58
62
  if (c & 1073742336) {
59
63
  const x2 = v[9];
60
- const s3 = toAttribute(x2, "variant");
61
- if (s3 !== r.v3) writeAttribute(r.a0, "variant", r.v3 = s3);
64
+ const s4 = toAttribute(x2, "variant");
65
+ if (s4 !== r.v4) writeAttribute(r.a1, "variant", r.v4 = s4);
62
66
  }
63
67
  if (c & 1073741896) {
64
68
  const x3 = (truthy(v[3]) || truthy(binaryValue("<", readMember(v[6], "length"), 2)));
65
- const s4 = toAttribute(x3, "disabled");
66
- if (s4 !== r.v4) writeAttribute(r.a0, "disabled", r.v4 = s4);
69
+ const s5 = toAttribute(x3, "disabled");
70
+ if (s5 !== r.v5) writeAttribute(r.a1, "disabled", r.v5 = s5);
67
71
  }
68
72
  if (c & 4) {
69
73
  const x4 = v[2];
70
- const s5 = toAttribute(x4, "aria-description");
71
- if (s5 !== r.v5) writeAttribute(r.a0, "aria-description", r.v5 = s5);
74
+ const s6 = toAttribute(x4, "aria-description");
75
+ if (s6 !== r.v6) writeAttribute(r.a1, "aria-description", r.v6 = s6);
72
76
  }
73
77
  if (c & 1073741889) {
74
- const x5 = defaultValue(readFailing(g(1), "icon"), "");
78
+ const x5 = ((q) => q === ABSENT || q == null ? "" : q)(readFailing(g(1), "icon"));
75
79
  if (x5 !== NONCONFORMING) {
76
- const s6 = toAttribute(x5, "name");
77
- if (s6 !== r.v6) writeAttribute(r.a1, "name", r.v6 = s6);
80
+ const s7 = toAttribute(x5, "name");
81
+ if (s7 !== r.v7) writeAttribute(r.a2, "name", r.v7 = s7);
78
82
  }
79
83
  }
80
84
  };
81
85
  const t0 = element.firstChild;
82
86
  const t1 = t0.firstChild;
83
- const R = { a0: t0, a1: t1, v0: null, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null };
87
+ const R = { n: element, a1: t0, a2: t1, v0: undefined, v1: null, v2: null, v3: null, v4: null, v5: null, v6: null, v7: null };
84
88
  const I = { B, U: E };
85
89
  I.R = new Set();
90
+ I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
86
91
  attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, X, I);
87
92
  manageProps(I);
88
93
  return element;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiDataTableEventMap {
3
3
  }
4
4
  export interface UiDataTableElement extends HTMLDivElement {
@@ -1,5 +1,5 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, binaryValue, buildTemplate, clearRegion, NONCONFORMING, readIndex, readMember, textCall, toAttribute, toText, trackContainer, truthy, writeAttribute, plainObject, dispose, PositionalList, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, awaitInput, READY_INPUT, UNRESOLVED_INPUT, project, fillSlot, ABSENT, readonlyView, checkFormat, checkInteger, checkList, checkObject, checkString, warnOnce, childList, childOutlet, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, checkedReferenceValue, binaryValue, buildTemplate, clearRegion, NONCONFORMING, readIndex, readMember, textCall, toAttribute, toText, trackContainer, truthy, writeAttribute, plainObject, dispose, PositionalList, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, awaitInput, READY_INPUT, UNRESOLVED_INPUT, project, fillSlot, ABSENT, readonlyView, checkFormat, checkInteger, checkList, checkObject, checkString, warnOnce, childList, childOutlet, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
3
  import * as controller from "../components/ui-data-table/ui-data-table.js";
4
4
  import "../styles/ui-data-table.css";
5
5
 
@@ -10,6 +10,8 @@ const T3 = ["tr",[],2];
10
10
  const T4 = ["td",[],"\n ",4,"\n "];
11
11
  const T5 = ["",[],0];
12
12
  const K0 = (v0) => (plainObject(v0));
13
+ const RC0 = ["n", "number"];
14
+ const RC1 = [["o"], "object({ ... })"];
13
15
  const OP0 = { "ui-column": (s) => { const t = {}; if ("row" in s) { const y = s["row"]; t["row"] = (y != null && y !== ABSENT && (K0(y) || (warnOnce(S, "slot:cell:row", "Slot `cell` prop `row` does not satisfy its declared type `object({ ... })`."), false)) ? y : null); } return t; } };
14
16
  const OF = {"ui-column":[["header"],["cell"],["header","cell"],"`header` and `cell`"]};
15
17
  let P0, P1, P2, P3, P4, P5;
@@ -19,12 +21,9 @@ const D = { g: "ui-data-table", props: { "caption": { "required":false, c: check
19
21
  const C = (host) => activateModule(controller, host);
20
22
 
21
23
  export function createUiDataTable(options = {}, html) {
22
- const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
24
+ const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
25
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["caption","density","frozen-rows","row-key","rows"].includes(name)));
23
26
  const element = document.createElement("div");
24
- for (const [name, value] of Object.entries(attributes)) {
25
- if (value === null || value === undefined || value === false) continue;
26
- element.setAttribute(name, value === true ? "" : String(value));
27
- }
28
27
  element.setAttribute("component", "ui-data-table");
29
28
  element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
30
29
  const v = [null, null, null, null, null, null];
@@ -66,12 +65,14 @@ export function createUiDataTable(options = {}, html) {
66
65
  const p3 = (r, c, d) => {
67
66
  const o = r.i;
68
67
  if (c & -1073741816) {
69
- const x0 = binaryValue("<", r.j, v[3]);
70
- const s0 = truthy(x0);
71
- if (s0 !== r.v0) r.n.classList.toggle("frozen", r.v0 = s0);
68
+ const x0 = binaryValue("<", checkedReferenceValue(S, r.j, RC0, "expression:$r < $frozenRows:r", "r"), v[3]);
69
+ if (x0 !== NONCONFORMING) {
70
+ const s0 = truthy(x0);
71
+ if (s0 !== r.v0) r.n.classList.toggle("frozen", r.v0 = s0);
72
+ }
72
73
  }
73
74
  if (c & -1073741824) {
74
- const x1 = textCall("concat", ["var(--_ui-row-", r.j, ", 0)"]);
75
+ const x1 = textCall("concat", ["var(--_ui-row-", checkedReferenceValue(S, r.j, RC0, "expression:concat('var(--_ui-row-', $r, ', 0)'):r", "r"), ", 0)"]);
75
76
  if (x1 !== NONCONFORMING) {
76
77
  const s1 = toText(x1);
77
78
  if (s1 !== r.v1) r.n.style.setProperty("--_ui-top", r.v1 = s1);
@@ -99,14 +100,14 @@ export function createUiDataTable(options = {}, html) {
99
100
  if (s1 !== r.v1) writeAttribute(r.n, "data-ui-frozen", r.v1 = s1);
100
101
  }
101
102
  if (c & -1073741824) {
102
- const x2 = textCall("concat", ["var(--_ui-col-", r.j, ", 0)"]);
103
+ const x2 = textCall("concat", ["var(--_ui-col-", checkedReferenceValue(S, r.j, RC0, "expression:concat('var(--_ui-col-', $c, ', 0)'):c", "c"), ", 0)"]);
103
104
  if (x2 !== NONCONFORMING) {
104
105
  const s2 = toText(x2);
105
106
  if (s2 !== r.v2) r.n.style.setProperty("--_ui-side", r.v2 = s2);
106
107
  }
107
108
  }
108
109
  if (r.f0 === undefined) r.f0 = childOutlet(r, r.a1, r.e0, "cell", OF, S, (d, at) => m5(d, undefined, r), p5, true, OP0);
109
- r.f0(trackContainer(r, o), v[0], { "row": trackContainer(r, r.u.i) }, c, d);
110
+ r.f0(trackContainer(r, o), v[0], { "row": trackContainer(r, checkedReferenceValue(S, r.u.i, RC1, "expression:$row:row", "row")) }, c, d);
110
111
  };
111
112
  const m5 = (d, o, u) => {
112
113
  const n = (P5 ??= buildTemplate(T5)).cloneNode(true);
@@ -124,30 +125,35 @@ export function createUiDataTable(options = {}, html) {
124
125
  }
125
126
  };
126
127
  const p0 = (r, c, d) => {
128
+ if (c === -1) {
129
+ resetForwardedAttributes(r.n, attributes, r.v0);
130
+ r.v0 = forwardAttributes(r.n, attributes);
131
+ }
127
132
  if (c & 4) {
128
133
  const x0 = hostState(["density"], [v[2]]);
129
- const s0 = x0;
130
- if (s0 !== r.v0) writeAttribute(r.n, "data-ui-data-table-state", (r.v0 = s0) === "" ? null : s0);
134
+ const s1 = x0;
135
+ if (s1 !== r.v1) writeAttribute(r.n, "data-ui-data-table-state", (r.v1 = s1) === "" ? null : s1);
131
136
  }
132
137
  if (c & 2 && !(truthy(v[1])) !== !r.b0) {
133
- if (r.b0) { r.b0 = undefined; clearRegion(r.a0, r.e0); }
138
+ if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
134
139
  else { r.b0 = m1(d); r.e0.before(r.b0.n); }
135
140
  } else if (r.b0 !== undefined) p1(r.b0, c, d);
136
- if (c & 1073741872) { const l = v[5]; { if (c === -1 || (c & 16) !== 0) r.L2.set(l, d, true); else r.L2.update(l, d, c); } }
137
- if (c !== -1 && c & 9) r.L2.each(c, d);
138
- if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a1, r.e1, "", J, false, undefined, d);
141
+ if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a2, r.e1, "", J, false, undefined, d);
139
142
  if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
140
143
  else if (r.b1 !== undefined) p2(r.b1, c, d);
144
+ if (c & 1073741872) { const l = v[5]; { if (c === -1 || (c & 16) !== 0) r.L2.set(l, d, true); else r.L2.update(l, d, c); } }
145
+ if (c !== -1 && c & 9) r.L2.each(c, d);
141
146
  };
142
147
  const t0 = element.firstChild.nextSibling;
143
148
  const t1 = t0.firstChild;
144
149
  const t2 = t1.nextSibling.nextSibling;
145
150
  const t3 = t2.firstChild.firstChild;
146
151
  const t4 = t2.nextSibling.firstChild;
147
- const R = { n: element, v0: undefined, a0: t1, e0: t1.nextSibling, b0: undefined, a1: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, L2: new PositionalList(t4, t4.nextSibling, m3, p3, (o) => readIndex(o, v[4]), "row") };
152
+ const R = { n: element, v0: undefined, v1: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, a2: t3, e1: t3.nextSibling, b1: undefined, f1: undefined, L2: new PositionalList(t4, t4.nextSibling, m3, p3, (o) => readIndex(o, v[4]), "row") };
148
153
  const I = { B };
149
154
  const J = project(I, children, slots);
150
155
  const L0 = childList(I, S, v, 0, J, "", ["ui-column"], "`ui-data-table`'s default slot", "`ui-column`");
156
+ I.F = { values: attributes, draw: () => ((c, d) => { c |= L0(c, d); ((c, d) => p0(R, c, d))(c, d); })(-1) };
151
157
  attachGeneratedController(element, S, v, ((c, d) => { c |= L0(c, d); ((c, d) => p0(R, c, d))(c, d); }), undefined, X, I);
152
158
  manageProps(I);
153
159
  return element;
@@ -1,4 +1,4 @@
1
- // Generated by HTML Next 1.0.0-alpha.91 for Vanilla DOM. Do not edit.
1
+ // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
2
  export interface UiDateFieldEventMap {
3
3
  input: CustomEvent<{ readonly value: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
4
4
  change: CustomEvent<{ readonly value: string; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;