@sprawlify/vue 0.0.66 → 0.0.70

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 (101) hide show
  1. package/dist/{collapsible-BBV8R9Wm.js → collapsible-D1Mx4C0H.js} +4 -3
  2. package/dist/components/accordion/index.d.ts +18 -18
  3. package/dist/components/accordion/index.js +7 -6
  4. package/dist/components/angle-slider/index.d.ts +17 -17
  5. package/dist/components/angle-slider/index.js +4 -3
  6. package/dist/components/avatar/index.d.ts +11 -11
  7. package/dist/components/avatar/index.js +4 -3
  8. package/dist/components/bottom-sheet/index.d.ts +19 -19
  9. package/dist/components/bottom-sheet/index.js +7 -6
  10. package/dist/components/carousel/index.d.ts +25 -25
  11. package/dist/components/carousel/index.js +4 -3
  12. package/dist/components/checkbox/index.d.ts +24 -24
  13. package/dist/components/checkbox/index.js +6 -5
  14. package/dist/components/client-only/index.d.ts +2 -2
  15. package/dist/components/clipboard/index.d.ts +17 -17
  16. package/dist/components/clipboard/index.js +4 -3
  17. package/dist/components/collapsible/index.d.ts +16 -16
  18. package/dist/components/collapsible/index.js +5 -4
  19. package/dist/components/collection/index.d.ts +1 -1
  20. package/dist/components/collection/index.js +1 -1
  21. package/dist/components/color-picker/index.d.ts +610 -0
  22. package/dist/components/color-picker/index.js +1128 -0
  23. package/dist/components/combobox/index.d.ts +618 -0
  24. package/dist/components/combobox/index.js +803 -0
  25. package/dist/components/date-picker/index.d.ts +597 -0
  26. package/dist/components/date-picker/index.js +1111 -0
  27. package/dist/components/dialog/index.d.ts +270 -0
  28. package/dist/components/dialog/index.js +434 -0
  29. package/dist/components/download-trigger/index.d.ts +29 -0
  30. package/dist/components/download-trigger/index.js +69 -0
  31. package/dist/components/editable/index.d.ts +288 -0
  32. package/dist/components/editable/index.js +460 -0
  33. package/dist/components/field/index.d.ts +26 -26
  34. package/dist/components/field/index.js +5 -4
  35. package/dist/components/fieldset/index.d.ts +13 -13
  36. package/dist/components/fieldset/index.js +5 -4
  37. package/dist/components/file-upload/index.d.ts +329 -0
  38. package/dist/components/file-upload/index.js +597 -0
  39. package/dist/components/floating-panel/index.d.ts +326 -0
  40. package/dist/components/floating-panel/index.js +568 -0
  41. package/dist/components/focus-trap/index.d.ts +48 -0
  42. package/dist/components/focus-trap/index.js +96 -0
  43. package/dist/components/format/index.d.ts +40 -0
  44. package/dist/components/format/index.js +148 -0
  45. package/dist/components/frame/index.d.ts +39 -0
  46. package/dist/components/frame/index.js +111 -0
  47. package/dist/components/highlight/index.d.ts +35 -0
  48. package/dist/components/highlight/index.js +57 -0
  49. package/dist/components/hover-card/index.d.ts +200 -0
  50. package/dist/components/hover-card/index.js +335 -0
  51. package/dist/components/image-cropper/index.d.ts +211 -0
  52. package/dist/components/image-cropper/index.js +381 -0
  53. package/dist/components/json-tree-view/index.d.ts +91 -0
  54. package/dist/components/json-tree-view/index.js +490 -0
  55. package/dist/components/listbox/index.d.ts +325 -0
  56. package/dist/components/listbox/index.js +533 -0
  57. package/dist/components/marquee/index.d.ts +268 -0
  58. package/dist/components/marquee/index.js +340 -0
  59. package/dist/components/menu/index.d.ts +498 -0
  60. package/dist/components/menu/index.js +886 -0
  61. package/dist/components/navigation-menu/index.d.ts +272 -0
  62. package/dist/components/navigation-menu/index.js +559 -0
  63. package/dist/components/number-input/index.d.ts +253 -0
  64. package/dist/components/number-input/index.js +427 -0
  65. package/dist/components/pagination/index.d.ts +211 -0
  66. package/dist/components/pagination/index.js +346 -0
  67. package/dist/components/password-input/index.d.ts +213 -0
  68. package/dist/components/password-input/index.js +325 -0
  69. package/dist/components/pin-input/index.d.ts +198 -0
  70. package/dist/components/pin-input/index.js +346 -0
  71. package/dist/components/popover/index.d.ts +318 -0
  72. package/dist/components/popover/index.js +486 -0
  73. package/dist/components/presence/index.d.ts +2 -2
  74. package/dist/components/presence/index.js +4 -3
  75. package/dist/components/select/index.d.ts +36 -35
  76. package/dist/components/select/index.js +8 -7
  77. package/dist/components/tree-view/index.d.ts +6 -0
  78. package/dist/components/tree-view/index.js +11 -0
  79. package/dist/create-context-Ds1GbsVc.js +16 -0
  80. package/dist/{field-DnHnX3Tf.js → field-CtPR24u6.js} +4 -3
  81. package/dist/{fieldset-DzhN7Zrg.js → fieldset-D5SznrKY.js} +4 -3
  82. package/dist/index-ByYmM8LZ.d.ts +447 -0
  83. package/dist/{index-rHf4D8np.d.ts → index-Cjk1WhUx.d.ts} +11 -11
  84. package/dist/index-D0_ID5xv.d.ts +91 -0
  85. package/dist/index.d.ts +4 -93
  86. package/dist/index.js +3 -2
  87. package/dist/{presence-CvUnYMZQ.js → presence-BK6rPXK7.js} +3 -2
  88. package/dist/{providers-B2CNPFg1.js → providers-DNBWT-O_.js} +1 -1
  89. package/dist/tree-view-CzfDgztL.js +737 -0
  90. package/dist/{use-forward-expose-4p5AGAI3.js → use-forward-expose-CCAmHTUB.js} +2 -15
  91. package/dist/{use-render-strategy-BkxoN6ll.js → use-render-strategy-DMa_QmB6.js} +1 -1
  92. package/package.json +102 -2
  93. /package/dist/{collection-DR2kMzrX.js → collection-DiwGNCAy.js} +0 -0
  94. /package/dist/{create-split-props-YZ3qgXe_.js → create-split-props-BDJ_VWs3.js} +0 -0
  95. /package/dist/{factory-BH3WrWd2.js → factory-Co08Aw8u.js} +0 -0
  96. /package/dist/{factory-D_ge_w76.d.ts → factory-Dg6Whljf.d.ts} +0 -0
  97. /package/dist/{index-B66Om_3U.d.ts → index-DI09ccnU.d.ts} +0 -0
  98. /package/dist/{index-DqRk-Yea.d.ts → index-ECeveDvH.d.ts} +0 -0
  99. /package/dist/{presence-types-Bv1E60Cw.d.ts → presence-types-BaQ7PILD.d.ts} +0 -0
  100. /package/dist/{types-Bj-dS2Hc.d.ts → types-BkS9kMJ5.d.ts} +0 -0
  101. /package/dist/{use-render-strategy-CHj_pCfT.d.ts → use-render-strategy-bdLKqL57.d.ts} +0 -0
@@ -0,0 +1,96 @@
1
+ import "../../core-DNndr38p.js";
2
+ import { t as useForwardExpose } from "../../use-forward-expose-CCAmHTUB.js";
3
+ import { t as sprawlify } from "../../factory-Co08Aw8u.js";
4
+ import { t as cleanProps } from "../../clean-props-ChPEW0vT.js";
5
+ import { createBlock, defineComponent, onBeforeUnmount, onWatcherCleanup, openBlock, ref, renderSlot, unref, watchEffect, withCtx } from "vue";
6
+ import { trapFocus } from "@sprawlify/primitives/focus-trap";
7
+
8
+ //#region src/components/focus-trap/focus-trap.vue?vue&type=script&setup=true&lang.ts
9
+ var focus_trap_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
10
+ __name: "focus-trap",
11
+ props: {
12
+ disabled: {
13
+ type: Boolean,
14
+ required: false,
15
+ default: void 0
16
+ },
17
+ initialFocus: {
18
+ type: [
19
+ String,
20
+ Boolean,
21
+ Function
22
+ ],
23
+ required: false,
24
+ skipCheck: true,
25
+ default: void 0
26
+ },
27
+ fallbackFocus: {
28
+ type: [String, Function],
29
+ required: false,
30
+ skipCheck: true,
31
+ default: void 0
32
+ },
33
+ returnFocusOnDeactivate: {
34
+ type: Boolean,
35
+ required: false,
36
+ default: void 0
37
+ },
38
+ setReturnFocus: {
39
+ type: [
40
+ String,
41
+ Boolean,
42
+ Function
43
+ ],
44
+ required: false,
45
+ skipCheck: true,
46
+ default: void 0
47
+ },
48
+ asChild: {
49
+ type: Boolean,
50
+ required: false
51
+ }
52
+ },
53
+ emits: ["activate", "deactivate"],
54
+ setup(__props, { emit: __emit }) {
55
+ const props = __props;
56
+ const emits = __emit;
57
+ const nodeRef = ref(null);
58
+ let cleanup;
59
+ watchEffect(() => {
60
+ if (props.disabled) return;
61
+ if (!nodeRef.value) return;
62
+ const node = nodeRef.value.$el ? nodeRef.value.$el : nodeRef.value;
63
+ if (!node) return;
64
+ const autoFocusNode = node.querySelector("[autofocus], [data-autofocus]");
65
+ const trapProps = cleanProps(props);
66
+ trapProps.initialFocus ||= autoFocusNode ?? void 0;
67
+ cleanup = trapFocus(node, {
68
+ ...trapProps,
69
+ onActivate: () => emits("activate"),
70
+ onDeactivate: () => emits("deactivate")
71
+ });
72
+ onWatcherCleanup(() => cleanup?.());
73
+ });
74
+ onBeforeUnmount(() => {
75
+ cleanup?.();
76
+ });
77
+ useForwardExpose();
78
+ return (_ctx, _cache) => {
79
+ return openBlock(), createBlock(unref(sprawlify).div, {
80
+ ref_key: "nodeRef",
81
+ ref: nodeRef,
82
+ "as-child": __props.asChild
83
+ }, {
84
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
85
+ _: 3
86
+ }, 8, ["as-child"]);
87
+ };
88
+ }
89
+ });
90
+
91
+ //#endregion
92
+ //#region src/components/focus-trap/focus-trap.vue
93
+ var focus_trap_default = focus_trap_vue_vue_type_script_setup_true_lang_default;
94
+
95
+ //#endregion
96
+ export { focus_trap_default as FocusTrap };
@@ -0,0 +1,40 @@
1
+ import * as vue862 from "vue";
2
+
3
+ //#region src/components/format/format-byte.vue.d.ts
4
+ interface FormatByteProps {
5
+ unit?: 'bit' | 'byte';
6
+ unitDisplay?: 'long' | 'short' | 'narrow';
7
+ unitSystem?: 'decimal' | 'binary';
8
+ value: number;
9
+ }
10
+ declare const _default: typeof __VLS_export$2;
11
+ declare const __VLS_export$2: vue862.DefineComponent<FormatByteProps, {}, {}, {}, {}, vue862.ComponentOptionsMixin, vue862.ComponentOptionsMixin, {}, string, vue862.PublicProps, Readonly<FormatByteProps> & Readonly<{}>, {}, {}, {}, {}, string, vue862.ComponentProvideOptions, false, {}, any>;
12
+ //#endregion
13
+ //#region src/components/format/format-number.vue.d.ts
14
+ interface FormatNumberProps {
15
+ value: number;
16
+ compactDisplay?: 'short' | 'long' | undefined;
17
+ notation?: 'standard' | 'scientific' | 'engineering' | 'compact' | undefined;
18
+ signDisplay?: 'auto' | 'never' | 'always' | 'exceptZero' | undefined;
19
+ unit?: string | undefined;
20
+ unitDisplay?: 'short' | 'long' | 'narrow' | undefined;
21
+ currencyDisplay?: string | undefined;
22
+ currencySign?: string | undefined;
23
+ }
24
+ declare const _default$1: typeof __VLS_export$1;
25
+ declare const __VLS_export$1: vue862.DefineComponent<FormatNumberProps, {}, {}, {}, {}, vue862.ComponentOptionsMixin, vue862.ComponentOptionsMixin, {}, string, vue862.PublicProps, Readonly<FormatNumberProps> & Readonly<{}>, {}, {}, {}, {}, string, vue862.ComponentProvideOptions, false, {}, any>;
26
+ //#endregion
27
+ //#region src/components/format/format-relative-time.vue.d.ts
28
+ interface FormatRelativeTimeProps {
29
+ value: Date;
30
+ localeMatcher?: Intl.RelativeTimeFormatLocaleMatcher;
31
+ numeric?: Intl.RelativeTimeFormatNumeric;
32
+ style?: Intl.RelativeTimeFormatStyle;
33
+ }
34
+ declare const _default$2: typeof __VLS_export;
35
+ declare const __VLS_export: vue862.DefineComponent<FormatRelativeTimeProps, {}, {}, {}, {}, vue862.ComponentOptionsMixin, vue862.ComponentOptionsMixin, {}, string, vue862.PublicProps, Readonly<FormatRelativeTimeProps> & Readonly<{}>, {}, {}, {}, {}, string, vue862.ComponentProvideOptions, false, {}, any>;
36
+ declare namespace format_d_exports {
37
+ export { _default as Byte, FormatByteProps as ByteBaseProps, FormatByteProps as ByteProps, _default$1 as Number, FormatNumberProps as NumberBaseProps, FormatNumberProps as NumberProps, _default$2 as RelativeTime, FormatRelativeTimeProps as RelativeTimeBaseProps, FormatRelativeTimeProps as RelativeTimeProps };
38
+ }
39
+ //#endregion
40
+ export { format_d_exports as Format, _default as FormatByte, type FormatByteProps, _default$1 as FormatNumber, type FormatNumberProps, _default$2 as FormatRelativeTime, type FormatRelativeTimeProps };
@@ -0,0 +1,148 @@
1
+ import { t as __exportAll } from "../../chunk-BN_g-Awi.js";
2
+ import { a as useLocaleContext, i as DEFAULT_LOCALE } from "../../providers-DNBWT-O_.js";
3
+ import "../../create-context-Ds1GbsVc.js";
4
+ import { computed, defineComponent, toDisplayString } from "vue";
5
+ import { formatBytes, formatNumber, formatRelativeTime } from "@sprawlify/primitives/i18n-utils";
6
+
7
+ //#region src/components/format/format-byte.vue?vue&type=script&setup=true&lang.ts
8
+ var format_byte_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
9
+ __name: "format-byte",
10
+ props: {
11
+ unit: {
12
+ type: String,
13
+ required: false
14
+ },
15
+ unitDisplay: {
16
+ type: String,
17
+ required: false
18
+ },
19
+ unitSystem: {
20
+ type: String,
21
+ required: false
22
+ },
23
+ value: {
24
+ type: Number,
25
+ required: true
26
+ }
27
+ },
28
+ setup(__props) {
29
+ const props = __props;
30
+ const locale = useLocaleContext(DEFAULT_LOCALE);
31
+ const text = computed(() => {
32
+ const { value, ...otherProps } = props;
33
+ return formatBytes(value, locale.value.locale, otherProps);
34
+ });
35
+ return (_ctx, _cache) => {
36
+ return toDisplayString(text.value);
37
+ };
38
+ }
39
+ });
40
+
41
+ //#endregion
42
+ //#region src/components/format/format-byte.vue
43
+ var format_byte_default = format_byte_vue_vue_type_script_setup_true_lang_default;
44
+
45
+ //#endregion
46
+ //#region src/components/format/format-number.vue?vue&type=script&setup=true&lang.ts
47
+ var format_number_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
48
+ __name: "format-number",
49
+ props: {
50
+ value: {
51
+ type: Number,
52
+ required: true
53
+ },
54
+ compactDisplay: {
55
+ type: null,
56
+ required: false
57
+ },
58
+ notation: {
59
+ type: null,
60
+ required: false
61
+ },
62
+ signDisplay: {
63
+ type: null,
64
+ required: false
65
+ },
66
+ unit: {
67
+ type: null,
68
+ required: false
69
+ },
70
+ unitDisplay: {
71
+ type: null,
72
+ required: false
73
+ },
74
+ currencyDisplay: {
75
+ type: null,
76
+ required: false
77
+ },
78
+ currencySign: {
79
+ type: null,
80
+ required: false
81
+ }
82
+ },
83
+ setup(__props) {
84
+ const props = __props;
85
+ const locale = useLocaleContext(DEFAULT_LOCALE);
86
+ const text = computed(() => {
87
+ const { value, ...intlProps } = props;
88
+ return formatNumber(value, locale.value.locale, intlProps);
89
+ });
90
+ return (_ctx, _cache) => {
91
+ return toDisplayString(text.value);
92
+ };
93
+ }
94
+ });
95
+
96
+ //#endregion
97
+ //#region src/components/format/format-number.vue
98
+ var format_number_default = format_number_vue_vue_type_script_setup_true_lang_default;
99
+
100
+ //#endregion
101
+ //#region src/components/format/format-relative-time.vue?vue&type=script&setup=true&lang.ts
102
+ var format_relative_time_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
103
+ __name: "format-relative-time",
104
+ props: {
105
+ value: {
106
+ type: Date,
107
+ required: true
108
+ },
109
+ localeMatcher: {
110
+ type: null,
111
+ required: false
112
+ },
113
+ numeric: {
114
+ type: null,
115
+ required: false
116
+ },
117
+ style: {
118
+ type: null,
119
+ required: false
120
+ }
121
+ },
122
+ setup(__props) {
123
+ const props = __props;
124
+ const locale = useLocaleContext(DEFAULT_LOCALE);
125
+ const text = computed(() => {
126
+ const { value, ...intlProps } = props;
127
+ return formatRelativeTime(value, locale.value.locale, intlProps);
128
+ });
129
+ return (_ctx, _cache) => {
130
+ return toDisplayString(text.value);
131
+ };
132
+ }
133
+ });
134
+
135
+ //#endregion
136
+ //#region src/components/format/format-relative-time.vue
137
+ var format_relative_time_default = format_relative_time_vue_vue_type_script_setup_true_lang_default;
138
+
139
+ //#endregion
140
+ //#region src/components/format/format.ts
141
+ var format_exports = /* @__PURE__ */ __exportAll({
142
+ Byte: () => format_byte_default,
143
+ Number: () => format_number_default,
144
+ RelativeTime: () => format_relative_time_default
145
+ });
146
+
147
+ //#endregion
148
+ export { format_exports as Format, format_byte_default as FormatByte, format_number_default as FormatNumber, format_relative_time_default as FormatRelativeTime };
@@ -0,0 +1,39 @@
1
+ import * as vue126 from "vue";
2
+ import { IframeHTMLAttributes, VNode } from "vue";
3
+
4
+ //#region src/components/frame/frame.vue.d.ts
5
+ interface FrameBaseProps {
6
+ head?: VNode | VNode[];
7
+ srcDoc?: string;
8
+ }
9
+ interface FrameProps extends FrameBaseProps,
10
+ /**
11
+ * @vue-ignore
12
+ */
13
+ IframeHTMLAttributes {}
14
+ declare var __VLS_23: {}, __VLS_31: {};
15
+ type __VLS_Slots = {} & {
16
+ default?: (props: typeof __VLS_23) => any;
17
+ } & {
18
+ head?: (props: typeof __VLS_31) => any;
19
+ };
20
+ declare const __VLS_base: vue126.DefineComponent<FrameProps, {
21
+ frameRef: vue126.Ref<HTMLIFrameElement | null, HTMLIFrameElement | null>;
22
+ }, {}, {}, {}, vue126.ComponentOptionsMixin, vue126.ComponentOptionsMixin, {} & {
23
+ mount: () => any;
24
+ unmount: () => any;
25
+ }, string, vue126.PublicProps, Readonly<FrameProps> & Readonly<{
26
+ onMount?: (() => any) | undefined;
27
+ onUnmount?: (() => any) | undefined;
28
+ }>, {
29
+ srcDoc: string;
30
+ }, {}, {}, {}, string, vue126.ComponentProvideOptions, false, {}, any>;
31
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
32
+ declare const _default: typeof __VLS_export;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
38
+ //#endregion
39
+ export { _default as Frame, type FrameBaseProps, type FrameProps };
@@ -0,0 +1,111 @@
1
+ import { o as environment_provider_default } from "../../providers-DNBWT-O_.js";
2
+ import "../../create-context-Ds1GbsVc.js";
3
+ import { Teleport, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeProps, onBeforeUnmount, onMounted, openBlock, ref, renderSlot, unref, watch, withCtx } from "vue";
4
+
5
+ //#region src/components/frame/frame-content.vue?vue&type=script&setup=true&lang.ts
6
+ var frame_content_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
7
+ __name: "frame-content",
8
+ emits: ["mount", "unmount"],
9
+ setup(__props, { emit: __emit }) {
10
+ const emit = __emit;
11
+ onMounted(() => {
12
+ emit("mount");
13
+ });
14
+ onBeforeUnmount(() => {
15
+ emit("unmount");
16
+ });
17
+ return (_ctx, _cache) => {
18
+ return renderSlot(_ctx.$slots, "default");
19
+ };
20
+ }
21
+ });
22
+
23
+ //#endregion
24
+ //#region src/components/frame/frame-content.vue
25
+ var frame_content_default = frame_content_vue_vue_type_script_setup_true_lang_default;
26
+
27
+ //#endregion
28
+ //#region src/components/frame/frame.vue?vue&type=script&setup=true&lang.ts
29
+ var frame_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
30
+ __name: "frame",
31
+ props: {
32
+ head: {
33
+ type: [Object, Array],
34
+ required: false
35
+ },
36
+ srcDoc: {
37
+ type: String,
38
+ required: false,
39
+ default: "<html><head><style>*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }</style></head><body><div class=\"frame-root\"></div></body></html>"
40
+ }
41
+ },
42
+ emits: ["mount", "unmount"],
43
+ setup(__props, { expose: __expose, emit: __emit }) {
44
+ const emit = __emit;
45
+ const props = __props;
46
+ const frameRef = ref(null);
47
+ const mountNode = ref(null);
48
+ __expose({ frameRef });
49
+ function getMountNode(frame) {
50
+ const doc = frame.contentWindow?.document;
51
+ if (!doc) return null;
52
+ return doc.body.querySelector(".frame-root") || doc.body;
53
+ }
54
+ watch(frameRef, (node) => {
55
+ if (!node) return;
56
+ const doc = node.contentWindow?.document;
57
+ if (!doc) return;
58
+ doc.open();
59
+ doc.write(props.srcDoc);
60
+ doc.close();
61
+ mountNode.value = getMountNode(node);
62
+ });
63
+ watch(() => [frameRef.value, mountNode.value], ([frameNode, mountNode], _oldValue, onCleanup) => {
64
+ if (!frameNode || !frameNode.contentDocument) return;
65
+ const win = frameNode.contentWindow;
66
+ if (!win) return;
67
+ const exec = () => {
68
+ win.requestAnimationFrame(() => {
69
+ if (!frameNode.contentDocument?.documentElement || !mountNode) return;
70
+ frameNode.style.setProperty("--width", `${mountNode.scrollWidth}px`);
71
+ frameNode.style.setProperty("--height", `${mountNode.scrollHeight}px`);
72
+ });
73
+ };
74
+ const resizeObserver = new win.ResizeObserver(exec);
75
+ exec();
76
+ if (mountNode) resizeObserver.observe(mountNode);
77
+ onCleanup(() => {
78
+ resizeObserver.disconnect();
79
+ });
80
+ });
81
+ const env = () => frameRef.value?.contentDocument ?? document;
82
+ return (_ctx, _cache) => {
83
+ return openBlock(), createBlock(unref(environment_provider_default), { value: env }, {
84
+ default: withCtx(() => [createElementVNode("iframe", mergeProps({
85
+ ref_key: "frameRef",
86
+ ref: frameRef
87
+ }, _ctx.$attrs), [mountNode.value ? (openBlock(), createBlock(Teleport, {
88
+ key: 0,
89
+ to: mountNode.value
90
+ }, [createVNode(frame_content_default, {
91
+ onMount: _cache[0] || (_cache[0] = ($event) => emit("mount")),
92
+ onUnmount: _cache[1] || (_cache[1] = ($event) => emit("unmount"))
93
+ }, {
94
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
95
+ _: 3
96
+ })], 8, ["to"])) : createCommentVNode("v-if", true), frameRef.value ? (openBlock(), createBlock(Teleport, {
97
+ key: 1,
98
+ to: frameRef.value.contentDocument.head
99
+ }, [renderSlot(_ctx.$slots, "head")], 8, ["to"])) : createCommentVNode("v-if", true)], 16)]),
100
+ _: 3
101
+ });
102
+ };
103
+ }
104
+ });
105
+
106
+ //#endregion
107
+ //#region src/components/frame/frame.vue
108
+ var frame_default = frame_vue_vue_type_script_setup_true_lang_default;
109
+
110
+ //#endregion
111
+ export { frame_default as Frame };
@@ -0,0 +1,35 @@
1
+ import * as vue1537 from "vue";
2
+ import { HTMLAttributes, MaybeRef } from "vue";
3
+ import * as _sprawlify_primitives_highlight_word0 from "@sprawlify/primitives/highlight-word";
4
+
5
+ //#region src/components/highlight/highlight-types.d.ts
6
+ interface UseHighlightProps {
7
+ text: string;
8
+ query: string | string[];
9
+ ignoreCase?: boolean;
10
+ matchAll?: boolean;
11
+ exactMatch?: boolean;
12
+ }
13
+ interface HighlightChunk {
14
+ text: string;
15
+ match: boolean;
16
+ }
17
+ //#endregion
18
+ //#region src/components/highlight/use-highlight.d.ts
19
+ declare const useHighlight: (props: MaybeRef<UseHighlightProps>) => vue1537.ComputedRef<_sprawlify_primitives_highlight_word0.HighlightChunk[]>;
20
+ //#endregion
21
+ //#region src/components/highlight/highlight.vue.d.ts
22
+ interface HighlightBaseProps extends UseHighlightProps {}
23
+ interface HighlightProps extends HighlightBaseProps,
24
+ /**
25
+ * @vue-ignore
26
+ */
27
+ HTMLAttributes {}
28
+ declare const _default: typeof __VLS_export;
29
+ declare const __VLS_export: vue1537.DefineComponent<HighlightProps, {}, {}, {}, {}, vue1537.ComponentOptionsMixin, vue1537.ComponentOptionsMixin, {}, string, vue1537.PublicProps, Readonly<HighlightProps> & Readonly<{}>, {
30
+ matchAll: boolean;
31
+ ignoreCase: boolean;
32
+ exactMatch: boolean;
33
+ }, {}, {}, {}, string, vue1537.ComponentProvideOptions, false, {}, any>;
34
+ //#endregion
35
+ export { _default as Highlight, type HighlightChunk, type HighlightProps, type UseHighlightProps, useHighlight };
@@ -0,0 +1,57 @@
1
+ import { t as cleanProps } from "../../clean-props-ChPEW0vT.js";
2
+ import { Fragment, computed, createCommentVNode, createElementBlock, createTextVNode, defineComponent, openBlock, renderList, toDisplayString, toValue, unref } from "vue";
3
+ import { highlightWord } from "@sprawlify/primitives/highlight-word";
4
+
5
+ //#region src/components/highlight/use-highlight.ts
6
+ const useHighlight = (props) => {
7
+ return computed(() => highlightWord(cleanProps(toValue(props))));
8
+ };
9
+
10
+ //#endregion
11
+ //#region src/components/highlight/highlight.vue?vue&type=script&setup=true&lang.ts
12
+ const _hoisted_1 = { key: 0 };
13
+ var highlight_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
14
+ __name: "highlight",
15
+ props: {
16
+ text: {
17
+ type: String,
18
+ required: true
19
+ },
20
+ query: {
21
+ type: [String, Array],
22
+ required: true
23
+ },
24
+ ignoreCase: {
25
+ type: Boolean,
26
+ required: false,
27
+ default: void 0
28
+ },
29
+ matchAll: {
30
+ type: Boolean,
31
+ required: false,
32
+ default: void 0
33
+ },
34
+ exactMatch: {
35
+ type: Boolean,
36
+ required: false,
37
+ default: void 0
38
+ }
39
+ },
40
+ setup(__props) {
41
+ const props = __props;
42
+ if (typeof props.text !== "string") throw new Error("[sprawlify/highlight] text must be a string");
43
+ const chunks = useHighlight(props);
44
+ return (_ctx, _cache) => {
45
+ return openBlock(true), createElementBlock(Fragment, null, renderList(unref(chunks), (chunk) => {
46
+ return openBlock(), createElementBlock(Fragment, null, [chunk.match ? (openBlock(), createElementBlock("mark", _hoisted_1, toDisplayString(chunk.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(chunk.text), 1)], 64))], 64);
47
+ }), 256);
48
+ };
49
+ }
50
+ });
51
+
52
+ //#endregion
53
+ //#region src/components/highlight/highlight.vue
54
+ var highlight_default = highlight_vue_vue_type_script_setup_true_lang_default;
55
+
56
+ //#endregion
57
+ export { highlight_default as Highlight, useHighlight };