@threadlabs/looma 0.52.12 → 0.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/shared/overlay.js +7 -0
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +2 -2
- package/components/ui-meter/ui-meter.html +1 -1
- package/dist/index.js +1 -1
- package/docs/catalog.json +1 -1
- package/editor/chunks/extensions.js +2 -2
- package/editor/components.css +19 -19
- package/editor/index.js +1125 -853
- package/package.json +3 -3
- package/styles/ui-action-bar.css +1 -1
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-breadcrumb-item.css +1 -1
- package/styles/ui-breadcrumbs.css +1 -1
- package/styles/ui-button.css +1 -1
- package/styles/ui-calendar.css +1 -1
- package/styles/ui-callout.css +1 -1
- package/styles/ui-card-group.css +1 -1
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-cluster.css +1 -1
- package/styles/ui-color-picker.css +1 -1
- package/styles/ui-column.css +1 -1
- package/styles/ui-combobox.css +1 -1
- package/styles/ui-compact-content.css +1 -1
- package/styles/ui-compact-editor.css +1 -1
- package/styles/ui-compact-mark.css +1 -1
- package/styles/ui-compact-node.css +1 -1
- package/styles/ui-container.css +1 -1
- package/styles/ui-context-menu.css +1 -1
- package/styles/ui-cover.css +1 -1
- package/styles/ui-curve-editor.css +1 -1
- package/styles/ui-cycle-button.css +1 -1
- package/styles/ui-data-table.css +1 -1
- package/styles/ui-date-field.css +1 -1
- package/styles/ui-date-picker.css +1 -1
- package/styles/ui-date-range-picker.css +1 -1
- package/styles/ui-description-item.css +1 -1
- package/styles/ui-description-list.css +1 -1
- package/styles/ui-dialog.css +1 -1
- package/styles/ui-disclosure.css +1 -1
- package/styles/ui-editable.css +1 -1
- package/styles/ui-editor-block-actions.css +1 -1
- package/styles/ui-editor-chip-editor.css +1 -1
- package/styles/ui-editor-code-language.css +1 -1
- package/styles/ui-editor-footnote-editor.css +1 -1
- package/styles/ui-editor-formatting-tools.css +1 -1
- package/styles/ui-editor-image-toolbar.css +1 -1
- package/styles/ui-editor-insert-table-grid.css +1 -1
- package/styles/ui-editor-link-card.css +1 -1
- package/styles/ui-editor-link-form.css +1 -1
- package/styles/ui-editor-mention-menu-item.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-slash-menu-group.css +1 -1
- package/styles/ui-editor-slash-menu-item.css +1 -1
- package/styles/ui-editor-slash-menu.css +1 -1
- package/styles/ui-editor-surface.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +1 -1
- package/styles/ui-editor-table-toolbar.css +1 -1
- package/styles/ui-editor-toolbar.css +1 -1
- package/styles/ui-editor.css +1 -1
- package/styles/ui-file-input.css +1 -1
- package/styles/ui-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +1 -1
- package/styles/ui-grid.css +1 -1
- package/styles/ui-icon-button.css +1 -1
- package/styles/ui-icon.css +1 -1
- package/styles/ui-image.css +1 -1
- package/styles/ui-input-group.css +1 -1
- package/styles/ui-input.css +1 -1
- package/styles/ui-light-editor.css +1 -1
- package/styles/ui-list-item.css +1 -1
- package/styles/ui-list.css +1 -1
- package/styles/ui-listbox.css +1 -1
- package/styles/ui-menu-group.css +1 -1
- package/styles/ui-menu-item.css +1 -1
- package/styles/ui-menu.css +1 -1
- package/styles/ui-meter.css +1 -1
- package/styles/ui-nav-item.css +1 -1
- package/styles/ui-notice-stripe.css +1 -1
- package/styles/ui-number-input.css +1 -1
- package/styles/ui-page-header.css +1 -1
- package/styles/ui-pagination.css +1 -1
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +1 -1
- package/styles/ui-scroll-area.css +1 -1
- package/styles/ui-search-result-row.css +1 -1
- package/styles/ui-search-shell.css +1 -1
- package/styles/ui-section.css +1 -1
- package/styles/ui-segmented-control.css +1 -1
- package/styles/ui-select.css +1 -1
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +1 -1
- package/styles/ui-site-header.css +1 -1
- package/styles/ui-skeleton.css +1 -1
- package/styles/ui-slider.css +1 -1
- package/styles/ui-spinner.css +1 -1
- package/styles/ui-stack.css +1 -1
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-swatch.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +1 -1
- package/styles/ui-table.css +1 -1
- package/styles/ui-tabs.css +1 -1
- package/styles/ui-text.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/styles/ui-time-field.css +1 -1
- package/styles/ui-time-picker.css +1 -1
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-toast.css +1 -1
- package/styles/ui-tooltip.css +1 -1
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +1 -1
- package/styles/ui-tree.css +1 -1
- package/styles/ui-wizard.css +1 -1
- package/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +14 -12
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +13 -11
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +27 -25
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +26 -23
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +14 -12
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +14 -13
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +10 -10
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +187 -244
- package/vanilla/UiCalendar.d.ts +1 -1
- package/vanilla/UiCalendar.js +272 -193
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +32 -27
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +72 -69
- package/vanilla/UiCardGroup.d.ts +1 -1
- package/vanilla/UiCardGroup.js +17 -15
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +32 -30
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +20 -18
- package/vanilla/UiColorPicker.d.ts +1 -1
- package/vanilla/UiColorPicker.js +22 -20
- package/vanilla/UiColumn.d.ts +2 -2
- package/vanilla/UiColumn.js +18 -15
- package/vanilla/UiCombobox.d.ts +3 -3
- package/vanilla/UiCombobox.js +237 -174
- package/vanilla/UiCompactContent.d.ts +1 -1
- package/vanilla/UiCompactContent.js +13 -8
- package/vanilla/UiCompactEditor.d.ts +1 -1
- package/vanilla/UiCompactEditor.js +17 -12
- package/vanilla/UiCompactMark.d.ts +1 -1
- package/vanilla/UiCompactMark.js +47 -45
- package/vanilla/UiCompactNode.d.ts +2 -2
- package/vanilla/UiCompactNode.js +37 -33
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +13 -11
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +11 -9
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +13 -11
- package/vanilla/UiCurveEditor.d.ts +1 -1
- package/vanilla/UiCurveEditor.js +40 -38
- package/vanilla/UiCycleButton.d.ts +2 -2
- package/vanilla/UiCycleButton.js +31 -26
- package/vanilla/UiDataTable.d.ts +1 -1
- package/vanilla/UiDataTable.js +26 -20
- package/vanilla/UiDateField.d.ts +1 -1
- package/vanilla/UiDateField.js +78 -75
- package/vanilla/UiDatePicker.d.ts +1 -1
- package/vanilla/UiDatePicker.js +155 -149
- package/vanilla/UiDateRangePicker.d.ts +1 -1
- package/vanilla/UiDateRangePicker.js +136 -128
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +13 -11
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +13 -11
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +14 -14
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +28 -26
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +29 -27
- package/vanilla/UiEditor.d.ts +1 -1
- package/vanilla/UiEditor.js +62 -58
- package/vanilla/UiEditorBlockActions.d.ts +1 -1
- package/vanilla/UiEditorBlockActions.js +14 -12
- package/vanilla/UiEditorChipEditor.d.ts +1 -1
- package/vanilla/UiEditorChipEditor.js +22 -14
- package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
- package/vanilla/UiEditorCodeLanguage.js +23 -16
- package/vanilla/UiEditorFootnoteEditor.d.ts +1 -1
- package/vanilla/UiEditorFootnoteEditor.js +17 -9
- package/vanilla/UiEditorFormattingTools.d.ts +1 -1
- package/vanilla/UiEditorFormattingTools.js +108 -71
- package/vanilla/UiEditorImageToolbar.d.ts +1 -1
- package/vanilla/UiEditorImageToolbar.js +68 -66
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +50 -35
- package/vanilla/UiEditorLinkCard.d.ts +1 -1
- package/vanilla/UiEditorLinkCard.js +27 -25
- package/vanilla/UiEditorLinkForm.d.ts +1 -1
- package/vanilla/UiEditorLinkForm.js +79 -57
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +63 -44
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +22 -16
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +52 -33
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +19 -14
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +27 -25
- package/vanilla/UiEditorSurface.d.ts +1 -1
- package/vanilla/UiEditorSurface.js +13 -11
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +81 -52
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +107 -68
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +121 -70
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +20 -12
- package/vanilla/UiFileInput.d.ts +1 -1
- package/vanilla/UiFileInput.js +94 -80
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +21 -20
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +21 -19
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +26 -23
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +20 -15
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +35 -43
- package/vanilla/UiImage.d.ts +1 -1
- package/vanilla/UiImage.js +16 -14
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +29 -35
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +16 -14
- package/vanilla/UiLightEditor.d.ts +1 -1
- package/vanilla/UiLightEditor.js +29 -27
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +33 -27
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +12 -12
- package/vanilla/UiListbox.d.ts +1 -1
- package/vanilla/UiListbox.js +90 -80
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +20 -12
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +14 -11
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +74 -75
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +67 -62
- package/vanilla/UiNavItem.d.ts +1 -1
- package/vanilla/UiNavItem.js +63 -65
- package/vanilla/UiNoticeStripe.d.ts +1 -1
- package/vanilla/UiNoticeStripe.js +16 -16
- package/vanilla/UiNumberInput.d.ts +1 -1
- package/vanilla/UiNumberInput.js +41 -38
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +17 -15
- package/vanilla/UiPagination.d.ts +1 -1
- package/vanilla/UiPagination.js +53 -44
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +13 -11
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +25 -23
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +33 -36
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +20 -12
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +13 -11
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +21 -20
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +16 -14
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +48 -45
- package/vanilla/UiSegmentedControl.d.ts +2 -2
- package/vanilla/UiSegmentedControl.js +52 -47
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +17 -21
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +12 -12
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +17 -15
- package/vanilla/UiSiteHeader.d.ts +1 -1
- package/vanilla/UiSiteHeader.js +25 -23
- package/vanilla/UiSkeleton.d.ts +1 -1
- package/vanilla/UiSkeleton.js +21 -20
- package/vanilla/UiSlider.d.ts +1 -1
- package/vanilla/UiSlider.js +50 -47
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +34 -27
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +12 -12
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +22 -21
- package/vanilla/UiSwatch.d.ts +1 -1
- package/vanilla/UiSwatch.js +20 -17
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +25 -23
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +13 -11
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +13 -11
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +39 -28
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +128 -125
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +27 -39
- package/vanilla/UiTimeField.d.ts +1 -1
- package/vanilla/UiTimeField.js +42 -40
- package/vanilla/UiTimePicker.d.ts +1 -1
- package/vanilla/UiTimePicker.js +105 -102
- package/vanilla/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +14 -14
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +61 -31
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +17 -14
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +24 -22
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +17 -12
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +73 -79
- package/vanilla/UiWizard.d.ts +1 -1
- package/vanilla/UiWizard.js +61 -40
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, readMember, toAttribute, trackContainer, writeAttribute, IndexedList, acceptProps, manageProps, generatedInputs, 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, readMember, toAttribute, trackContainer, writeAttribute, IndexedList, acceptProps, manageProps, generatedInputs, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-compact-content/ui-compact-content.js";
|
|
4
4
|
import "../styles/ui-compact-content.css";
|
|
5
5
|
|
|
@@ -12,12 +12,9 @@ const D = { g: "ui-compact-content", props: { "content": { "required":false,"def
|
|
|
12
12
|
const C = (host) => activateModule(controller, host);
|
|
13
13
|
|
|
14
14
|
export function createUiCompactContent(options = {}, html) {
|
|
15
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
15
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
16
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["content"].includes(name)));
|
|
16
17
|
const element = document.createElement("div");
|
|
17
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
18
|
-
if (value === null || value === undefined || value === false) continue;
|
|
19
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
20
|
-
}
|
|
21
18
|
element.setAttribute("class", ["looma-compact-content", element.getAttribute("class")].filter(Boolean).join(" "));
|
|
22
19
|
element.setAttribute("component", "ui-compact-content");
|
|
23
20
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -39,11 +36,19 @@ export function createUiCompactContent(options = {}, html) {
|
|
|
39
36
|
}
|
|
40
37
|
};
|
|
41
38
|
const p0 = (r, c, d) => {
|
|
39
|
+
if (c === -1) {
|
|
40
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
41
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
42
|
+
const x0 = "looma-compact-content";
|
|
43
|
+
const s1 = toAttribute(x0, "class");
|
|
44
|
+
writeAttribute(r.n, "class", r.v1 = s1);
|
|
45
|
+
}
|
|
42
46
|
if (c & 1073741825) r.L0.update(readMember(v[0], "content"), d, c);
|
|
43
47
|
};
|
|
44
48
|
const t0 = element.firstChild;
|
|
45
|
-
const R = { L0: new IndexedList(t0, t0.nextSibling, m1, p1, undefined, "node") };
|
|
49
|
+
const R = { n: element, v0: undefined, v1: undefined, L0: new IndexedList(t0, t0.nextSibling, m1, p1, undefined, "node") };
|
|
46
50
|
const I = { B };
|
|
51
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
47
52
|
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
|
|
48
53
|
manageProps(I);
|
|
49
54
|
return element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
2
|
import type { RequestEvent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
export interface UiCompactEditorEventMap {
|
|
4
4
|
change: CustomEvent<{ readonly content: { readonly type: string; readonly [name: string]: unknown } }>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, clearRegion, toAttribute, writeAttribute, dispatchDeclared, detailCheck, acceptProps, manageProps, generatedInputs, checkBoolean, checkObject, checkString, requestHost, 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, clearRegion, toAttribute, writeAttribute, dispatchDeclared, detailCheck, acceptProps, manageProps, generatedInputs, checkBoolean, checkObject, checkString, forwardAttributes, resetForwardedAttributes, requestHost, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-compact-editor/ui-compact-editor.js";
|
|
4
4
|
import "../styles/ui-compact-editor.css";
|
|
5
5
|
|
|
@@ -11,12 +11,9 @@ const D = { g: "ui-compact-editor", props: { "content": { "required":false,"defa
|
|
|
11
11
|
const C = (host, I) => activateModule(controller, requestHost(host, I));
|
|
12
12
|
|
|
13
13
|
export function createUiCompactEditor(options = {}, html) {
|
|
14
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
14
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
15
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["content","editable","id","label"].includes(name)));
|
|
15
16
|
const element = document.createElement("div");
|
|
16
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
17
|
-
if (value === null || value === undefined || value === false) continue;
|
|
18
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
19
|
-
}
|
|
20
17
|
element.setAttribute("class", ["looma-compact-editor", element.getAttribute("class")].filter(Boolean).join(" "));
|
|
21
18
|
element.setAttribute("component", "ui-compact-editor");
|
|
22
19
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
@@ -36,21 +33,29 @@ export function createUiCompactEditor(options = {}, html) {
|
|
|
36
33
|
}
|
|
37
34
|
};
|
|
38
35
|
const p0 = (r, c, d) => {
|
|
36
|
+
if (c === -1) {
|
|
37
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
38
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
39
|
+
const x0 = "looma-compact-editor";
|
|
40
|
+
const s1 = toAttribute(x0, "class");
|
|
41
|
+
writeAttribute(r.n, "class", r.v1 = s1);
|
|
42
|
+
}
|
|
39
43
|
if (c & 1) {
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
44
|
+
const x1 = !v[0];
|
|
45
|
+
const s2 = toAttribute(x1, "hidden");
|
|
46
|
+
if (s2 !== r.v2) writeAttribute(r.a2, "hidden", r.v2 = s2);
|
|
43
47
|
}
|
|
44
48
|
if (c & 1 && !(!v[0]) !== !r.b0) {
|
|
45
|
-
if (r.b0) { r.b0 = undefined; clearRegion(r.
|
|
49
|
+
if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
|
|
46
50
|
else { r.b0 = m1(d); r.e0.before(r.b0.n); }
|
|
47
51
|
} else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
48
52
|
};
|
|
49
53
|
const t0 = element.firstChild.nextSibling;
|
|
50
54
|
const t1 = t0.nextSibling.nextSibling.nextSibling;
|
|
51
|
-
const R = {
|
|
55
|
+
const R = { n: element, a2: t1, v0: undefined, v1: undefined, v2: null, a1: t0, e0: t0.nextSibling, b0: undefined };
|
|
52
56
|
const I = { B };
|
|
53
57
|
I.R = new Set();
|
|
58
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
54
59
|
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);
|
|
55
60
|
manageProps(I);
|
|
56
61
|
I.r["mount"] = t1;
|
package/vanilla/UiCompactMark.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, binaryValue, buildTemplate, clearRegion, readIndex, readMember, toAttribute, toText, truthy, writeAttribute, dispose, acceptProps, manageProps, generatedInputs, armElement, replaceRoot, checkInteger, checkList, checkObject, checkString, 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, equalValue, binaryValue, buildTemplate, clearRegion, readIndex, readMember, toAttribute, toText, truthy, writeAttribute, dispose, acceptProps, manageProps, generatedInputs, armElement, replaceRoot, checkInteger, checkList, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-compact-mark.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],["ui-compact-mark",[]]];
|
|
@@ -15,38 +15,23 @@ const Q = [[],[],[],[]];
|
|
|
15
15
|
const D = { g: "ui-compact-mark", props: { "index": { "required":false,"default":-1, c: checkInteger, t: "integer", j: 0, m: "i" }, "marks": { "required":false,"default":[], c: checkList(checkObject([["type", checkString, false]], true)), j: 1, m: ["l",["o",["type","s"],1]] }, "text": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" } } };
|
|
16
16
|
|
|
17
17
|
export function createUiCompactMark(options = {}, html) {
|
|
18
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
18
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
19
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["index","marks","text"].includes(name)));
|
|
19
20
|
const v = [null, null, null];
|
|
20
21
|
let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
|
|
21
|
-
let a = ((truthy(binaryValue(">=", v[0], 0)) && (readMember(readIndex(v[1], v[0]), "type")
|
|
22
|
+
let a = ((truthy(binaryValue(">=", v[0], 0)) && truthy(equalValue(readMember(readIndex(v[1], v[0]), "type"), "bold"))) ? 0 : (truthy(binaryValue(">=", v[0], 0)) && truthy(equalValue(readMember(readIndex(v[1], v[0]), "type"), "italic"))) ? 1 : (truthy(binaryValue(">=", v[0], 0)) && truthy(equalValue(readMember(readIndex(v[1], v[0]), "type"), "code"))) ? 2 : 3);
|
|
22
23
|
let element;
|
|
23
24
|
if (a === 0) {
|
|
24
25
|
element = document.createElement("strong");
|
|
25
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
26
|
-
if (value === null || value === undefined || value === false) continue;
|
|
27
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
28
|
-
}
|
|
29
26
|
element.setAttribute("component", "ui-compact-mark");
|
|
30
27
|
} else if (a === 1) {
|
|
31
28
|
element = document.createElement("em");
|
|
32
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
33
|
-
if (value === null || value === undefined || value === false) continue;
|
|
34
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
35
|
-
}
|
|
36
29
|
element.setAttribute("component", "ui-compact-mark");
|
|
37
30
|
} else if (a === 2) {
|
|
38
31
|
element = document.createElement("code");
|
|
39
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
40
|
-
if (value === null || value === undefined || value === false) continue;
|
|
41
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
42
|
-
}
|
|
43
32
|
element.setAttribute("component", "ui-compact-mark");
|
|
44
33
|
} else {
|
|
45
34
|
element = document.createElement("span");
|
|
46
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
47
|
-
if (value === null || value === undefined || value === false) continue;
|
|
48
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
49
|
-
}
|
|
50
35
|
element.setAttribute("component", "ui-compact-mark");
|
|
51
36
|
}
|
|
52
37
|
B = acceptProps(element, D, S.n, v, componentProps, Q[a], html);
|
|
@@ -90,90 +75,106 @@ export function createUiCompactMark(options = {}, html) {
|
|
|
90
75
|
const m0 = (n, d) => {
|
|
91
76
|
n.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
92
77
|
const t0 = n.firstChild;
|
|
93
|
-
const r = { n,
|
|
78
|
+
const r = { n, a1: t0, v0: undefined, v1: null, v2: null, v3: null };
|
|
94
79
|
p0(r, -1, d);
|
|
95
80
|
return r;
|
|
96
81
|
};
|
|
97
82
|
const p0 = (r, c, d) => {
|
|
83
|
+
if (c === -1) {
|
|
84
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
85
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
86
|
+
}
|
|
98
87
|
if (c & 4) {
|
|
99
88
|
const x0 = v[2];
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
89
|
+
const s1 = toAttribute(x0, "text");
|
|
90
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "text", r.v1 = s1);
|
|
102
91
|
}
|
|
103
92
|
if (c & 1073741826) {
|
|
104
93
|
const x1 = v[1];
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
94
|
+
const s2 = toAttribute(x1, "marks");
|
|
95
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "marks", r.v2 = s2);
|
|
107
96
|
}
|
|
108
97
|
if (c & 1) {
|
|
109
98
|
const x2 = binaryValue("-", v[0], 1);
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
99
|
+
const s3 = toAttribute(x2, "index");
|
|
100
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "index", r.v3 = s3);
|
|
112
101
|
}
|
|
113
102
|
};
|
|
114
103
|
const m1 = (n, d) => {
|
|
115
104
|
n.append((P1 ??= buildTemplate(T1)).cloneNode(true));
|
|
116
105
|
const t0 = n.firstChild;
|
|
117
|
-
const r = { n,
|
|
106
|
+
const r = { n, a1: t0, v0: undefined, v1: null, v2: null, v3: null };
|
|
118
107
|
p1(r, -1, d);
|
|
119
108
|
return r;
|
|
120
109
|
};
|
|
121
110
|
const p1 = (r, c, d) => {
|
|
111
|
+
if (c === -1) {
|
|
112
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
113
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
114
|
+
}
|
|
122
115
|
if (c & 4) {
|
|
123
116
|
const x0 = v[2];
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
117
|
+
const s1 = toAttribute(x0, "text");
|
|
118
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "text", r.v1 = s1);
|
|
126
119
|
}
|
|
127
120
|
if (c & 1073741826) {
|
|
128
121
|
const x1 = v[1];
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
122
|
+
const s2 = toAttribute(x1, "marks");
|
|
123
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "marks", r.v2 = s2);
|
|
131
124
|
}
|
|
132
125
|
if (c & 1) {
|
|
133
126
|
const x2 = binaryValue("-", v[0], 1);
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
127
|
+
const s3 = toAttribute(x2, "index");
|
|
128
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "index", r.v3 = s3);
|
|
136
129
|
}
|
|
137
130
|
};
|
|
138
131
|
const m2 = (n, d) => {
|
|
139
132
|
n.append((P2 ??= buildTemplate(T2)).cloneNode(true));
|
|
140
133
|
const t0 = n.firstChild;
|
|
141
|
-
const r = { n,
|
|
134
|
+
const r = { n, a1: t0, v0: undefined, v1: null, v2: null, v3: null };
|
|
142
135
|
p2(r, -1, d);
|
|
143
136
|
return r;
|
|
144
137
|
};
|
|
145
138
|
const p2 = (r, c, d) => {
|
|
139
|
+
if (c === -1) {
|
|
140
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
141
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
142
|
+
}
|
|
146
143
|
if (c & 4) {
|
|
147
144
|
const x0 = v[2];
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
145
|
+
const s1 = toAttribute(x0, "text");
|
|
146
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "text", r.v1 = s1);
|
|
150
147
|
}
|
|
151
148
|
if (c & 1073741826) {
|
|
152
149
|
const x1 = v[1];
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
150
|
+
const s2 = toAttribute(x1, "marks");
|
|
151
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "marks", r.v2 = s2);
|
|
155
152
|
}
|
|
156
153
|
if (c & 1) {
|
|
157
154
|
const x2 = binaryValue("-", v[0], 1);
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
155
|
+
const s3 = toAttribute(x2, "index");
|
|
156
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "index", r.v3 = s3);
|
|
160
157
|
}
|
|
161
158
|
};
|
|
162
159
|
const m3 = (n, d) => {
|
|
163
160
|
n.append((P3 ??= buildTemplate(T3)).cloneNode(true));
|
|
164
161
|
const t0 = n.firstChild;
|
|
165
162
|
const t1 = t0.nextSibling.nextSibling;
|
|
166
|
-
const r = { n,
|
|
163
|
+
const r = { n, v0: undefined, a1: t0, e0: t0.nextSibling, b0: undefined, a2: t1, e1: t1.nextSibling, b1: undefined };
|
|
167
164
|
p3(r, -1, d);
|
|
168
165
|
return r;
|
|
169
166
|
};
|
|
170
167
|
const p3 = (r, c, d) => {
|
|
168
|
+
if (c === -1) {
|
|
169
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
170
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
171
|
+
}
|
|
171
172
|
if (c & 1 && !(truthy(binaryValue(">=", v[0], 0))) !== !r.b0) {
|
|
172
|
-
if (r.b0) { r.b0 = undefined; clearRegion(r.
|
|
173
|
+
if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
|
|
173
174
|
else { r.b0 = m4(d); r.e0.before(r.b0.n); }
|
|
174
175
|
} else if (r.b0 !== undefined) p4(r.b0, c, d);
|
|
175
176
|
if (c & 1 && !(truthy(binaryValue("<", v[0], 0))) !== !r.b1) {
|
|
176
|
-
if (r.b1) { r.b1 = undefined; clearRegion(r.
|
|
177
|
+
if (r.b1) { r.b1 = undefined; clearRegion(r.a2, r.e1); }
|
|
177
178
|
else { r.b1 = m5(d); r.e1.before(r.b1.n); }
|
|
178
179
|
} else if (r.b1 !== undefined) p5(r.b1, c, d);
|
|
179
180
|
};
|
|
@@ -183,7 +184,7 @@ export function createUiCompactMark(options = {}, html) {
|
|
|
183
184
|
if (R === null) return;
|
|
184
185
|
if (R === undefined) { R = M[a](element, d); return; }
|
|
185
186
|
if (c & 1073741827) {
|
|
186
|
-
const t = ((truthy(binaryValue(">=", v[0], 0)) && (readMember(readIndex(v[1], v[0]), "type")
|
|
187
|
+
const t = ((truthy(binaryValue(">=", v[0], 0)) && truthy(equalValue(readMember(readIndex(v[1], v[0]), "type"), "bold"))) ? 0 : (truthy(binaryValue(">=", v[0], 0)) && truthy(equalValue(readMember(readIndex(v[1], v[0]), "type"), "italic"))) ? 1 : (truthy(binaryValue(">=", v[0], 0)) && truthy(equalValue(readMember(readIndex(v[1], v[0]), "type"), "code"))) ? 2 : 3);
|
|
187
188
|
if (t !== a) {
|
|
188
189
|
dispose(R);
|
|
189
190
|
for (const key in I.r) delete I.r[key];
|
|
@@ -199,6 +200,7 @@ export function createUiCompactMark(options = {}, html) {
|
|
|
199
200
|
N[a](R, c, d);
|
|
200
201
|
};
|
|
201
202
|
const I = { B };
|
|
203
|
+
I.F = { values: attributes, draw: () => p(-1) };
|
|
202
204
|
attachGeneratedController(element, S, v, p, undefined, undefined, I);
|
|
203
205
|
manageProps(I);
|
|
204
206
|
return element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
2
|
export interface UiCompactNodeEventMap {
|
|
3
3
|
}
|
|
4
4
|
export interface UiCompactNodeElement extends HTMLElement {
|
|
@@ -10,7 +10,7 @@ export interface UiCompactNodeElement extends HTMLElement {
|
|
|
10
10
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
11
11
|
}
|
|
12
12
|
export interface UiCompactNodeProps {
|
|
13
|
-
node: { readonly type: string; readonly [name: string]: unknown };
|
|
13
|
+
node: { readonly type: string; readonly [name: string]: unknown } | null;
|
|
14
14
|
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
15
15
|
children?: readonly (string | Node)[];
|
|
16
16
|
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
package/vanilla/UiCompactNode.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, binaryValue, buildTemplate,
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, equalValue, binaryValue, buildTemplate, NONCONFORMING, readMember, toAttribute, trackContainer, truthy, writeAttribute, dispose, IndexedList, acceptProps, manageProps, generatedInputs, armElement, replaceRoot, ABSENT, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, subtract } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-compact-node.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],2];
|
|
@@ -15,38 +15,23 @@ const Q = [[],[],[],[]];
|
|
|
15
15
|
const D = { g: "ui-compact-node", props: { "node": { "required":true, c: checkObject([["type", checkString, false]], true), j: 1, m: ["o",["type","s"],1] } } };
|
|
16
16
|
|
|
17
17
|
export function createUiCompactNode(options, html) {
|
|
18
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
18
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
19
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["node"].includes(name)));
|
|
19
20
|
const v = [null];
|
|
20
21
|
let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
|
|
21
|
-
let a = ((readMember(v[0], "type")
|
|
22
|
+
let a = (truthy(equalValue(readMember(v[0], "type"), "paragraph")) ? 0 : truthy(equalValue(readMember(v[0], "type"), "hardBreak")) ? 1 : truthy(equalValue(readMember(v[0], "type"), "text")) ? 2 : 3);
|
|
22
23
|
let element;
|
|
23
24
|
if (a === 0) {
|
|
24
25
|
element = document.createElement("p");
|
|
25
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
26
|
-
if (value === null || value === undefined || value === false) continue;
|
|
27
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
28
|
-
}
|
|
29
26
|
element.setAttribute("component", "ui-compact-node");
|
|
30
27
|
} else if (a === 1) {
|
|
31
28
|
element = document.createElement("br");
|
|
32
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
33
|
-
if (value === null || value === undefined || value === false) continue;
|
|
34
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
35
|
-
}
|
|
36
29
|
element.setAttribute("component", "ui-compact-node");
|
|
37
30
|
} else if (a === 2) {
|
|
38
31
|
element = document.createElement("span");
|
|
39
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
40
|
-
if (value === null || value === undefined || value === false) continue;
|
|
41
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
42
|
-
}
|
|
43
32
|
element.setAttribute("component", "ui-compact-node");
|
|
44
33
|
} else {
|
|
45
34
|
element = document.createElement("span");
|
|
46
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
47
|
-
if (value === null || value === undefined || value === false) continue;
|
|
48
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
49
|
-
}
|
|
50
35
|
element.setAttribute("component", "ui-compact-node");
|
|
51
36
|
}
|
|
52
37
|
B = acceptProps(element, D, S.n, v, componentProps, Q[a], html);
|
|
@@ -83,48 +68,66 @@ export function createUiCompactNode(options, html) {
|
|
|
83
68
|
const m0 = (n, d) => {
|
|
84
69
|
n.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
85
70
|
const t0 = n.firstChild;
|
|
86
|
-
const r = { n, L0: new IndexedList(t0, t0.nextSibling, m1, p1, undefined, "child") };
|
|
71
|
+
const r = { n, v0: undefined, L0: new IndexedList(t0, t0.nextSibling, m1, p1, undefined, "child") };
|
|
87
72
|
p0(r, -1, d);
|
|
88
73
|
return r;
|
|
89
74
|
};
|
|
90
75
|
const p0 = (r, c, d) => {
|
|
76
|
+
if (c === -1) {
|
|
77
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
78
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
79
|
+
}
|
|
91
80
|
if (c & 1073741825) r.L0.update(readMember(v[0], "content"), d, c);
|
|
92
81
|
};
|
|
93
82
|
const m2 = (n, d) => {
|
|
94
|
-
const r = { n };
|
|
83
|
+
const r = { n, v0: undefined };
|
|
95
84
|
p2(r, -1, d);
|
|
96
85
|
return r;
|
|
97
86
|
};
|
|
98
87
|
const p2 = (r, c, d) => {
|
|
88
|
+
if (c === -1) {
|
|
89
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
90
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
91
|
+
}
|
|
99
92
|
};
|
|
100
93
|
const m3 = (n, d) => {
|
|
101
94
|
n.append((P3 ??= buildTemplate(T3)).cloneNode(true));
|
|
102
95
|
const t0 = n.firstChild;
|
|
103
|
-
const r = { n,
|
|
96
|
+
const r = { n, a1: t0, v0: undefined, v1: null, v2: null, v3: null };
|
|
104
97
|
p3(r, -1, d);
|
|
105
98
|
return r;
|
|
106
99
|
};
|
|
107
100
|
const p3 = (r, c, d) => {
|
|
101
|
+
if (c === -1) {
|
|
102
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
103
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
104
|
+
}
|
|
108
105
|
if (c & 1073741825) {
|
|
109
106
|
const x0 = readMember(v[0], "text");
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
const x1 =
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
115
|
-
const x2 = binaryValue("-",
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
const s1 = toAttribute(x0, "text");
|
|
108
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "text", r.v1 = s1);
|
|
109
|
+
const x1 = ((q) => q === ABSENT || q == null ? [] : q)(readMember(v[0], "marks"));
|
|
110
|
+
const s2 = toAttribute(x1, "marks");
|
|
111
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "marks", r.v2 = s2);
|
|
112
|
+
const x2 = binaryValue("-", ((q) => q === ABSENT || q == null ? 0 : q)(readMember(readMember(v[0], "marks"), "length")), 1, undefined, undefined, subtract);
|
|
113
|
+
if (x2 !== NONCONFORMING) {
|
|
114
|
+
const s3 = toAttribute(x2, "index");
|
|
115
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "index", r.v3 = s3);
|
|
116
|
+
}
|
|
118
117
|
}
|
|
119
118
|
};
|
|
120
119
|
const m4 = (n, d) => {
|
|
121
120
|
n.append((P4 ??= buildTemplate(T4)).cloneNode(true));
|
|
122
121
|
const t0 = n.firstChild;
|
|
123
|
-
const r = { n, L0: new IndexedList(t0, t0.nextSibling, m5, p5, undefined, "child") };
|
|
122
|
+
const r = { n, v0: undefined, L0: new IndexedList(t0, t0.nextSibling, m5, p5, undefined, "child") };
|
|
124
123
|
p4(r, -1, d);
|
|
125
124
|
return r;
|
|
126
125
|
};
|
|
127
126
|
const p4 = (r, c, d) => {
|
|
127
|
+
if (c === -1) {
|
|
128
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
129
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
130
|
+
}
|
|
128
131
|
if (c & 1073741825) r.L0.update(readMember(v[0], "content"), d, c);
|
|
129
132
|
};
|
|
130
133
|
const M = [m0, m2, m3, m4], N = [p0, p2, p3, p4];
|
|
@@ -133,7 +136,7 @@ export function createUiCompactNode(options, html) {
|
|
|
133
136
|
if (R === null) return;
|
|
134
137
|
if (R === undefined) { R = M[a](element, d); return; }
|
|
135
138
|
if (c & 1073741825) {
|
|
136
|
-
const t = ((readMember(v[0], "type")
|
|
139
|
+
const t = (truthy(equalValue(readMember(v[0], "type"), "paragraph")) ? 0 : truthy(equalValue(readMember(v[0], "type"), "hardBreak")) ? 1 : truthy(equalValue(readMember(v[0], "type"), "text")) ? 2 : 3);
|
|
137
140
|
if (t !== a) {
|
|
138
141
|
dispose(R);
|
|
139
142
|
for (const key in I.r) delete I.r[key];
|
|
@@ -149,6 +152,7 @@ export function createUiCompactNode(options, html) {
|
|
|
149
152
|
N[a](R, c, d);
|
|
150
153
|
};
|
|
151
154
|
const I = { B };
|
|
155
|
+
I.F = { values: attributes, draw: () => p(-1) };
|
|
152
156
|
attachGeneratedController(element, S, v, p, undefined, undefined, I);
|
|
153
157
|
manageProps(I);
|
|
154
158
|
return element;
|
package/vanilla/UiContainer.d.ts
CHANGED
package/vanilla/UiContainer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, 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, checkBoolean, checkFormat, forwardAttributes, resetForwardedAttributes, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-container.css";
|
|
4
4
|
|
|
5
5
|
const T0 = ["",[],4];
|
|
@@ -9,12 +9,9 @@ const S = { n: [], t: [], f: import.meta.url, g: "ui-container", b: generatedInp
|
|
|
9
9
|
const D = { g: "ui-container", props: { "fill": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "gutters": { "required":false,"values":["s","m","l"], c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "measure": { "required":false,"values":["narrow","wide"], c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
10
10
|
|
|
11
11
|
export function createUiContainer(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]) => !["fill","gutters","measure"].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-container");
|
|
19
16
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
20
17
|
const v = [null, null, null];
|
|
@@ -28,19 +25,24 @@ export function createUiContainer(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 & 7) {
|
|
32
33
|
const x0 = hostState(["measure","fill","gutters"], [v[2], v[0], v[1]]);
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
34
|
+
const s1 = x0;
|
|
35
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-ui-container-state", (r.v1 = s1) === "" ? null : s1);
|
|
35
36
|
}
|
|
36
|
-
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.
|
|
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,
|
|
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.
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
|
|
2
2
|
export interface UiContextMenuEventMap {
|
|
3
3
|
open: CustomEvent<{ readonly open: boolean; readonly reason: "action" | "programmatic" | "light-dismiss" | "escape"; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
|
4
4
|
close: CustomEvent<{ readonly open: boolean; readonly reason: "action" | "programmatic" | "light-dismiss" | "escape"; readonly trigger: "keyboard" | "pointer" | "programmatic" }>;
|
package/vanilla/UiContextMenu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Generated by HTML Next 1.0.0-alpha.
|
|
2
|
-
import { attachGeneratedController, buildTemplate, dispatchDeclared, detailCheck, dispose, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, 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, dispatchDeclared, detailCheck, dispose, keywordFormat, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import * as controller from "../components/ui-context-menu/ui-context-menu.js";
|
|
4
4
|
import "../styles/ui-context-menu.css";
|
|
5
5
|
|
|
@@ -11,12 +11,9 @@ const D = { g: "ui-context-menu", props: { "for": { "required":false,"default":"
|
|
|
11
11
|
const C = (host) => activateModule(controller, host);
|
|
12
12
|
|
|
13
13
|
export function createUiContextMenu(options = {}, html) {
|
|
14
|
-
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
14
|
+
const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
15
|
+
const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["for","open"].includes(name)));
|
|
15
16
|
const element = document.createElement("span");
|
|
16
|
-
for (const [name, value] of Object.entries(attributes)) {
|
|
17
|
-
if (value === null || value === undefined || value === false) continue;
|
|
18
|
-
element.setAttribute(name, value === true ? "" : String(value));
|
|
19
|
-
}
|
|
20
17
|
element.setAttribute("component", "ui-context-menu");
|
|
21
18
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
22
19
|
const v = [false, null, null];
|
|
@@ -30,16 +27,21 @@ export function createUiContextMenu(options = {}, html) {
|
|
|
30
27
|
const p1 = (r, c, d) => {
|
|
31
28
|
};
|
|
32
29
|
const p0 = (r, c, d) => {
|
|
33
|
-
if (
|
|
30
|
+
if (c === -1) {
|
|
31
|
+
resetForwardedAttributes(r.n, attributes, r.v0);
|
|
32
|
+
r.v0 = forwardAttributes(r.n, attributes);
|
|
33
|
+
}
|
|
34
|
+
if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "", J, false, undefined, d);
|
|
34
35
|
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); } }
|
|
35
36
|
else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
36
37
|
};
|
|
37
38
|
const t0 = element.firstChild;
|
|
38
39
|
const t1 = t0.firstChild;
|
|
39
|
-
const R = {
|
|
40
|
+
const R = { n: element, v0: undefined, a2: t1, e0: t1.nextSibling, b0: undefined, f0: undefined };
|
|
40
41
|
const I = { B };
|
|
41
42
|
const J = project(I, children, slots);
|
|
42
43
|
I.R = new Set();
|
|
44
|
+
I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
|
|
43
45
|
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);
|
|
44
46
|
manageProps(I);
|
|
45
47
|
I.r["menu"] = t0;
|
package/vanilla/UiCover.d.ts
CHANGED