relationship-ux 0.0.0-stage → 0.1.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.
Files changed (142) hide show
  1. package/README.md +41 -2
  2. package/dist/Overlay-CfZOlcSg.js +413 -0
  3. package/dist/component-stack-hueBuq7p.js +105 -0
  4. package/dist/components/base/avatar/Avatar.vue.d.ts +6 -0
  5. package/dist/components/base/avatar/avatar.variants.d.ts +8 -0
  6. package/dist/components/base/avatar/index.d.ts +3 -0
  7. package/dist/components/base/avatar/types.d.ts +8 -0
  8. package/dist/components/base/badge/Badge.vue.d.ts +19 -0
  9. package/dist/components/base/badge/badge.variants.d.ts +16 -0
  10. package/dist/components/base/badge/index.d.ts +3 -0
  11. package/dist/components/base/badge/types.d.ts +7 -0
  12. package/dist/components/base/button/Button.vue.d.ts +21 -0
  13. package/dist/components/base/button/button.variants.d.ts +19 -0
  14. package/dist/components/base/button/index.d.ts +3 -0
  15. package/dist/components/base/button/types.d.ts +13 -0
  16. package/dist/components/base/card/Card.vue.d.ts +22 -0
  17. package/dist/components/base/card/card.variants.d.ts +7 -0
  18. package/dist/components/base/card/index.d.ts +3 -0
  19. package/dist/components/base/card/types.d.ts +5 -0
  20. package/dist/components/base/divider/Divider.vue.d.ts +6 -0
  21. package/dist/components/base/divider/divider.variants.d.ts +6 -0
  22. package/dist/components/base/divider/index.d.ts +3 -0
  23. package/dist/components/base/divider/types.d.ts +5 -0
  24. package/dist/components/base/form/form.variants.d.ts +4 -0
  25. package/dist/components/base/form/index.d.ts +6 -0
  26. package/dist/components/base/form/input-form/InputForm.vue.d.ts +13 -0
  27. package/dist/components/base/form/input-form/input-form.variants.d.ts +19 -0
  28. package/dist/components/base/form/input-form/types.d.ts +14 -0
  29. package/dist/components/base/form/textarea-form/TextareaForm.vue.d.ts +10 -0
  30. package/dist/components/base/form/textarea-form/textarea-form.variants.d.ts +19 -0
  31. package/dist/components/base/form/textarea-form/types.d.ts +11 -0
  32. package/dist/components/base/index.d.ts +9 -0
  33. package/dist/components/base/spinner/Spinner.vue.d.ts +6 -0
  34. package/dist/components/base/spinner/index.d.ts +3 -0
  35. package/dist/components/base/spinner/spinner.variants.d.ts +7 -0
  36. package/dist/components/base/spinner/types.d.ts +5 -0
  37. package/dist/components/base/surface/Surface.vue.d.ts +18 -0
  38. package/dist/components/base/surface/index.d.ts +3 -0
  39. package/dist/components/base/surface/surface.variants.d.ts +21 -0
  40. package/dist/components/base/surface/types.d.ts +10 -0
  41. package/dist/components/base/text/Text.vue.d.ts +18 -0
  42. package/dist/components/base/text/index.d.ts +3 -0
  43. package/dist/components/base/text/text.variants.d.ts +29 -0
  44. package/dist/components/base/text/types.d.ts +12 -0
  45. package/dist/components/index.d.ts +2 -0
  46. package/dist/components/index.js +1106 -0
  47. package/dist/components/interaction/data-table/DataTable.vue.d.ts +50 -0
  48. package/dist/components/interaction/data-table/data-table.variants.d.ts +19 -0
  49. package/dist/components/interaction/data-table/index.d.ts +3 -0
  50. package/dist/components/interaction/data-table/types.d.ts +164 -0
  51. package/dist/components/interaction/dialog/Dialog.vue.d.ts +31 -0
  52. package/dist/components/interaction/dialog/dialog.variants.d.ts +9 -0
  53. package/dist/components/interaction/dialog/types.d.ts +10 -0
  54. package/dist/components/interaction/index.d.ts +5 -0
  55. package/dist/components/interaction/modal/Modal.vue.d.ts +31 -0
  56. package/dist/components/interaction/modal/index.d.ts +3 -0
  57. package/dist/components/interaction/modal/modal.variants.d.ts +9 -0
  58. package/dist/components/interaction/modal/types.d.ts +10 -0
  59. package/dist/components/interaction/primitives/focus-trap/types.d.ts +11 -0
  60. package/dist/components/interaction/primitives/focus-trap/useFocusTrap.d.ts +7 -0
  61. package/dist/components/interaction/primitives/index.d.ts +7 -0
  62. package/dist/components/interaction/primitives/overlay/Overlay.vue.d.ts +12 -0
  63. package/dist/components/interaction/primitives/overlay/overlay.variants.d.ts +13 -0
  64. package/dist/components/interaction/primitives/overlay/types.d.ts +8 -0
  65. package/dist/components/interaction/primitives/portal/Portal.vue.d.ts +22 -0
  66. package/dist/components/interaction/primitives/scroll-lock/useScrollLock.d.ts +8 -0
  67. package/dist/components/interaction/tabs/Tab.vue.d.ts +18 -0
  68. package/dist/components/interaction/tabs/TabList.vue.d.ts +15 -0
  69. package/dist/components/interaction/tabs/TabPanel.vue.d.ts +16 -0
  70. package/dist/components/interaction/tabs/Tabs.vue.d.ts +22 -0
  71. package/dist/components/interaction/tabs/context.d.ts +17 -0
  72. package/dist/components/interaction/tabs/index.d.ts +5 -0
  73. package/dist/components/interaction/tabs/types.d.ts +16 -0
  74. package/dist/components/interaction/window/Window.vue.d.ts +49 -0
  75. package/dist/components/interaction/window/index.d.ts +4 -0
  76. package/dist/components/interaction/window/types.d.ts +17 -0
  77. package/dist/components/interaction/window/useWindowDrag.d.ts +13 -0
  78. package/dist/components/interaction/window/useWindowResize.d.ts +15 -0
  79. package/dist/components/interaction/window/window.variants.d.ts +1 -0
  80. package/dist/core/component-stack/composables/index.d.ts +1 -0
  81. package/dist/core/component-stack/composables/useComponentStack.d.ts +1 -0
  82. package/dist/core/component-stack/index.d.ts +7 -0
  83. package/dist/core/component-stack/index.js +1 -0
  84. package/dist/core/component-stack/plugin.d.ts +4 -0
  85. package/dist/core/component-stack/renderer/ComponentStackRenderer.vue.d.ts +3 -0
  86. package/dist/core/component-stack/renderer/ComponentWrapper.vue.d.ts +21 -0
  87. package/dist/core/component-stack/renderer/index.d.ts +2 -0
  88. package/dist/core/component-stack/services/ComponentStackService.d.ts +9 -0
  89. package/dist/core/component-stack/services/index.d.ts +1 -0
  90. package/dist/core/component-stack/store/ComponentStackStore.d.ts +270 -0
  91. package/dist/core/component-stack/store/index.d.ts +1 -0
  92. package/dist/core/component-stack/symbols.d.ts +3 -0
  93. package/dist/core/component-stack/types/ComponentStackAction.d.ts +1 -0
  94. package/dist/core/component-stack/types/ComponentStackItem.d.ts +8 -0
  95. package/dist/core/component-stack/types/ComponentStackOptions.d.ts +9 -0
  96. package/dist/core/component-stack/types/ComponentStackState.d.ts +4 -0
  97. package/dist/core/component-stack/types/index.d.ts +4 -0
  98. package/dist/core/relationships/composables/index.d.ts +1 -0
  99. package/dist/core/relationships/composables/useRelationshipService.d.ts +2 -0
  100. package/dist/core/relationships/factories/defineRelationship.d.ts +2 -0
  101. package/dist/core/relationships/factories/index.d.ts +1 -0
  102. package/dist/core/relationships/index.d.ts +6 -0
  103. package/dist/core/relationships/index.js +87 -0
  104. package/dist/core/relationships/plugin.d.ts +4 -0
  105. package/dist/core/relationships/services/RelationshipResolver.d.ts +7 -0
  106. package/dist/core/relationships/services/RelationshipService.d.ts +9 -0
  107. package/dist/core/relationships/services/index.d.ts +2 -0
  108. package/dist/core/relationships/symbols.d.ts +3 -0
  109. package/dist/core/relationships/types/BaseEntity.d.ts +5 -0
  110. package/dist/core/relationships/types/RelationshipDefinition.d.ts +29 -0
  111. package/dist/core/relationships/types/RelationshipPresentation.d.ts +11 -0
  112. package/dist/core/relationships/types/RelationshipReference.d.ts +6 -0
  113. package/dist/core/relationships/types/index.d.ts +4 -0
  114. package/dist/core/window-manager/composables/index.d.ts +1 -0
  115. package/dist/core/window-manager/composables/useWindowManager.d.ts +433 -0
  116. package/dist/core/window-manager/index.d.ts +7 -0
  117. package/dist/core/window-manager/index.js +3 -0
  118. package/dist/core/window-manager/plugin.d.ts +4 -0
  119. package/dist/core/window-manager/renderer/WindowManagerRenderer.vue.d.ts +3 -0
  120. package/dist/core/window-manager/renderer/index.d.ts +1 -0
  121. package/dist/core/window-manager/services/WindowManagerService.d.ts +741 -0
  122. package/dist/core/window-manager/services/index.d.ts +1 -0
  123. package/dist/core/window-manager/store/WindowManagerStore.d.ts +589 -0
  124. package/dist/core/window-manager/store/index.d.ts +1 -0
  125. package/dist/core/window-manager/symbols.d.ts +3 -0
  126. package/dist/core/window-manager/types/WindowId.d.ts +1 -0
  127. package/dist/core/window-manager/types/WindowOptions.d.ts +20 -0
  128. package/dist/core/window-manager/types/WindowPosition.d.ts +4 -0
  129. package/dist/core/window-manager/types/WindowSize.d.ts +4 -0
  130. package/dist/core/window-manager/types/WindowState.d.ts +17 -0
  131. package/dist/core/window-manager/types/index.d.ts +5 -0
  132. package/dist/favicon.ico +0 -0
  133. package/dist/index.d.ts +4 -0
  134. package/dist/index.js +13 -0
  135. package/dist/main.css +3 -0
  136. package/dist/symbols-J3RzoVJp.js +3 -0
  137. package/dist/utils/cn.d.ts +2 -0
  138. package/dist/utils/createVariant.d.ts +45 -0
  139. package/dist/utils/index.d.ts +2 -0
  140. package/dist/utils/index.js +41 -0
  141. package/dist/window-manager-DvPg4x8W.js +264 -0
  142. package/package.json +79 -4
package/README.md CHANGED
@@ -1,3 +1,42 @@
1
- # Temporary Holding Version
1
+ # Relationship-UX
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Recommended Browser Setup
10
+
11
+ - Chromium-based browsers (Chrome, Edge, Brave, etc.):
12
+ - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13
+ - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14
+ - Firefox:
15
+ - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16
+ - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
17
+
18
+ ## Type Support for `.vue` Imports in TS
19
+
20
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
21
+
22
+ ## Customize configuration
23
+
24
+ See [Vite Configuration Reference](https://vite.dev/config/).
25
+
26
+ ## Project Setup
27
+
28
+ ```sh
29
+ npm install
30
+ ```
31
+
32
+ ### Compile and Hot-Reload for Development
33
+
34
+ ```sh
35
+ npm run dev
36
+ ```
37
+
38
+ ### Type-Check, Compile and Minify for Production
39
+
40
+ ```sh
41
+ npm run build
42
+ ```
@@ -0,0 +1,413 @@
1
+ import { cn as e, createVariants as t } from "./utils/index.js";
2
+ import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as p, openBlock as m, ref as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, vShow as b, withCtx as x, withDirectives as S, withModifiers as C } from "vue";
3
+ // src/components/interaction/window/useWindowDrag.ts
4
+ function w(e) {
5
+ let t = h(!1), n = 0, r = 0, i = 0, a = 0;
6
+ function o(o) {
7
+ if (o.button !== 0) return;
8
+ let l = e.position();
9
+ n = o.clientX, r = o.clientY, i = l.x, a = l.y, t.value = !0, window.addEventListener("mousemove", s), window.addEventListener("mouseup", c);
10
+ }
11
+ function s(o) {
12
+ if (!t.value) return;
13
+ let s = o.clientX - n, c = o.clientY - r, l = e.size(), u = e.bounds(), d = Math.max(0, u.width - l.width), f = Math.max(0, u.height - l.height), p = Math.min(Math.max(i + s, 0), d), m = Math.min(Math.max(a + c, 0), f);
14
+ e.onMove({
15
+ x: p,
16
+ y: m
17
+ });
18
+ }
19
+ function c() {
20
+ t.value && (t.value = !1, window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", c));
21
+ }
22
+ return p(c), {
23
+ dragging: t,
24
+ start: o
25
+ };
26
+ }
27
+ // src/components/interaction/window/useWindowResize.ts
28
+ function T(e) {
29
+ let t = h(!1), n = null, r = 0, i = 0, a = 0, o = 0, s = 0, c = 0;
30
+ function l(l, f) {
31
+ if (l.button !== 0) return;
32
+ let p = e.position(), m = e.size();
33
+ n = f, r = l.clientX, i = l.clientY, a = p.x, o = p.y, s = m.width, c = m.height, t.value = !0, window.addEventListener("mousemove", u), window.addEventListener("mouseup", d);
34
+ }
35
+ function u(l) {
36
+ if (!t.value || !n) return;
37
+ let u = l.clientX - r, d = l.clientY - i, f = e.bounds(), p = e.minSize?.width ?? 200, m = e.minSize?.height ?? 120, h = a, g = o, _ = s, v = c;
38
+ if (n.includes("e") && (_ = Math.max(p, s + u), _ = Math.min(_, f.width - a)), n.includes("s") && (v = Math.max(m, c + d), v = Math.min(v, f.height - o)), n.includes("w")) {
39
+ let e = Math.min(u, a);
40
+ h = a + e, _ = s - e, _ < p && (_ = p, h = a + s - p);
41
+ }
42
+ if (n.includes("n")) {
43
+ let e = -o, t = c - m, n = Math.max(e, Math.min(d, t));
44
+ g = o + n, v = c - n;
45
+ }
46
+ h = Math.max(0, h), g = Math.max(0, g), _ = Math.min(_, f.width - h), v = Math.min(v, f.height - g), e.onResize({
47
+ width: _,
48
+ height: v
49
+ }, {
50
+ x: h,
51
+ y: g
52
+ });
53
+ }
54
+ function d() {
55
+ t.value && (t.value = !1, n = null, window.removeEventListener("mousemove", u), window.removeEventListener("mouseup", d));
56
+ }
57
+ return p(d), {
58
+ resizing: t,
59
+ start: l
60
+ };
61
+ }
62
+ // src/components/base/button/button.variants.ts
63
+ var E = t({
64
+ base: [
65
+ "inline-flex",
66
+ "items-center",
67
+ "justify-center",
68
+ "gap-2",
69
+ "font-medium",
70
+ "select-none",
71
+ "transition-colors",
72
+ "outline-none",
73
+ "cursor-pointer",
74
+ "focus-visible:ring-2",
75
+ "focus-visible:ring-offset-2",
76
+ "focus-visible:ring-slate-500",
77
+ "focus-visible:ring-offset-white",
78
+ "dark:focus-visible:ring-slate-400",
79
+ "dark:focus-visible:ring-offset-slate-950",
80
+ "disabled:pointer-events-none",
81
+ "disabled:cursor-not-allowed",
82
+ "disabled:opacity-50"
83
+ ],
84
+ variants: {
85
+ variant: {
86
+ filled: [
87
+ "bg-slate-900",
88
+ "text-white",
89
+ "hover:bg-slate-800",
90
+ "active:bg-slate-950",
91
+ "dark:bg-slate-100",
92
+ "dark:text-slate-900",
93
+ "dark:hover:bg-slate-200",
94
+ "dark:active:bg-slate-300"
95
+ ],
96
+ outlined: [
97
+ "border",
98
+ "border-slate-300",
99
+ "bg-transparent",
100
+ "text-slate-900",
101
+ "hover:bg-slate-50",
102
+ "active:bg-slate-100",
103
+ "dark:border-slate-700",
104
+ "dark:text-slate-100",
105
+ "dark:hover:bg-slate-800",
106
+ "dark:active:bg-slate-700"
107
+ ],
108
+ ghost: [
109
+ "bg-transparent",
110
+ "text-slate-900",
111
+ "hover:bg-slate-100",
112
+ "active:bg-slate-200",
113
+ "dark:text-slate-100",
114
+ "dark:hover:bg-slate-800",
115
+ "dark:active:bg-slate-700"
116
+ ]
117
+ },
118
+ size: {
119
+ sm: [
120
+ "h-8",
121
+ "px-3",
122
+ "text-sm"
123
+ ],
124
+ md: [
125
+ "h-10",
126
+ "px-4",
127
+ "text-sm"
128
+ ],
129
+ lg: [
130
+ "h-12",
131
+ "px-6",
132
+ "text-base"
133
+ ]
134
+ },
135
+ rounded: {
136
+ none: "rounded-none",
137
+ sm: "rounded-sm",
138
+ md: "rounded-md",
139
+ lg: "rounded-lg",
140
+ full: "rounded-full"
141
+ }
142
+ },
143
+ defaultVariants: {
144
+ variant: "filled",
145
+ size: "md",
146
+ rounded: "md"
147
+ }
148
+ }), D = {
149
+ key: 0,
150
+ class: "inline-flex",
151
+ "aria-hidden": "true"
152
+ }, O = /* @__PURE__ */ l({
153
+ inheritAttrs: !1,
154
+ __name: "Button",
155
+ props: {
156
+ as: { default: "button" },
157
+ class: {},
158
+ variant: {},
159
+ size: {},
160
+ rounded: {},
161
+ disabled: {
162
+ type: Boolean,
163
+ default: !1
164
+ },
165
+ loading: {
166
+ type: Boolean,
167
+ default: !1
168
+ },
169
+ type: { default: "button" }
170
+ },
171
+ setup(t) {
172
+ let s = t, c = n(() => e(E.compose(s), s.loading && "cursor-wait", s.class));
173
+ return (e, n) => (m(), r(_(t.as), u(e.$attrs, {
174
+ type: t.as === "button" ? t.type : void 0,
175
+ disabled: t.as === "button" ? t.disabled || t.loading : void 0,
176
+ "aria-disabled": t.disabled || t.loading,
177
+ "aria-busy": t.loading,
178
+ class: c.value
179
+ }), {
180
+ default: x(() => [t.loading ? (m(), a("span", D, [...n[0] ||= [o("svg", {
181
+ class: "size-4 animate-spin",
182
+ viewBox: "0 0 24 24",
183
+ fill: "none"
184
+ }, [o("circle", {
185
+ class: "opacity-25",
186
+ cx: "12",
187
+ cy: "12",
188
+ r: "10",
189
+ stroke: "currentColor",
190
+ "stroke-width": "4"
191
+ }), o("path", {
192
+ class: "opacity-75",
193
+ fill: "currentColor",
194
+ d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
195
+ })], -1)]])) : i("", !0), g(e.$slots, "default")]),
196
+ _: 3
197
+ }, 16, [
198
+ "type",
199
+ "disabled",
200
+ "aria-disabled",
201
+ "aria-busy",
202
+ "class"
203
+ ]));
204
+ }
205
+ }), k = { class: "min-w-0 flex-1" }, A = { class: "truncate font-medium dark:text-slate-100" }, j = { class: "min-h-0 flex-1 overflow-auto dark:text-slate-100" }, M = {
206
+ key: 0,
207
+ class: "absolute inset-0 pointer-events-none"
208
+ }, N = /* @__PURE__ */ l({
209
+ __name: "Window",
210
+ props: {
211
+ title: { default: "Window" },
212
+ position: {},
213
+ size: {},
214
+ zIndex: {},
215
+ minimized: {
216
+ type: Boolean,
217
+ default: !1
218
+ },
219
+ maximized: {
220
+ type: Boolean,
221
+ default: !1
222
+ },
223
+ draggable: {
224
+ type: Boolean,
225
+ default: !0
226
+ },
227
+ resizable: {
228
+ type: Boolean,
229
+ default: !0
230
+ },
231
+ bounds: {},
232
+ class: {}
233
+ },
234
+ emits: [
235
+ "focus",
236
+ "close",
237
+ "minimize",
238
+ "maximize",
239
+ "restore",
240
+ "move",
241
+ "resize"
242
+ ],
243
+ setup(t, { emit: r }) {
244
+ let l = t, u = r, { dragging: p, start: h } = w({
245
+ position() {
246
+ return l.position;
247
+ },
248
+ size() {
249
+ return l.size;
250
+ },
251
+ bounds() {
252
+ return l.bounds;
253
+ },
254
+ onMove(e) {
255
+ u("move", e);
256
+ }
257
+ }), { start: _ } = T({
258
+ position() {
259
+ return l.position;
260
+ },
261
+ size() {
262
+ return l.size;
263
+ },
264
+ bounds() {
265
+ return l.bounds;
266
+ },
267
+ onResize(e, t) {
268
+ u("resize", e, t);
269
+ }
270
+ }), E = n(() => l.maximized ? {
271
+ inset: "0",
272
+ zIndex: l.zIndex
273
+ } : {
274
+ left: `${l.position.x}px`,
275
+ top: `${l.position.y}px`,
276
+ width: `${l.size.width}px`,
277
+ height: `${l.size.height}px`,
278
+ zIndex: l.zIndex
279
+ });
280
+ return (n, r) => (m(), a("section", {
281
+ style: f(E.value),
282
+ class: d(y(e)("absolute flex flex-col overflow-hidden", "rounded-lg border bg-white dark:border-slate-600 dark:bg-slate-900 shadow-xl", l.class)),
283
+ onMousedown: r[16] ||= (e) => u("focus")
284
+ }, [
285
+ o("header", {
286
+ class: d(["flex h-10 shrink-0 items-center justify-between border-b dark:border-slate-600 px-3", {
287
+ "cursor-move": t.draggable && !t.maximized && !y(p),
288
+ "cursor-default": !t.draggable || t.maximized,
289
+ "cursor-grabbing": y(p)
290
+ }]),
291
+ onMousedown: r[7] ||= (e) => t.draggable && !t.maximized && y(h)(e)
292
+ }, [o("div", k, [g(n.$slots, "header", {}, () => [o("span", A, v(t.title), 1)])]), o("div", {
293
+ class: "flex shrink-0 items-center gap-1",
294
+ onMousedown: r[6] ||= C(() => {}, ["stop"])
295
+ }, [
296
+ g(n.$slots, "header-actions"),
297
+ g(n.$slots, "header-button-minimize", {}, () => [c(O, {
298
+ type: "button",
299
+ variant: "ghost",
300
+ size: "sm",
301
+ onMousedown: r[0] ||= C(() => {}, ["stop"]),
302
+ onClick: r[1] ||= (e) => u("minimize")
303
+ }, {
304
+ default: x(() => [...r[17] ||= [s(" - ", -1)]]),
305
+ _: 1
306
+ })]),
307
+ g(n.$slots, "header-button-maximize", {}, () => [c(O, {
308
+ type: "button",
309
+ variant: "ghost",
310
+ size: "sm",
311
+ onMousedown: r[2] ||= C(() => {}, ["stop"]),
312
+ onClick: r[3] ||= (e) => l.maximized ? u("restore") : u("maximize")
313
+ }, {
314
+ default: x(() => [...r[18] ||= [s(" □ ", -1)]]),
315
+ _: 1
316
+ })]),
317
+ g(n.$slots, "header-button-close", {}, () => [c(O, {
318
+ type: "button",
319
+ variant: "ghost",
320
+ size: "sm",
321
+ onMousedown: r[4] ||= C(() => {}, ["stop"]),
322
+ onClick: r[5] ||= (e) => u("close")
323
+ }, {
324
+ default: x(() => [...r[19] ||= [s(" x ", -1)]]),
325
+ _: 1
326
+ })])
327
+ ], 32)], 34),
328
+ S(o("main", j, [g(n.$slots, "default")], 512), [[b, !t.minimized]]),
329
+ t.resizable && !t.maximized ? (m(), a("div", M, [
330
+ o("div", {
331
+ class: "pointer-events-auto absolute left-2 right-2 top-0 h-1 cursor-n-resize",
332
+ onMousedown: r[8] ||= C((e) => y(_)(e, "n"), ["stop"])
333
+ }, null, 32),
334
+ o("div", {
335
+ class: "pointer-events-auto absolute bottom-0 left-2 right-2 h-1 cursor-s-resize",
336
+ onMousedown: r[9] ||= C((e) => y(_)(e, "s"), ["stop"])
337
+ }, null, 32),
338
+ o("div", {
339
+ class: "pointer-events-auto absolute bottom-2 right-0 top-2 w-1 cursor-e-resize",
340
+ onMousedown: r[10] ||= C((e) => y(_)(e, "e"), ["stop"])
341
+ }, null, 32),
342
+ o("div", {
343
+ class: "pointer-events-auto absolute bottom-2 left-0 top-2 w-1 cursor-w-resize",
344
+ onMousedown: r[11] ||= C((e) => y(_)(e, "w"), ["stop"])
345
+ }, null, 32),
346
+ o("div", {
347
+ class: "pointer-events-auto absolute right-0 top-0 h-2 w-2 cursor-ne-resize",
348
+ onMousedown: r[12] ||= C((e) => y(_)(e, "ne"), ["stop"])
349
+ }, null, 32),
350
+ o("div", {
351
+ class: "pointer-events-auto absolute left-0 top-0 h-2 w-2 cursor-nw-resize",
352
+ onMousedown: r[13] ||= C((e) => y(_)(e, "nw"), ["stop"])
353
+ }, null, 32),
354
+ o("div", {
355
+ class: "pointer-events-auto absolute bottom-0 right-0 h-2 w-2 cursor-se-resize",
356
+ onMousedown: r[14] ||= C((e) => y(_)(e, "se"), ["stop"])
357
+ }, null, 32),
358
+ o("div", {
359
+ class: "pointer-events-auto absolute bottom-0 left-0 h-2 w-2 cursor-sw-resize",
360
+ onMousedown: r[15] ||= C((e) => y(_)(e, "sw"), ["stop"])
361
+ }, null, 32)
362
+ ])) : i("", !0)
363
+ ], 38));
364
+ }
365
+ }), P = t({
366
+ base: [
367
+ "fixed",
368
+ "inset-0",
369
+ "z-40",
370
+ "bg-black"
371
+ ],
372
+ variants: {
373
+ opacity: {
374
+ light: "opacity-25",
375
+ medium: "opacity-50",
376
+ dark: "opacity-75"
377
+ },
378
+ blur: {
379
+ none: "",
380
+ sm: "backdrop-blur-sm",
381
+ md: "backdrop-blur-md",
382
+ lg: "backdrop-blur-lg"
383
+ }
384
+ },
385
+ defaultVariants: {
386
+ opacity: "medium",
387
+ blur: "none"
388
+ }
389
+ }), F = /* @__PURE__ */ l({
390
+ __name: "Overlay",
391
+ props: {
392
+ opacity: { default: "medium" },
393
+ blur: { default: "none" },
394
+ closeOnClick: {
395
+ type: Boolean,
396
+ default: !0
397
+ },
398
+ class: {}
399
+ },
400
+ emits: ["click"],
401
+ setup(t, { emit: r }) {
402
+ let i = t, o = r, s = n(() => e(P.compose(i), i.class));
403
+ function c(e) {
404
+ i.closeOnClick && o("click", e);
405
+ }
406
+ return (e, t) => (m(), a("div", {
407
+ class: d(s.value),
408
+ "aria-hidden": "true",
409
+ onClick: c
410
+ }, null, 2));
411
+ }
412
+ });
413
+ export { E as a, O as i, P as n, T as o, N as r, w as s, F as t };
@@ -0,0 +1,105 @@
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createElementBlock as i, defineComponent as a, guardReactiveProps as o, inject as s, markRaw as c, normalizeProps as l, normalizeStyle as u, openBlock as d, ref as f, renderList as p, renderSlot as m, resolveDynamicComponent as h, unref as g } from "vue";
2
+ import { defineStore as _, storeToRefs as v } from "pinia";
3
+ // src/core/component-stack/store/ComponentStackStore.ts
4
+ var y = _("component-stack", () => {
5
+ let e = f([]), t = n(() => e.value.length), r = n(() => t.value === 0), i = n(() => e.value[e.value.length - 1]);
6
+ function a(t) {
7
+ e.value.push(t);
8
+ }
9
+ function o() {
10
+ return e.value.pop();
11
+ }
12
+ function s(t) {
13
+ let n = e.value.findIndex((e) => e.id === t);
14
+ if (n === -1) return;
15
+ let [r] = e.value.splice(n, 1);
16
+ return r;
17
+ }
18
+ function c(e) {
19
+ let t = o();
20
+ return a(e), t;
21
+ }
22
+ function l() {
23
+ let t = [...e.value];
24
+ return e.value = [], t;
25
+ }
26
+ return {
27
+ stack: e,
28
+ size: t,
29
+ isEmpty: r,
30
+ top: i,
31
+ push: a,
32
+ pop: o,
33
+ remove: s,
34
+ replace: c,
35
+ clear: l
36
+ };
37
+ }), b = class {
38
+ get store() {
39
+ return y();
40
+ }
41
+ push(e, t = {}, n = {}) {
42
+ let r = {
43
+ id: crypto.randomUUID(),
44
+ component: c(e),
45
+ props: t,
46
+ options: n
47
+ };
48
+ return this.store.push(r), r;
49
+ }
50
+ pop() {
51
+ return this.store.pop();
52
+ }
53
+ remove(e) {
54
+ return this.store.remove(e);
55
+ }
56
+ replace(e, t = {}, n = {}) {
57
+ let r = {
58
+ id: crypto.randomUUID(),
59
+ component: c(e),
60
+ props: t,
61
+ options: n
62
+ };
63
+ return this.store.replace(r), r;
64
+ }
65
+ clear() {
66
+ return this.store.clear();
67
+ }
68
+ }, x = Symbol("relationship-ui:component-stack"), S = /* @__PURE__ */ a({
69
+ __name: "ComponentWrapper",
70
+ props: { item: {} },
71
+ setup(e) {
72
+ let t = e, a = n(() => t.item.options?.zIndex);
73
+ return (t, n) => (d(), i("div", {
74
+ class: "component-stack__wrapper",
75
+ style: u({ zIndex: a.value })
76
+ }, [
77
+ m(t.$slots, "before"),
78
+ (d(), r(h(e.item.component), l(o(e.item.props)), null, 16)),
79
+ m(t.$slots, "after")
80
+ ], 4));
81
+ }
82
+ }), C = /* @__PURE__ */ a({
83
+ __name: "ComponentStackRenderer",
84
+ setup(n) {
85
+ let a = y(), { stack: o } = v(a);
86
+ return (n, a) => (d(), r(t, { to: "body" }, [(d(!0), i(e, null, p(g(o), (e) => (d(), r(S, {
87
+ key: e.id,
88
+ item: e
89
+ }, null, 8, ["item"]))), 128))]));
90
+ }
91
+ });
92
+ // src/core/component-stack/plugin.ts
93
+ function w() {
94
+ return { install(e) {
95
+ let t = new b();
96
+ e.provide(x, t), e.component("ComponentStackRenderer", C);
97
+ } };
98
+ }
99
+ // src/core/component-stack/composables/useComponentStack.ts
100
+ function T() {
101
+ let e = s(x);
102
+ if (!e) throw Error("ComponentStackService was not installed.");
103
+ return e;
104
+ }
105
+ export { x as a, S as i, w as n, b as o, C as r, y as s, T as t };
@@ -0,0 +1,6 @@
1
+ import { AvatarProps } from './types';
2
+ declare const __VLS_export: import('vue').DefineComponent<AvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
3
+ size: import('./types').AvatarSize;
4
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export declare const avatarVariants: import('../../../utils').VariantComposer<{
2
+ size: {
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ xl: string;
7
+ };
8
+ }>;
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './avatar.variants';
3
+ export { default as Avatar } from './Avatar.vue';
@@ -0,0 +1,8 @@
1
+ export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
2
+ export type AvatarProps = {
3
+ src?: string;
4
+ alt?: string;
5
+ fallback?: string;
6
+ size?: AvatarSize;
7
+ class?: string;
8
+ };
@@ -0,0 +1,19 @@
1
+ import { BadgeProps } from './types';
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
6
+ };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
8
+ declare const __VLS_base: import('vue').DefineComponent<BadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
9
+ size: import('./types').BadgeSize;
10
+ variant: import('./types').BadgeVariant;
11
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,16 @@
1
+ export declare const badgeVariants: import('../../../utils').VariantComposer<{
2
+ variant: {
3
+ default: string[];
4
+ secondary: string[];
5
+ success: string[];
6
+ warning: string[];
7
+ danger: string[];
8
+ info: string[];
9
+ outline: string[];
10
+ };
11
+ size: {
12
+ sm: string[];
13
+ md: string[];
14
+ lg: string[];
15
+ };
16
+ }>;
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './badge.variants';
3
+ export { default as Badge } from './Badge.vue';
@@ -0,0 +1,7 @@
1
+ export type BadgeVariant = 'default' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'outline';
2
+ export type BadgeSize = 'sm' | 'md' | 'lg';
3
+ export type BadgeProps = {
4
+ variant?: BadgeVariant;
5
+ size?: BadgeSize;
6
+ class?: string;
7
+ };
@@ -0,0 +1,21 @@
1
+ import { ButtonProps } from './types';
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
6
+ };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
8
+ declare const __VLS_base: import('vue').DefineComponent<ButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
9
+ disabled: boolean;
10
+ as: string;
11
+ loading: boolean;
12
+ type: "button" | "reset" | "submit";
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,19 @@
1
+ export declare const buttonVariants: import('../../../utils').VariantComposer<{
2
+ variant: {
3
+ filled: string[];
4
+ outlined: string[];
5
+ ghost: string[];
6
+ };
7
+ size: {
8
+ sm: string[];
9
+ md: string[];
10
+ lg: string[];
11
+ };
12
+ rounded: {
13
+ none: string;
14
+ sm: string;
15
+ md: string;
16
+ lg: string;
17
+ full: string;
18
+ };
19
+ }>;
@@ -0,0 +1,3 @@
1
+ export * from './types';
2
+ export * from './button.variants';
3
+ export { default as Button } from './Button.vue';