@threadlabs/looma 0.33.1 → 0.35.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.
- package/components/shared/overlay.js +8 -2
- package/components/shared/surface-material.js +21 -0
- package/components/ui-badge/ui-badge.html +11 -3
- package/components/ui-button/ui-button.html +92 -51
- package/components/ui-card/ui-card.html +50 -6
- package/components/ui-checkbox/ui-checkbox.html +4 -2
- package/components/ui-curve-editor/curve.js +10 -0
- package/components/ui-curve-editor/ui-curve-editor.html +181 -0
- package/components/ui-curve-editor/ui-curve-editor.js +51 -0
- package/components/ui-dialog/ui-dialog.html +64 -1
- package/components/ui-dialog/ui-dialog.js +9 -1
- package/components/ui-icon-button/ui-icon-button.html +97 -31
- package/components/ui-input/ui-input.html +2 -1
- package/components/ui-input-group/ui-input-group.html +4 -1
- package/components/ui-light-editor/ui-light-editor.html +45 -0
- package/components/ui-light-editor/ui-light-editor.js +53 -0
- package/components/ui-menu/ui-menu.html +62 -0
- package/components/ui-menu/ui-menu.js +1 -1
- package/components/ui-number-input/arithmetic.js +47 -0
- package/components/ui-number-input/ui-number-input.html +63 -0
- package/components/ui-number-input/ui-number-input.js +47 -0
- package/components/ui-popover/ui-popover.html +66 -1
- package/components/ui-popover/ui-popover.js +1 -1
- package/components/ui-select/ui-select.html +9 -7
- package/components/ui-slider/ui-slider.html +84 -0
- package/components/ui-slider/ui-slider.js +29 -0
- package/components/ui-switch/ui-switch.html +3 -0
- package/components/ui-tabs/ui-tabs.html +6 -1
- package/components/ui-text/ui-text.html +31 -6
- package/components/ui-textarea/ui-textarea.html +2 -1
- package/components/ui-tooltip/ui-tooltip.html +60 -0
- package/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/index.js +47 -43
- package/docs/README.md +59 -5
- package/docs/card.html +16 -2
- package/docs/card.js +17 -2
- package/docs/catalog.json +1640 -108
- package/docs/customizer-render.mjs +50 -11
- package/docs/customizer.js +137 -24
- package/docs/documentation.css +9 -1
- package/docs/index.d.ts +8 -3
- package/docs/index.mjs +1 -1
- package/docs/preview.js +2 -0
- package/docs/render.mjs +16 -7
- package/docs/site.mjs +78 -27
- package/docs/theme-session.mjs +53 -0
- package/docs/theme.mjs +189 -18
- package/docs/value-editors.mjs +33 -0
- package/package.json +2 -2
- package/styles/ui-badge.css +11 -6
- package/styles/ui-button.css +74 -49
- package/styles/ui-card.css +51 -4
- package/styles/ui-checkbox.css +4 -2
- package/styles/ui-curve-editor.css +109 -0
- package/styles/ui-dialog.css +136 -0
- package/styles/ui-icon-button.css +85 -28
- package/styles/ui-input-group.css +4 -1
- package/styles/ui-input.css +2 -1
- package/styles/ui-light-editor.css +28 -0
- package/styles/ui-menu.css +74 -0
- package/styles/ui-number-input.css +34 -0
- package/styles/ui-popover.css +76 -0
- package/styles/ui-select.css +9 -7
- package/styles/ui-slider.css +53 -0
- package/styles/ui-switch.css +3 -0
- package/styles/ui-tabs.css +6 -1
- package/styles/ui-text.css +23 -1
- package/styles/ui-textarea.css +2 -1
- package/styles/ui-tooltip.css +72 -0
- package/theme-light.css +1 -0
- package/theme-system.css +69 -17
- package/tokens.css +12 -2
- package/vanilla/UiButton.d.ts +1 -0
- package/vanilla/UiButton.js +195 -130
- package/vanilla/UiCard.d.ts +1 -0
- package/vanilla/UiCard.js +12 -12
- package/vanilla/UiCurveEditor.d.ts +28 -0
- package/vanilla/UiCurveEditor.js +134 -0
- package/vanilla/UiIconButton.d.ts +2 -1
- package/vanilla/UiIconButton.js +58 -31
- package/vanilla/UiLightEditor.d.ts +29 -0
- package/vanilla/UiLightEditor.js +102 -0
- package/vanilla/UiNumberInput.d.ts +33 -0
- package/vanilla/UiNumberInput.js +86 -0
- package/vanilla/UiSlider.d.ts +33 -0
- package/vanilla/UiSlider.js +125 -0
- package/vanilla/UiText.d.ts +2 -2
- package/vanilla/UiText.js +45 -11
- package/vanilla/index.js +4 -0
- package/vue/UiBadge.vue +29 -4
- package/vue/UiButton.d.ts +6 -0
- package/vue/UiButton.vue +188 -60
- package/vue/UiCard.d.ts +6 -0
- package/vue/UiCard.vue +80 -6
- package/vue/UiCheckbox.vue +4 -2
- package/vue/UiCurveEditor.d.ts +53 -0
- package/vue/UiCurveEditor.js +2 -0
- package/vue/UiCurveEditor.vue +427 -0
- package/vue/UiDialog.vue +181 -1
- package/vue/UiIconButton.d.ts +8 -2
- package/vue/UiIconButton.vue +190 -45
- package/vue/UiInput.vue +2 -1
- package/vue/UiInputGroup.vue +4 -1
- package/vue/UiLightEditor.d.ts +75 -0
- package/vue/UiLightEditor.js +2 -0
- package/vue/UiLightEditor.vue +402 -0
- package/vue/UiMenu.vue +91 -0
- package/vue/UiNumberInput.d.ts +83 -0
- package/vue/UiNumberInput.js +2 -0
- package/vue/UiNumberInput.vue +399 -0
- package/vue/UiPopover.vue +94 -1
- package/vue/UiSelect.vue +16 -10
- package/vue/UiSlider.d.ts +83 -0
- package/vue/UiSlider.js +2 -0
- package/vue/UiSlider.vue +412 -0
- package/vue/UiSwitch.vue +3 -0
- package/vue/UiTabs.vue +6 -1
- package/vue/UiText.d.ts +7 -5
- package/vue/UiText.vue +104 -22
- package/vue/UiTextarea.vue +2 -1
- package/vue/UiTooltip.vue +89 -0
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAffordanceScope.js +2 -2
- package/vue/chunks/UiAvatar.js +2 -2
- package/vue/chunks/UiAvatarGroup.js +2 -2
- package/vue/chunks/UiBadge.js +3 -3
- package/vue/chunks/UiBreadcrumbItem.js +2 -2
- package/vue/chunks/UiBreadcrumbs.js +2 -2
- package/vue/chunks/UiButton.js +94 -11
- package/vue/chunks/UiCallout.js +2 -2
- package/vue/chunks/UiCard.js +34 -5
- package/vue/chunks/UiCheckbox.js +3 -3
- package/vue/chunks/UiCluster.js +2 -2
- package/vue/chunks/UiColorPicker.js +2 -2
- package/vue/chunks/UiCombobox.js +2 -2
- package/vue/chunks/UiContainer.js +2 -2
- package/vue/chunks/UiContextMenu.js +2 -2
- package/vue/chunks/UiCover.js +2 -2
- package/vue/chunks/UiCurveEditor.js +413 -0
- package/vue/chunks/UiDescriptionItem.js +2 -2
- package/vue/chunks/UiDescriptionList.js +2 -2
- package/vue/chunks/UiDialog.js +4 -4
- package/vue/chunks/UiDisclosure.js +2 -2
- package/vue/chunks/UiEditable.js +2 -2
- package/vue/chunks/UiEditorBlockActions.js +2 -2
- package/vue/chunks/UiEditorChipEditor.js +2 -2
- package/vue/chunks/UiEditorCodeLanguage.js +2 -2
- package/vue/chunks/UiEditorFootnoteEditor.js +2 -2
- package/vue/chunks/UiEditorImageToolbar.js +3 -3
- package/vue/chunks/UiEditorInsertTableGrid.js +2 -2
- package/vue/chunks/UiEditorLinkCard.js +3 -3
- package/vue/chunks/UiEditorLinkForm.js +3 -3
- package/vue/chunks/UiEditorMentionMenu.js +2 -2
- package/vue/chunks/UiEditorMentionMenuItem.js +2 -2
- package/vue/chunks/UiEditorSlashMenu.js +2 -2
- package/vue/chunks/UiEditorSlashMenuGroup.js +2 -2
- package/vue/chunks/UiEditorSlashMenuItem.js +2 -2
- package/vue/chunks/UiEditorSurface.js +2 -2
- package/vue/chunks/UiEditorTableContextMenu.js +2 -2
- package/vue/chunks/UiEditorTableOverlay.js +2 -2
- package/vue/chunks/UiEditorTableToolbar.js +2 -2
- package/vue/chunks/UiEditorToolbar.js +2 -2
- package/vue/chunks/UiFloatingActionButton.js +2 -2
- package/vue/chunks/UiFormField.js +2 -2
- package/vue/chunks/UiGrid.js +2 -2
- package/vue/chunks/UiIcon.js +2 -2
- package/vue/chunks/UiIconButton.js +77 -11
- package/vue/chunks/UiImage.js +2 -2
- package/vue/chunks/UiInput.js +3 -3
- package/vue/chunks/UiInputGroup.js +3 -3
- package/vue/chunks/UiLightEditor.js +347 -0
- package/vue/chunks/UiList.js +2 -2
- package/vue/chunks/UiListItem.js +2 -2
- package/vue/chunks/UiListbox.js +2 -2
- package/vue/chunks/UiMenu.js +3 -3
- package/vue/chunks/UiMenuGroup.js +2 -2
- package/vue/chunks/UiMenuItem.js +2 -2
- package/vue/chunks/UiMeter.js +2 -2
- package/vue/chunks/UiNavItem.js +2 -2
- package/vue/chunks/UiNumberInput.js +403 -0
- package/vue/chunks/UiPageHeader.js +2 -2
- package/vue/chunks/UiPopover.js +4 -4
- package/vue/chunks/UiRadio.js +2 -2
- package/vue/chunks/UiRadioGroup.js +2 -2
- package/vue/chunks/UiReel.js +2 -2
- package/vue/chunks/UiScrollArea.js +2 -2
- package/vue/chunks/UiSearchResultRow.js +2 -2
- package/vue/chunks/UiSearchShell.js +2 -2
- package/vue/chunks/UiSection.js +2 -2
- package/vue/chunks/UiSelect.js +3 -3
- package/vue/chunks/UiSeparator.js +2 -2
- package/vue/chunks/UiSidebar.js +2 -2
- package/vue/chunks/UiSlider.js +396 -0
- package/vue/chunks/UiSpinner.js +2 -2
- package/vue/chunks/UiStack.js +2 -2
- package/vue/chunks/UiStatusMessage.js +2 -2
- package/vue/chunks/UiSwatch.js +2 -2
- package/vue/chunks/UiSwitch.js +3 -3
- package/vue/chunks/UiSwitcher.js +2 -2
- package/vue/chunks/UiTable.js +2 -2
- package/vue/chunks/UiTabs.js +3 -3
- package/vue/chunks/UiText.js +53 -12
- package/vue/chunks/UiTextarea.js +3 -3
- package/vue/chunks/UiToast.js +2 -2
- package/vue/chunks/UiToastRegion.js +2 -2
- package/vue/chunks/UiTooltip.js +3 -3
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +2 -2
- package/vue/chunks/UiTreeItem.js +2 -2
- package/vue/chunks/_plugin-vue_export-helper.js +68 -2
- package/vue/chunks/props.js +24 -1
- package/vue/components.css +3391 -2139
- package/vue/editor/index.js +623 -211
- package/vue/index.d.ts +4 -0
- package/vue/index.js +6 -2
package/vue/chunks/UiTextarea.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as checkedProp,
|
|
1
|
+
import { b as useReflectedProp, i as checkHydratedRoot, m as nativeAttrs, o as createDispatch, t as _plugin_vue_export_helper_default, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { a as checkedProp, i as checkPropInput, m as vuePropInputs, p as vPropValidity, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
3
3
|
import { n as readBoundControl, r as vBindControl } from "./control.js";
|
|
4
4
|
import { computed, createElementBlock, defineComponent, getCurrentInstance, mergeProps, openBlock, ref, unref, watchSyncEffect, withDirectives } from "vue";
|
|
5
5
|
//#region .build/vue/UiTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -308,6 +308,6 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
308
308
|
}]]);
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
}), [["__scopeId", "data-v-
|
|
311
|
+
}), [["__scopeId", "data-v-5cdc217a"]]);
|
|
312
312
|
//#endregion
|
|
313
313
|
export { UiTextarea_default as t };
|
package/vue/chunks/UiToast.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as checkHydratedRoot,
|
|
2
|
-
import {
|
|
1
|
+
import { b as useReflectedProp, i as checkHydratedRoot, m as nativeAttrs, o as createDispatch, r as attribute, t as _plugin_vue_export_helper_default, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { i as checkPropInput, m as vuePropInputs, p as vPropValidity, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
3
3
|
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
4
|
import { t as UiIconButton_default } from "./UiIconButton.js";
|
|
5
5
|
import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, ref, renderSlot, unref, useTemplateRef, watchSyncEffect, withCtx, withDirectives } from "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as concat, b as useReflectedProp, i as checkHydratedRoot, m as nativeAttrs, n as KeyedBoundary, o as createDispatch, t as _plugin_vue_export_helper_default, v as uniqueKeys, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { i as checkPropInput, m as vuePropInputs, p as vPropValidity, r as acceptsControllerWrite, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
3
3
|
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
4
|
import { t as UiIconButton_default } from "./UiIconButton.js";
|
|
5
5
|
import { Fragment, computed, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, normalizeClass, openBlock, provide, ref, renderList, renderSlot, toDisplayString, unref, watchSyncEffect, withCtx, withDirectives } from "vue";
|
package/vue/chunks/UiTooltip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as useReflectedProp, i as checkHydratedRoot, m as nativeAttrs, o as createDispatch, t as _plugin_vue_export_helper_default, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { i as checkPropInput, m as vuePropInputs, p as vPropValidity, r as acceptsControllerWrite, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
3
3
|
import { computed, createElementBlock, createElementVNode, createTextVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderSlot, toDisplayString, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
|
@@ -292,6 +292,6 @@ var UiTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
292
292
|
}]]);
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
}), [["__scopeId", "data-v-
|
|
295
|
+
}), [["__scopeId", "data-v-4cc4aab6"]]);
|
|
296
296
|
//#endregion
|
|
297
297
|
export { UiTooltip_default as t };
|
package/vue/chunks/UiTopBar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as checkHydratedRoot,
|
|
1
|
+
import { i as checkHydratedRoot, m as nativeAttrs, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock, createElementVNode, defineComponent, mergeProps, openBlock, renderSlot, unref } from "vue";
|
|
3
3
|
//#region .build/vue/UiTopBar.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var _hoisted_1 = {
|
package/vue/chunks/UiTree.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as useReflectedProp, i as checkHydratedRoot, m as nativeAttrs, o as createDispatch, t as _plugin_vue_export_helper_default, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { i as checkPropInput, m as vuePropInputs, p as vPropValidity, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, getCurrentInstance, mergeProps, openBlock, ref, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiTree.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
package/vue/chunks/UiTreeItem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as concat, i as checkHydratedRoot,
|
|
2
|
-
import {
|
|
1
|
+
import { a as concat, b as useReflectedProp, i as checkHydratedRoot, m as nativeAttrs, o as createDispatch, r as attribute, t as _plugin_vue_export_helper_default, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { i as checkPropInput, m as vuePropInputs, p as vPropValidity, r as acceptsControllerWrite, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
3
3
|
import { t as UiButton_default } from "./UiButton.js";
|
|
4
4
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderSlot, toDisplayString, unref, useTemplateRef, watchSyncEffect, withCtx, withDirectives } from "vue";
|
|
5
5
|
//#region .build/vue/UiTreeItem.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, computed, defineComponent, getCurrentInstance, h, onBeforeUnmount, onBeforeUpdate, onMounted, onUpdated, shallowRef, useSlots, watch, watchEffect } from "vue";
|
|
1
|
+
import { Fragment, computed, customRef, defineComponent, getCurrentInstance, h, onBeforeUnmount, onBeforeUpdate, onMounted, onUpdated, ref, shallowRef, useSlots, watch, watchEffect } from "vue";
|
|
2
2
|
//#region .build/vue/host.ts
|
|
3
3
|
var READY_INPUT = {
|
|
4
4
|
ready: true,
|
|
@@ -752,6 +752,72 @@ function cycleCheckedComputed(evaluate) {
|
|
|
752
752
|
}
|
|
753
753
|
} });
|
|
754
754
|
}
|
|
755
|
+
/** A Vue state cell owns its first usable seed or an earlier accepted edit, including equal writes. */
|
|
756
|
+
function initializedState(evaluate, accepts, copy, warn) {
|
|
757
|
+
const cell = ref();
|
|
758
|
+
let seed = cycleCheckedComputed(evaluate);
|
|
759
|
+
let initialized = false;
|
|
760
|
+
let stop;
|
|
761
|
+
let notify = () => {};
|
|
762
|
+
const claim = () => {
|
|
763
|
+
if (initialized) return;
|
|
764
|
+
initialized = true;
|
|
765
|
+
seed = void 0;
|
|
766
|
+
if (stop !== void 0) queueMicrotask(stop);
|
|
767
|
+
};
|
|
768
|
+
const initialize = () => {
|
|
769
|
+
if (initialized) return;
|
|
770
|
+
const next = seed.value;
|
|
771
|
+
if (!next.status.ready || next.status.stale || next.value === void 0) return;
|
|
772
|
+
if (!accepts(next.value)) {
|
|
773
|
+
warn();
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
776
|
+
claim();
|
|
777
|
+
cell.value = copy(next.value);
|
|
778
|
+
notify();
|
|
779
|
+
};
|
|
780
|
+
const state = customRef((track, trigger) => {
|
|
781
|
+
notify = trigger;
|
|
782
|
+
return {
|
|
783
|
+
get() {
|
|
784
|
+
track();
|
|
785
|
+
initialize();
|
|
786
|
+
return cell.value;
|
|
787
|
+
},
|
|
788
|
+
set(value) {
|
|
789
|
+
if (value != null && !accepts(value)) {
|
|
790
|
+
warn();
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
const first = !initialized;
|
|
794
|
+
claim();
|
|
795
|
+
cell.value = value ?? null;
|
|
796
|
+
if (first) trigger();
|
|
797
|
+
}
|
|
798
|
+
};
|
|
799
|
+
});
|
|
800
|
+
return Object.assign(state, {
|
|
801
|
+
status() {
|
|
802
|
+
state.value;
|
|
803
|
+
return initialized ? cell.value === void 0 ? {
|
|
804
|
+
...READY_INPUT,
|
|
805
|
+
ready: false
|
|
806
|
+
} : READY_INPUT : {
|
|
807
|
+
...seed.value.status,
|
|
808
|
+
ready: false,
|
|
809
|
+
stale: false
|
|
810
|
+
};
|
|
811
|
+
},
|
|
812
|
+
start() {
|
|
813
|
+
if (initialized) return;
|
|
814
|
+
stop = watchEffect(() => {
|
|
815
|
+
state.value;
|
|
816
|
+
});
|
|
817
|
+
if (initialized) stop();
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
}
|
|
755
821
|
/**
|
|
756
822
|
* A declared prop's reflected root attribute: the authored literal until the consumer passes the
|
|
757
823
|
* prop, then its value as text, absent for null.
|
|
@@ -1171,4 +1237,4 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
1171
1237
|
return target;
|
|
1172
1238
|
};
|
|
1173
1239
|
//#endregion
|
|
1174
|
-
export {
|
|
1240
|
+
export { warnUnless as S, text as _, concat as a, useReflectedProp as b, decimalMultiply as c, initializedState as d, list as f, preserveRootFocus as g, number as h, checkHydratedRoot as i, decimalSubtract as l, nativeAttrs as m, KeyedBoundary as n, createDispatch as o, math as p, attribute as r, cycleCheckedComputed as s, _plugin_vue_export_helper_default as t, formatValue as u, uniqueKeys as v, useScopedSlotName as x, useComponentHost as y };
|
package/vue/chunks/props.js
CHANGED
|
@@ -784,6 +784,29 @@ var UNRESOLVED_INPUT = {
|
|
|
784
784
|
error: null,
|
|
785
785
|
stale: false
|
|
786
786
|
};
|
|
787
|
+
/** A draft owns its records/lists; native and opaque objects retain their platform identity. */
|
|
788
|
+
function copyStateSeed(value, seen) {
|
|
789
|
+
if (value === null || typeof value !== "object") return value;
|
|
790
|
+
const array = Array.isArray(value);
|
|
791
|
+
const prototype = Object.getPrototypeOf(value);
|
|
792
|
+
if (!array && prototype !== null && prototype !== Object.prototype) {
|
|
793
|
+
const constructor = Object.getOwnPropertyDescriptor(prototype, "constructor")?.value;
|
|
794
|
+
if (Object.getPrototypeOf(prototype) !== null || typeof constructor !== "function" || constructor.prototype !== prototype || Function.prototype.toString.call(constructor) !== Function.prototype.toString.call(Object)) return value;
|
|
795
|
+
}
|
|
796
|
+
const known = seen ?? /* @__PURE__ */ new WeakMap();
|
|
797
|
+
const previous = known.get(value);
|
|
798
|
+
if (previous !== void 0) return previous;
|
|
799
|
+
const copy = array ? [] : Object.create(prototype);
|
|
800
|
+
if (array) copy.length = value.length;
|
|
801
|
+
known.set(value, copy);
|
|
802
|
+
for (const key of Reflect.ownKeys(value)) if (Object.getOwnPropertyDescriptor(value, key)?.enumerable) Object.defineProperty(copy, key, {
|
|
803
|
+
enumerable: true,
|
|
804
|
+
writable: true,
|
|
805
|
+
configurable: true,
|
|
806
|
+
value: copyStateSeed(Reflect.get(value, key), known)
|
|
807
|
+
});
|
|
808
|
+
return copy;
|
|
809
|
+
}
|
|
787
810
|
/** Public error identity is its name/message, not the producer's object allocation. */
|
|
788
811
|
function sameInputStatus(left, right) {
|
|
789
812
|
return left === right || left !== void 0 && right !== void 0 && left.ready === right.ready && left.pending === right.pending && left.stale === right.stale && left.error?.name === right.error?.name && left.error?.message === right.error?.message;
|
|
@@ -1191,4 +1214,4 @@ function vuePropInputs(values, defaults, check, prepare) {
|
|
|
1191
1214
|
};
|
|
1192
1215
|
}
|
|
1193
1216
|
//#endregion
|
|
1194
|
-
export { checkedProp as a,
|
|
1217
|
+
export { checkedProp as a, inputComputed as c, requireInputStatus as d, selectedPropNode as f, checkPropInput as i, inputRead as l, vuePropInputs as m, READY_INPUT as n, copyStateSeed as o, vPropValidity as p, acceptsControllerWrite as r, evaluateInput as s, BINDING_INPUTS_PROP as t, propValidityState as u };
|