@alfakit/vue 0.1.11 → 0.1.13
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/CHANGELOG.md +12 -0
- package/dist/AlfakitRoot.vue.d.ts.map +1 -1
- package/dist/AlfakitRoot.vue_vue_type_script_setup_true_lang.js +47 -40
- package/dist/AlfakitRoot.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/entries/ImageEntryComponent.vue.d.ts.map +1 -1
- package/dist/components/entries/ImageEntryComponent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/entries/ImageEntryComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/BuilderField.vue.d.ts.map +1 -1
- package/dist/components/fields/BuilderField.vue_vue_type_script_setup_true_lang.js +114 -114
- package/dist/components/fields/BuilderField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/FileUploadField.vue.d.ts.map +1 -1
- package/dist/components/fields/FileUploadField.vue_vue_type_script_setup_true_lang.js +143 -146
- package/dist/components/fields/FileUploadField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/RepeaterField.vue.d.ts.map +1 -1
- package/dist/components/fields/RepeaterField.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/components/fields/RepeaterField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/rich-editor-extensions.d.ts.map +1 -1
- package/dist/components/fields/rich-editor-extensions.js +4 -2
- package/dist/components/fields/rich-editor-extensions.js.map +1 -1
- package/dist/components/layout/WizardComponent.vue.d.ts.map +1 -1
- package/dist/components/layout/WizardComponent.vue_vue_type_script_setup_true_lang.js +41 -40
- package/dist/components/layout/WizardComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/notifications/NotificationsMenu.vue.d.ts.map +1 -1
- package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js +103 -102
- package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/notifications/flash-toasts.d.ts +7 -0
- package/dist/components/notifications/flash-toasts.d.ts.map +1 -1
- package/dist/components/notifications/flash-toasts.js +12 -6
- package/dist/components/notifications/flash-toasts.js.map +1 -1
- package/dist/components/panel/PwaManager.vue.d.ts.map +1 -1
- package/dist/components/panel/PwaManager.vue_vue_type_script_setup_true_lang.js +16 -15
- package/dist/components/panel/PwaManager.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/PwaMenuItems.vue.d.ts.map +1 -1
- package/dist/components/panel/PwaMenuItems.vue_vue_type_script_setup_true_lang.js +27 -26
- package/dist/components/panel/PwaMenuItems.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/ShortcutsOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/panel/ShortcutsOverlay.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/pwa.d.ts.map +1 -1
- package/dist/components/panel/pwa.js +6 -5
- package/dist/components/panel/pwa.js.map +1 -1
- package/dist/components/table/TableCellContent.vue.d.ts.map +1 -1
- package/dist/components/table/TableCellContent.vue_vue_type_script_setup_true_lang.js +41 -41
- package/dist/components/table/TableCellContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components.css +19 -0
- package/dist/eject-manifest.json +2 -2
- package/dist/lib/discovery.d.ts.map +1 -1
- package/dist/lib/discovery.js +15 -14
- package/dist/lib/discovery.js.map +1 -1
- package/dist/lib/hydration.d.ts +15 -0
- package/dist/lib/hydration.d.ts.map +1 -1
- package/dist/lib/hydration.js +22 -8
- package/dist/lib/hydration.js.map +1 -1
- package/dist/pages/ContentBlockRenderer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/pages/ContentBlockRenderer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/standalone/AlfakitComponent.vue.d.ts.map +1 -1
- package/dist/standalone/AlfakitComponent.vue_vue_type_script_setup_true_lang.js +34 -30
- package/dist/standalone/AlfakitComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/standalone/AlfakitToaster.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/standalone/AlfakitToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/standalone/runtime.d.ts +1 -3
- package/dist/standalone/runtime.d.ts.map +1 -1
- package/dist/standalone/runtime.js +26 -34
- package/dist/standalone/runtime.js.map +1 -1
- package/dist/standalone/toaster-claims.d.ts +4 -0
- package/dist/standalone/toaster-claims.d.ts.map +1 -0
- package/dist/standalone/toaster-claims.js +14 -0
- package/dist/standalone/toaster-claims.js.map +1 -0
- package/dist/starter-kit/widgets/WidgetShell.vue.d.ts +2 -2
- package/dist/starter-kit/widgets/WidgetShell.vue.d.ts.map +1 -1
- package/dist/starter-kit/widgets/WidgetShell.vue_vue_type_script_setup_true_lang.js +50 -18
- package/dist/starter-kit/widgets/WidgetShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/package.json +2 -2
- package/src/AlfakitRoot.vue +16 -1
- package/src/components/entries/ImageEntryComponent.vue +2 -0
- package/src/components/fields/BuilderField.vue +7 -2
- package/src/components/fields/FileUploadField.vue +2 -7
- package/src/components/fields/RepeaterField.vue +9 -2
- package/src/components/fields/rich-editor-extensions.ts +9 -5
- package/src/components/layout/WizardComponent.vue +5 -1
- package/src/components/notifications/NotificationsMenu.vue +3 -2
- package/src/components/notifications/flash-toasts.ts +8 -0
- package/src/components/panel/PwaManager.vue +9 -5
- package/src/components/panel/PwaMenuItems.vue +14 -3
- package/src/components/panel/ShortcutsOverlay.vue +1 -1
- package/src/components/panel/pwa.ts +2 -1
- package/src/components/table/TableCellContent.vue +3 -1
- package/src/lib/discovery.ts +6 -0
- package/src/lib/hydration.ts +38 -2
- package/src/pages/ContentBlockRenderer.vue +1 -1
- package/src/standalone/AlfakitComponent.vue +4 -0
- package/src/standalone/runtime.ts +2 -14
- package/src/standalone/toaster-claims.ts +16 -0
- package/src/starter-kit/widgets/WidgetShell.vue +77 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlfakitComponent.vue.d.ts","sourceRoot":"","sources":["../../src/standalone/AlfakitComponent.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AlfakitComponent.vue.d.ts","sourceRoot":"","sources":["../../src/standalone/AlfakitComponent.vue"],"names":[],"mappings":"AAgOA,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC/B,MAAM,eAAe,CAAA;AAGtB,OAAO,EAA4D,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAKnG,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,YAAY,CAAA;AAanB;;;;;;;;;;;;GAYG;AACH,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,SAAS,EAAE,yBAAyB,CAAA;IACpC,uGAAuG;IACvG,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACzC,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;CAChC,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,YAAY,EAAE,CAAC;QAAC,IAAI,EAAE,yBAAyB,CAAA;KAAE,KAAK,OAAO,CAAA;CAC1F,CAAC;AAoRF,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { ALFAKIT_KEY as e, provideStandalone as t, useOptionalAlfakit as n } from "../context.js";
|
|
2
2
|
import { providePageActionContext as r } from "../components/actions/action-context.js";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as ee } from "../lib/utils.js";
|
|
4
|
+
import { startIdScope as i } from "../lib/hydration.js";
|
|
4
5
|
import a from "../components/actions/ActionList.js";
|
|
5
|
-
import
|
|
6
|
+
import te from "../pages/ContentBlockRenderer.js";
|
|
6
7
|
import o from "../components/actions/ActionModals.js";
|
|
7
8
|
import s from "../components/ui/TooltipProvider.js";
|
|
8
|
-
import { claimToaster as c,
|
|
9
|
+
import { claimToaster as c, hasToaster as l } from "./toaster-claims.js";
|
|
10
|
+
import { createStandaloneContext as u, createStandaloneRegistry as d, ensureStandaloneRuntime as f } from "./runtime.js";
|
|
9
11
|
import p from "./AlfakitToaster.js";
|
|
10
|
-
import { StandaloneComponentState as
|
|
11
|
-
import { usePage as
|
|
12
|
-
import { Fragment as
|
|
12
|
+
import { StandaloneComponentState as m, findStandalonePropName as ne, registerStandaloneProp as re, standalonePanelSchema as h } from "@alfakit/core";
|
|
13
|
+
import { usePage as g } from "@inertiajs/vue3";
|
|
14
|
+
import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createVNode as C, defineComponent as w, normalizeClass as T, onMounted as ie, onScopeDispose as ae, openBlock as E, provide as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as j, toDisplayString as M, unref as N, watch as P, withCtx as F } from "vue";
|
|
13
15
|
import { ConfigProvider as I } from "reka-ui";
|
|
14
16
|
//#region src/standalone/AlfakitComponent.vue?vue&type=script&setup=true&lang.ts
|
|
15
17
|
var L = ["data-alfakit-component", "dir"], R = {
|
|
@@ -22,7 +24,7 @@ var L = ["data-alfakit-component", "dir"], R = {
|
|
|
22
24
|
}, V = {
|
|
23
25
|
key: 1,
|
|
24
26
|
class: "text-muted-foreground mt-1 text-sm"
|
|
25
|
-
}, H = /*@__PURE__*/
|
|
27
|
+
}, H = /*@__PURE__*/ w({
|
|
26
28
|
__name: "AlfakitComponent",
|
|
27
29
|
props: {
|
|
28
30
|
component: {},
|
|
@@ -35,30 +37,32 @@ var L = ["data-alfakit-component", "dir"], R = {
|
|
|
35
37
|
Array
|
|
36
38
|
] }
|
|
37
39
|
},
|
|
38
|
-
setup(
|
|
39
|
-
let H =
|
|
40
|
+
setup(w) {
|
|
41
|
+
let H = w;
|
|
42
|
+
i();
|
|
43
|
+
let U = n(), W = g(), G = O(0), K = new m(H.component, () => G.value++), q = (e, t) => K.poll(e, t), J = (e) => K.refresh(e), Y = U ? {
|
|
40
44
|
...U,
|
|
41
|
-
actions:
|
|
45
|
+
actions: u({
|
|
42
46
|
action: H.component.endpoints.action,
|
|
43
47
|
modal: H.component.endpoints.modal
|
|
44
48
|
}, H.components, q).actions,
|
|
45
|
-
registry:
|
|
49
|
+
registry: d(H.components, U.registry),
|
|
46
50
|
poll: q,
|
|
47
51
|
refresh: J
|
|
48
52
|
} : {
|
|
49
|
-
...
|
|
53
|
+
...u({
|
|
50
54
|
action: H.component.endpoints.action,
|
|
51
55
|
modal: H.component.endpoints.modal
|
|
52
56
|
}, H.components, q),
|
|
53
57
|
refresh: J
|
|
54
58
|
};
|
|
55
|
-
|
|
56
|
-
let
|
|
59
|
+
D(e, Y);
|
|
60
|
+
let oe = v(() => h(H.component)), X = v(() => (G.value, K.setComponent(H.component), K.page)), Z = v(() => H.component.localization?.direction ?? "ltr"), Q = v(() => ({
|
|
57
61
|
token: H.component.token,
|
|
58
62
|
component: "page"
|
|
59
63
|
}));
|
|
60
64
|
t({
|
|
61
|
-
panel:
|
|
65
|
+
panel: oe,
|
|
62
66
|
page: X
|
|
63
67
|
}), r(Q.value), P(() => H.component, (e) => {
|
|
64
68
|
Y.actions.setEndpoints({
|
|
@@ -70,49 +74,49 @@ var L = ["data-alfakit-component", "dir"], R = {
|
|
|
70
74
|
flush: "sync"
|
|
71
75
|
});
|
|
72
76
|
let $ = O(!1);
|
|
73
|
-
return typeof window < "u" && P(() => ne(W.props, H.component), (e, t, n) => n(re(e ?? null)), { immediate: !0 }),
|
|
74
|
-
if (
|
|
77
|
+
return typeof window < "u" && P(() => ne(W.props, H.component), (e, t, n) => n(re(e ?? null)), { immediate: !0 }), ie(() => {
|
|
78
|
+
if (f(), P(() => H.component.token, () => void K.loadLazy(H.component), { immediate: !0 }), U) return;
|
|
75
79
|
let e = null, t = !1;
|
|
76
80
|
queueMicrotask(() => {
|
|
77
|
-
t ||
|
|
78
|
-
}),
|
|
81
|
+
t || l() || (e = c(), $.value = !0);
|
|
82
|
+
}), ae(() => {
|
|
79
83
|
t = !0, e?.();
|
|
80
84
|
});
|
|
81
|
-
}), (e, t) => (
|
|
85
|
+
}), (e, t) => (E(), y(j(N(U) ? "div" : N(I)), {
|
|
82
86
|
dir: N(U) ? void 0 : Z.value,
|
|
83
|
-
class:
|
|
87
|
+
class: T(N(U) ? "contents" : void 0)
|
|
84
88
|
}, {
|
|
85
|
-
default: F(() => [
|
|
89
|
+
default: F(() => [C(s, { "delay-duration": 0 }, {
|
|
86
90
|
default: F(() => [
|
|
87
|
-
|
|
91
|
+
S("div", {
|
|
88
92
|
"data-slot": "standalone",
|
|
89
93
|
"data-alfakit-component": H.component.class,
|
|
90
94
|
dir: Z.value,
|
|
91
|
-
class:
|
|
95
|
+
class: T(N(ee)("flex flex-col gap-6", H.class))
|
|
92
96
|
}, [
|
|
93
|
-
X.value.heading || X.value.headerActions?.length ? (
|
|
97
|
+
X.value.heading || X.value.headerActions?.length ? (E(), x("header", R, [S("div", z, [X.value.heading ? (E(), x("h2", B, M(X.value.heading), 1)) : b("", !0), X.value.subheading ? (E(), x("p", V, M(X.value.subheading), 1)) : b("", !0)]), X.value.headerActions && X.value.headerActions.length > 0 ? (E(), y(a, {
|
|
94
98
|
key: 0,
|
|
95
99
|
actions: X.value.headerActions,
|
|
96
100
|
context: Q.value,
|
|
97
101
|
align: "end",
|
|
98
102
|
class: "max-w-full min-w-0"
|
|
99
|
-
}, null, 8, ["actions", "context"])) :
|
|
103
|
+
}, null, 8, ["actions", "context"])) : b("", !0)])) : b("", !0),
|
|
100
104
|
A(e.$slots, "header"),
|
|
101
105
|
A(e.$slots, "default", {
|
|
102
106
|
blocks: X.value.content,
|
|
103
107
|
page: H.component
|
|
104
|
-
}, () => [(
|
|
108
|
+
}, () => [(E(!0), x(_, null, k(X.value.content, (e) => (E(), y(te, {
|
|
105
109
|
key: e.key,
|
|
106
110
|
block: e
|
|
107
111
|
}, null, 8, ["block"]))), 128))]),
|
|
108
112
|
A(e.$slots, "footer")
|
|
109
113
|
], 10, L),
|
|
110
|
-
|
|
111
|
-
$.value ? (
|
|
114
|
+
C(o),
|
|
115
|
+
$.value ? (E(), y(p, {
|
|
112
116
|
key: 0,
|
|
113
117
|
claimed: "",
|
|
114
118
|
dir: Z.value
|
|
115
|
-
}, null, 8, ["dir"])) :
|
|
119
|
+
}, null, 8, ["dir"])) : b("", !0)
|
|
116
120
|
]),
|
|
117
121
|
_: 3
|
|
118
122
|
})]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlfakitComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_unref","_normalizeClass","_withCtx","_createVNode","TooltipProvider","_createElementVNode","_createElementBlock","_toDisplayString","_createCommentVNode","ActionList","_renderSlot","_Fragment","_renderList","ContentBlockRenderer","ActionModals","AlfakitToaster","ActionList_default","ContentBlockRenderer_default","ActionModals_default","TooltipProvider_default","AlfakitToaster_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","AlfakitComponent_vue_vue_type_script_setup_true_lang_default","props","__props","parent","useOptionalAlfakit","inertiaPage","usePage","version","ref","state","StandaloneComponentState","poll","target","interval","refresh","targets","context","createStandaloneContext","createStandaloneRegistry","ALFAKIT_KEY","panel","computed","standalonePanelSchema","page","direction","actionContext","provideStandalone","providePageActionContext","watch","component","ownsToaster","findStandalonePropName","onCleanup","registerStandaloneProp","name","onMounted","ensureStandaloneRuntime","release","cancelled","hasToaster","claimToaster","onScopeDispose","openBlock","createBlock","resolveDynamicComponent","unref","ConfigProvider","normalizeClass","withCtx","createVNode","createElementVNode","cn","createElementBlock","toDisplayString","createCommentVNode","renderSlot","_ctx","Fragment","renderList","block"],"sources":["../../src/standalone/AlfakitComponent.vue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AlfakitComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_unref","_normalizeClass","_withCtx","_createVNode","TooltipProvider","_createElementVNode","_createElementBlock","_toDisplayString","_createCommentVNode","ActionList","_renderSlot","_Fragment","_renderList","ContentBlockRenderer","ActionModals","AlfakitToaster","ActionList_default","ContentBlockRenderer_default","ActionModals_default","TooltipProvider_default","AlfakitToaster_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","AlfakitComponent_vue_vue_type_script_setup_true_lang_default","props","__props","parent","useOptionalAlfakit","inertiaPage","usePage","version","ref","state","StandaloneComponentState","poll","target","interval","refresh","targets","context","createStandaloneContext","createStandaloneRegistry","ALFAKIT_KEY","panel","computed","standalonePanelSchema","page","direction","actionContext","provideStandalone","providePageActionContext","watch","component","ownsToaster","findStandalonePropName","onCleanup","registerStandaloneProp","name","onMounted","ensureStandaloneRuntime","release","cancelled","hasToaster","claimToaster","onScopeDispose","openBlock","createBlock","resolveDynamicComponent","unref","ConfigProvider","normalizeClass","withCtx","createVNode","createElementVNode","cn","createElementBlock","toDisplayString","createCommentVNode","renderSlot","_ctx","Fragment","renderList","block"],"sources":["../../src/standalone/AlfakitComponent.vue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDA,IAAM8B,IAAQC;EAed,EAAa;EAEb,IAAMC,IAASC,EAAmB,GAC5BC,IAAcC,EAAQ,GAGtBC,IAAUC,EAAI,CAAC,GACfC,IAAQ,IAAIC,EAAyBT,E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AA,GAAAS,EAEI,KAFJmB,GAEIlB,EADC0C,EAAA,MAAK,UAAU,GAAA,CAAA,KAAA+B,EAAA,IAAA,EAAA,CAAA,CAAA,GAId/B,EAAA,MAAK,iBAAiBA,EAAA,MAAK,cAAc,SAAM,KADvDpD,EAAA,GAAAC,EAMEW,GAAA;;OAJC,SAASwC,EAAA,MAAK;OACd,SAASE,EAAA;OACV,OAAM;OACN,OAAM;;MAGVzC,EAAsBwE,EAAA,QAAA,QAAA;MACtBxE,EAEOwE,EAAA,QAAA,WAAA;OAFA,QAAQjC,EAAA,MAAK;OAAU,MAAMtB,EAAM;MAA1C,SAEO,EADL9B,EAAA,EAAA,GAAAS,EAAsFK,GAAA,MAAAC,EAAhDqC,EAAA,MAAK,UAAd,OAA7BpD,EAAA,GAAAC,EAAsFe,IAAA;OAAjC,KAAKwE,EAAM;OAAa;;MAE/E3E,EAAsBwE,EAAA,QAAA,QAAA;;KAExB/E,EAAgBW,CAAA;KACM0C,EAAA,SAAtB3D,EAAA,GAAAC,EAA8DiB,GAAA;;MAA3B,SAAA;MAAS,KAAKmC,EAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useOptionalAlfakit as e } from "../context.js";
|
|
2
2
|
import { setToasterId as t } from "../components/notifications/flash-toasts.js";
|
|
3
|
-
import { claimToaster as n
|
|
3
|
+
import { claimToaster as n } from "./toaster-claims.js";
|
|
4
|
+
import { createStandaloneContext as r, ensureFlashToasts as i } from "./runtime.js";
|
|
4
5
|
import a from "../components/ui/Toaster.js";
|
|
5
6
|
import { STARTER_KIT_TOASTER_ID as o, resolveToastPosition as s } from "@alfakit/core";
|
|
6
7
|
import { createBlock as c, createCommentVNode as l, defineComponent as u, onMounted as d, onUnmounted as f, openBlock as p, unref as m } from "vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlfakitToaster.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","Toaster","_unref","_createCommentVNode","Toaster_default","AlfakitToaster_vue_vue_type_script_setup_true_lang_default","props","__props","context","useOptionalAlfakit","createStandaloneContext","release","onMounted","claimToaster","setToasterId","STARTER_KIT_TOASTER_ID","ensureFlashToasts","onUnmounted","openBlock","createBlock","unref","resolveToastPosition","createCommentVNode"],"sources":["../../src/standalone/AlfakitToaster.vue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AlfakitToaster.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","Toaster","_unref","_createCommentVNode","Toaster_default","AlfakitToaster_vue_vue_type_script_setup_true_lang_default","props","__props","context","useOptionalAlfakit","createStandaloneContext","release","onMounted","claimToaster","setToasterId","STARTER_KIT_TOASTER_ID","ensureFlashToasts","onUnmounted","openBlock","createBlock","unref","resolveToastPosition","createCommentVNode"],"sources":["../../src/standalone/AlfakitToaster.vue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAgBA,IAAMO,IAAQC,GAiBRC,IACJC,EAAmB,KAAKC,EAAwB;GAAE,QAAQ;GAAI,OAAO;EAAG,GAAG,KAAA,GAAW,KAAA,CAAS,GAE7FC,IAA+B;SAEnCC,QAAgB;GAOd,AANKN,EAAM,YAAS,IAAUO,EAAa,IAIvCP,EAAM,WAASQ,EAAaC,CAAsB,GAEtDC,EAAkBR,EAAQ,QAAQ;EACpC,CAAC,GAEDS,QAAkB;GAGhB,AAFAN,IAAU,GAENL,EAAM,WAASQ,EAAa,KAAA,CAAS;EAC3C,CAAC,aAKSR,EAAM,WADdP,EAAA,GAAAC,EAOEC,GAAA;;GALC,IAAIC,EAAAa,CAAA;GACJ,UAAUb,EAAAmB,CAAA,CAAoB,CAACf,EAAM,UAAUA,EAAM,GAAG;GACxD,KAAKA,EAAM;GACZ,eAAA;GACA,gBAAA"}
|
|
@@ -15,9 +15,7 @@ export declare function createStandaloneContext(endpoints: {
|
|
|
15
15
|
action: string;
|
|
16
16
|
modal: string;
|
|
17
17
|
}, overrides: Record<string, AnyComponent> | undefined, poll: AlfakitContextValue['poll']): AlfakitContextValue;
|
|
18
|
-
|
|
19
|
-
export declare function claimToaster(): () => void;
|
|
20
|
-
export declare function hasToaster(): boolean;
|
|
18
|
+
export { claimToaster, hasToaster } from './toaster-claims';
|
|
21
19
|
/**
|
|
22
20
|
* Show the notifications the server flashed (`Notification::make()->send()`), from the
|
|
23
21
|
* `flash` Inertia event after each visit and from the initial page (whose event fired
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/standalone/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAOlB,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAYnE,2EAA2E;AAC3E,wBAAgB,uBAAuB,IAAI,IAAI,CAO9C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EACxC,IAAI,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,GACrC,iBAAiB,CAAC,YAAY,CAAC,CAoBjC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAC5C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAAS,EACnD,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAChC,mBAAmB,CAsBrB;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/standalone/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAOlB,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAYnE,2EAA2E;AAC3E,wBAAgB,uBAAuB,IAAI,IAAI,CAO9C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EACxC,IAAI,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,GACrC,iBAAiB,CAAC,YAAY,CAAC,CAoBjC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAC5C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAAS,EACnD,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAChC,mBAAmB,CAsBrB;AAKD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAQ3D;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,YAAY,CAAC,GAAG,IAAI,CAkBjF;AAED,gFAAgF;AAChF,wBAAgB,YAAY,IAAI,OAAO,CAUtC"}
|
|
@@ -1,60 +1,52 @@
|
|
|
1
1
|
import { showToast as e } from "../components/notifications/flash-toasts.js";
|
|
2
2
|
import { createDefaultRegistry as t } from "../registry.js";
|
|
3
3
|
import { getStandaloneDefaults as n } from "./configure.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { claimToaster as r, hasToaster as i } from "./toaster-claims.js";
|
|
5
|
+
import { ActionRunner as a, ComponentRegistry as o, FlashNotificationTracker as s, Translator as c, installPrefetchInvalidation as l, reloadOnExpiredPage as u, resolveRequestErrorNotification as d } from "@alfakit/core";
|
|
6
|
+
import { router as f } from "@inertiajs/vue3";
|
|
6
7
|
//#region src/standalone/runtime.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
|
|
8
|
+
var p = typeof window > "u", m = p ? null : new c(), h = !1;
|
|
9
|
+
function g() {
|
|
10
|
+
p || h || (h = !0, u(), l());
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function _(e, r) {
|
|
12
13
|
if (!r) return t().registerMany(n().components ?? {}).registerMany(e ?? {});
|
|
13
14
|
if (!e || Object.keys(e).length === 0) return r;
|
|
14
|
-
let
|
|
15
|
+
let i = new o();
|
|
15
16
|
for (let e of r.types()) {
|
|
16
17
|
let t = r.resolve(e);
|
|
17
|
-
t &&
|
|
18
|
+
t && i.register(e, t);
|
|
18
19
|
}
|
|
19
|
-
return
|
|
20
|
+
return i.registerMany(e);
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
let
|
|
22
|
+
function v(t, n, r) {
|
|
23
|
+
let i = m ?? new c();
|
|
23
24
|
return {
|
|
24
|
-
registry:
|
|
25
|
+
registry: _(n),
|
|
25
26
|
pages: {},
|
|
26
|
-
translator:
|
|
27
|
-
actions: new
|
|
27
|
+
translator: i,
|
|
28
|
+
actions: new a({
|
|
28
29
|
endpoints: { ...t },
|
|
29
30
|
onError: (t) => {
|
|
30
|
-
let n =
|
|
31
|
+
let n = d(t, null, (e, t, n) => i.t(e, t, n));
|
|
31
32
|
n && e(n);
|
|
32
33
|
}
|
|
33
34
|
}),
|
|
34
|
-
poll:
|
|
35
|
+
poll: r
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function y() {
|
|
44
|
-
return _ > 0;
|
|
45
|
-
}
|
|
46
|
-
var b = new a(), x = null, S = !1;
|
|
47
|
-
function C(t) {
|
|
48
|
-
if (x = t, d || S) return;
|
|
49
|
-
S = !0;
|
|
38
|
+
var y = new s(), b = null, x = !1;
|
|
39
|
+
function S(t) {
|
|
40
|
+
if (b = t, p || x) return;
|
|
41
|
+
x = !0;
|
|
50
42
|
let n = (t) => {
|
|
51
43
|
let n = t?.alfakitNotifications;
|
|
52
|
-
for (let t of
|
|
44
|
+
for (let t of y.fresh(n)) e(t, b?.resolve(t.view ?? ""));
|
|
53
45
|
};
|
|
54
|
-
n(
|
|
46
|
+
n(C()), f.on("flash", (e) => n(e.detail.flash));
|
|
55
47
|
}
|
|
56
|
-
function
|
|
57
|
-
if (!
|
|
48
|
+
function C() {
|
|
49
|
+
if (!p) try {
|
|
58
50
|
let e = document.querySelector("[data-page]")?.dataset.page;
|
|
59
51
|
return e ? JSON.parse(e).flash : void 0;
|
|
60
52
|
} catch {
|
|
@@ -62,6 +54,6 @@ function w() {
|
|
|
62
54
|
}
|
|
63
55
|
}
|
|
64
56
|
//#endregion
|
|
65
|
-
export {
|
|
57
|
+
export { r as claimToaster, v as createStandaloneContext, _ as createStandaloneRegistry, S as ensureFlashToasts, g as ensureStandaloneRuntime, i as hasToaster, C as initialFlash };
|
|
66
58
|
|
|
67
59
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["isServer","browserTranslator","Translator","browserReady","ensureStandaloneRuntime","reloadOnExpiredPage","installPrefetchInvalidation","createStandaloneRegistry","base","createDefaultRegistry","getStandaloneDefaults","overrides","registry","ComponentRegistry","type","component","createStandaloneContext","translator","ActionRunner","endpoints","notification","resolveRequestErrorNotification","error","key","replacements","fallback","showToast","
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["isServer","browserTranslator","Translator","browserReady","ensureStandaloneRuntime","reloadOnExpiredPage","installPrefetchInvalidation","createStandaloneRegistry","base","createDefaultRegistry","getStandaloneDefaults","overrides","registry","ComponentRegistry","type","component","createStandaloneContext","translator","ActionRunner","endpoints","notification","resolveRequestErrorNotification","error","key","replacements","fallback","showToast","flashTracker","FlashNotificationTracker","flashRegistry","flashListening","ensureFlashToasts","show","flashed","flash","initialFlash","router","event","page","claimToaster","hasToaster"],"sources":["../../src/standalone/runtime.ts"],"mappings":";;;;;;;AAgBA,IAAMA,IAAW,OAAO,SAAW,KAI7BC,IAAoBD,IAAW,OAAO,IAAIE,EAAW,GAEvDC,IAA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E,CAAC;CAE3E;CAGA,AADAY,EAAKG,EAAa,CAAC,GACnBC,EAAO,GAAG,UAAU,MAAUJ,EAAKK,EAAM,OAAO,KAAK,CAAC;AACxD;AAGA,SAAgBF,IAAwB;CACtC,IAAI,IAEJ,IAAI;EACF,IAAMG,IAAO,SAAS,cAA2B,aAAa,CAAC,EAAE,QAAQ;EAEzE,OAAOA,IAAQ,KAAK,MAAMA,CAAI,CAAC,CAAyB,QAAQ,KAAA;CAClE,QAAQ;EACN;CACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster-claims.d.ts","sourceRoot":"","sources":["../../src/standalone/toaster-claims.ts"],"names":[],"mappings":"AAIA,iGAAiG;AACjG,wBAAgB,YAAY,IAAI,MAAM,IAAI,CAMzC;AAED,wBAAgB,UAAU,IAAI,OAAO,CAEpC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/standalone/toaster-claims.ts
|
|
2
|
+
var e = 0;
|
|
3
|
+
function t() {
|
|
4
|
+
return e++, () => {
|
|
5
|
+
e--;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function n() {
|
|
9
|
+
return e > 0;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as claimToaster, n as hasToaster };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=toaster-claims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toaster-claims.js","names":["toasters","claimToaster","hasToaster"],"sources":["../../src/standalone/toaster-claims.ts"],"mappings":";AAEA,IAAIA,IAAW;AAGf,SAAgBC,IAA2B;CAGzC,OAFA,WAEa;EACX;CACF;AACF;AAEA,SAAgBC,IAAsB;CACpC,OAAOF,IAAW;AACpB"}
|
|
@@ -6,9 +6,9 @@ import { type PanelSchema } from '@alfakit/core';
|
|
|
6
6
|
type __VLS_Props = {
|
|
7
7
|
panel: PanelSchema;
|
|
8
8
|
};
|
|
9
|
-
declare var
|
|
9
|
+
declare var __VLS_8: {};
|
|
10
10
|
type __VLS_Slots = {} & {
|
|
11
|
-
default?: (props: typeof
|
|
11
|
+
default?: (props: typeof __VLS_8) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetShell.vue.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/WidgetShell.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WidgetShell.vue.d.ts","sourceRoot":"","sources":["../../../src/starter-kit/widgets/WidgetShell.vue"],"names":[],"mappings":"AAkHA,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,eAAe,CAAA;AAYtB;;;GAGG;AACH,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,CAAC;AAmI1C,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB/C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,33 +1,65 @@
|
|
|
1
1
|
import { provideAlfakit as e, provideStandalone as t } from "../../context.js";
|
|
2
|
-
import n from "../../components/
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
2
|
+
import { setToasterId as n } from "../../components/notifications/flash-toasts.js";
|
|
3
|
+
import r from "../../components/ui/TooltipProvider.js";
|
|
4
|
+
import { claimToaster as i, hasToaster as a } from "../../standalone/toaster-claims.js";
|
|
5
|
+
import { ensureFlashToasts as o } from "../../standalone/runtime.js";
|
|
6
|
+
import s from "../../components/ui/Toaster.js";
|
|
7
|
+
import { widgetsAlfakitContext as c } from "./use-widgets.js";
|
|
8
|
+
import { STARTER_KIT_TOASTER_ID as l, isAlfakitPage as u, overlayPlacementDirection as d, resolveToastPosition as f, starterKitWidgetsPage as p } from "@alfakit/core";
|
|
9
|
+
import { usePage as m } from "@inertiajs/vue3";
|
|
10
|
+
import { Fragment as h, Teleport as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createVNode as x, defineComponent as S, onMounted as C, onUnmounted as w, openBlock as T, ref as E, renderSlot as D, toRef as O, unref as k, watch as A, withCtx as j } from "vue";
|
|
11
|
+
import { ConfigProvider as M } from "reka-ui";
|
|
7
12
|
//#region src/starter-kit/widgets/WidgetShell.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
13
|
+
var N = /*@__PURE__*/ S({
|
|
9
14
|
__name: "WidgetShell",
|
|
10
15
|
props: { panel: {} },
|
|
11
|
-
setup(
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
panel:
|
|
15
|
-
page:
|
|
16
|
-
}),
|
|
17
|
-
|
|
16
|
+
setup(S) {
|
|
17
|
+
let N = S, P = c(), F = _(() => p());
|
|
18
|
+
e(P), t({
|
|
19
|
+
panel: O(N, "panel"),
|
|
20
|
+
page: F
|
|
21
|
+
}), A(() => [N.panel.translations, N.panel.localization?.tag], ([e, t]) => {
|
|
22
|
+
P.translator.setTranslations(e ?? {}), P.translator.setLocale(t ?? "en");
|
|
18
23
|
}, {
|
|
19
24
|
immediate: !0,
|
|
20
25
|
flush: "sync"
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
});
|
|
27
|
+
let I = m(), L = _(() => u(I.props)), R = E(!1), z = _(() => d(N.panel.localization?.direction ?? "ltr", !0)), B = null, V = 0;
|
|
28
|
+
function H() {
|
|
29
|
+
V++, B && (B(), n(void 0)), B = null, R.value = !1;
|
|
30
|
+
}
|
|
31
|
+
function U() {
|
|
32
|
+
if (H(), L.value) return;
|
|
33
|
+
let e = V;
|
|
34
|
+
queueMicrotask(() => {
|
|
35
|
+
e !== V || a() || (B = i(), R.value = !0, n(l), o(P.registry));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return C(() => {
|
|
39
|
+
U(), A(L, U);
|
|
40
|
+
}), w(H), (e, t) => (T(), b(h, null, [x(k(M), { dir: N.panel.localization?.direction ?? "ltr" }, {
|
|
41
|
+
default: j(() => [x(r, { "delay-duration": 0 }, {
|
|
42
|
+
default: j(() => [D(e.$slots, "default")]),
|
|
24
43
|
_: 3
|
|
25
44
|
})]),
|
|
26
45
|
_: 3
|
|
27
|
-
}, 8, ["dir"]))
|
|
46
|
+
}, 8, ["dir"]), R.value ? (T(), v(g, {
|
|
47
|
+
key: 0,
|
|
48
|
+
to: "body"
|
|
49
|
+
}, [x(s, {
|
|
50
|
+
id: k(l),
|
|
51
|
+
position: k(f)(N.panel.toastPosition, z.value),
|
|
52
|
+
dir: z.value,
|
|
53
|
+
"rich-colors": "",
|
|
54
|
+
"close-button": ""
|
|
55
|
+
}, null, 8, [
|
|
56
|
+
"id",
|
|
57
|
+
"position",
|
|
58
|
+
"dir"
|
|
59
|
+
])])) : y("", !0)], 64));
|
|
28
60
|
}
|
|
29
61
|
});
|
|
30
62
|
//#endregion
|
|
31
|
-
export {
|
|
63
|
+
export { N as default };
|
|
32
64
|
|
|
33
65
|
//# sourceMappingURL=WidgetShell.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetShell.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","
|
|
1
|
+
{"version":3,"file":"WidgetShell.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_Fragment","_createVNode","_unref","_withCtx","TooltipProvider","_renderSlot","_createBlock","_Teleport","Toaster","_createCommentVNode","TooltipProvider_default","Toaster_default","WidgetShell_vue_vue_type_script_setup_true_lang_default","props","__props","context","widgetsAlfakitContext","page","computed","starterKitWidgetsPage","provideAlfakit","provideStandalone","toRef","watch","translations","tag","inertiaPage","usePage","alfakitPage","isAlfakitPage","ownsToaster","ref","placement","overlayPlacementDirection","releaseToaster","check","releaseHostToaster","setToasterId","claimHostToaster","current","hasToaster","claimToaster","STARTER_KIT_TOASTER_ID","ensureFlashToasts","onMounted","onUnmounted","openBlock","createElementBlock","Fragment","createVNode","unref","ConfigProvider","withCtx","renderSlot","_ctx","createBlock","Teleport","resolveToastPosition","createCommentVNode"],"sources":["../../../src/starter-kit/widgets/WidgetShell.vue"],"mappings":";;;;;;;;;;;;;;;;EAwBA,IAAMe,IAAQC,GAERC,IAAUC,EAAsB,GAChCC,IAAOC,QAAeC,EAAsB,CAAC;EAKnD,AAHAC,EAAeL,CAAO,GACtBM,EAAkB;GAAE,OAAOC,EAAMT,GAAO,OAAO;GAAG;EAAK,CAAC,GAExDU,QACQ,CAACV,EAAM,MAAM,cAAcA,EAAM,MAAM,cAAc,GAAG,IAC7D,CAACW,GAAcC,OAAS;GAEvB,AADAV,EAAQ,WAAW,gBAAgBS,KAAgB,CAAC,CAAC,GACrDT,EAAQ,WAAW,UAAUU,KAAO,IAAI;EAC1C,GACA;GAAE,WAAW;GAAM,OAAO;EAAO,CACnC;EAQA,IAAMC,IAAcC,EAAQ,GACtBC,IAAcV,QAAeW,EAAcH,EAAY,KAAK,CAAC,GAC7DI,IAAcC,EAAI,EAAK,GACvBC,IAAYd,QAChBe,EAA0BpB,EAAM,MAAM,cAAc,aAAa,OAAO,EAAI,CAC9E,GACIqB,IAAsC,MACtCC,IAAQ;EAEZ,SAASC,IAA2B;GASlC,AARA,KAEIF,MACFA,EAAe,GACfG,EAAa,KAAA,CAAS,IAGxB,IAAiB,MACjB,EAAY,QAAQ;EACtB;EAEA,SAASC,IAAyB;GAGhC,IAFAF,EAAmB,GAEfR,EAAY,OAAO;GAEvB,IAAMW,IAAUJ;GAEhB,qBAAqB;IACnB,AAAII,MAAYJ,KAASK,EAAW,MAEpC,IAAiBC,EAAa,GAC9B,EAAY,QAAQ,IAEpBJ,EAAaK,CAAsB,GACnCC,EAAkB5B,EAAQ,QAAQ;GACpC,CAAC;EACH;SAEA6B,QAAgB;GAEd,AADAN,EAAiB,GACjBf,EAAMK,GAAaU,CAAgB;EACrC,CAAC,GAEDO,EAAYT,CAAkB,cAI5BnC,EAAAA,GAAAA,EAAAA,GAAAA,MAAAA,CAAAA,EAIiBC,EAAAiD,CAAA,GAAA,EAJA,KAAKtC,EAAM,MAAM,cAAc,aAAS,MAAA,GAAA;GACvD,SAAAV,QAEkB,CAFlBF,EAEkBG,GAAA,EAFA,kBAAgB,EAAC,GAAA;IACjC,SAAAD,QAAQ,CAARE,EAAQiD,EAAA,QAAA,SAAA,CAAA,CAAA;;;;EAKI,GAAA,GAAA,CAAA,KAAA,CAAA,GAAAxB,EAAA,SAAhBhC,EAAA,GAAAQ,EAQWC,GAAA;;GARkB,IAAG;EAC9BN,GAAAA,CAAAA,EAMEO,GAAA;GALC,IAAIN,EAAAwC,CAAA;GACJ,UAAUxC,EAAAuD,CAAA,CAAoB,CAAC5C,EAAM,MAAM,eAAemB,EAAA,KAAS;GACnE,KAAKA,EAAA;GACN,eAAA;GACA,gBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfakit/vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Vue 3 + shadcn-vue renderer for Alfakit, the Laravel admin panel builder by Alfa Six.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alfa Six (https://alfasixbh.com)",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"reka-ui": "^2.11.0",
|
|
97
97
|
"tailwind-merge": "^3.7.0",
|
|
98
98
|
"vue-sonner": "^2.0.9",
|
|
99
|
-
"@alfakit/core": "0.1.
|
|
99
|
+
"@alfakit/core": "0.1.13"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"@inertiajs/vue3": "^3.0.0",
|
package/src/AlfakitRoot.vue
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from '@alfakit/core'
|
|
10
10
|
import { usePage } from '@inertiajs/vue3'
|
|
11
11
|
import { ConfigProvider } from 'reka-ui'
|
|
12
|
-
import { computed, watch } from 'vue'
|
|
12
|
+
import { computed, onMounted, onUnmounted, watch } from 'vue'
|
|
13
13
|
import ActionModals from './components/actions/ActionModals.vue'
|
|
14
14
|
import DevToolsSlot from './components/dev-tools/DevToolsSlot.vue'
|
|
15
15
|
import FlashToasts from './components/notifications/FlashToasts.vue'
|
|
@@ -20,6 +20,8 @@ import SchemaContractGuard from './components/panel/SchemaContractGuard.vue'
|
|
|
20
20
|
import Toaster from './components/ui/Toaster.vue'
|
|
21
21
|
import TooltipProvider from './components/ui/TooltipProvider.vue'
|
|
22
22
|
import { useAlfakit } from './context'
|
|
23
|
+
import { startIdScope } from './lib/hydration'
|
|
24
|
+
import { claimToaster } from './standalone/toaster-claims'
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* Persistent layout rendered inside Inertia's page tree, so modals and toasts can read page
|
|
@@ -29,6 +31,9 @@ import { useAlfakit } from './context'
|
|
|
29
31
|
/** Starter kit mode: Alfakit's toaster gets an id so the host's id-less one never doubles its toasts. */
|
|
30
32
|
defineProps<{ toasterId?: string }>()
|
|
31
33
|
|
|
34
|
+
// Reka's ids inside AlfaKit don't depend on the host layout's (W-V2-13).
|
|
35
|
+
startIdScope()
|
|
36
|
+
|
|
32
37
|
const page = usePage<AlfakitPageProps>()
|
|
33
38
|
const { translator, registry } = useAlfakit()
|
|
34
39
|
|
|
@@ -63,6 +68,16 @@ watch(
|
|
|
63
68
|
{ immediate: true },
|
|
64
69
|
)
|
|
65
70
|
watch(panel, (value) => applyPanelTheme(value), { immediate: true })
|
|
71
|
+
|
|
72
|
+
// This root renders the toaster: starter kit header components and standalone components
|
|
73
|
+
// on the same page don't mount a second one.
|
|
74
|
+
let releaseToaster: (() => void) | null = null
|
|
75
|
+
|
|
76
|
+
onMounted(() => {
|
|
77
|
+
releaseToaster = claimToaster()
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
onUnmounted(() => releaseToaster?.())
|
|
66
81
|
</script>
|
|
67
82
|
|
|
68
83
|
<template>
|
|
@@ -56,6 +56,8 @@ const defaultImageStack = computed(() => usesDefaultImageStack(props.component))
|
|
|
56
56
|
:class="
|
|
57
57
|
cn(
|
|
58
58
|
'text-muted-foreground',
|
|
59
|
+
// The last image keeps the stack's negative end margin (W-S3-03).
|
|
60
|
+
props.component.stacked && defaultImageStack && 'ms-3',
|
|
59
61
|
remainingTextSizeClass(props.component.limitedRemainingTextSize),
|
|
60
62
|
)
|
|
61
63
|
"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { BuilderBlockSchema, BuilderItemState, BuilderSchema } from '@alfakit/core'
|
|
3
3
|
import {
|
|
4
|
+
itemExtraActions,
|
|
4
5
|
isDeferredPlaceholder,
|
|
5
6
|
VIRTUAL_ESTIMATES,
|
|
6
7
|
builderItemLabel,
|
|
@@ -360,7 +361,11 @@ const previewIsButton = computed(() => !props.component.interactivePreviews && !
|
|
|
360
361
|
:index="index"
|
|
361
362
|
:count="items.length"
|
|
362
363
|
:resolve="(name: ItemActionName) => resolve(name, index)"
|
|
363
|
-
:extra-actions="
|
|
364
|
+
:extra-actions="
|
|
365
|
+
menu || locked
|
|
366
|
+
? undefined
|
|
367
|
+
: itemExtraActions(props.component, serverItemOf(index))
|
|
368
|
+
"
|
|
364
369
|
:buttons="buttons && !menu"
|
|
365
370
|
:can-clone="canClone(item) && !menu"
|
|
366
371
|
:can-delete="canDelete && !menu"
|
|
@@ -391,7 +396,7 @@ const previewIsButton = computed(() => !props.component.interactivePreviews && !
|
|
|
391
396
|
:can-move-down="buttons && index < items.length - 1"
|
|
392
397
|
:can-clone="canClone(item)"
|
|
393
398
|
:can-delete="canDelete"
|
|
394
|
-
:extra-actions="serverItemOf(index)
|
|
399
|
+
:extra-actions="itemExtraActions(props.component, serverItemOf(index))"
|
|
395
400
|
@action="(name: ItemActionName) => onMenuAction(name, index)"
|
|
396
401
|
@extra="(action: ActionSchema) => onMenuExtra(action, index)"
|
|
397
402
|
/>
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
fieldMemory,
|
|
22
22
|
fileUploadAccept,
|
|
23
23
|
filesFromClipboard,
|
|
24
|
+
fileUploadEntries,
|
|
24
25
|
fileUploadPaths,
|
|
25
26
|
fileManagerSize,
|
|
26
27
|
insertUploadedFile,
|
|
@@ -131,13 +132,7 @@ const releasePreview = (url: string | undefined) => {
|
|
|
131
132
|
|
|
132
133
|
const paths = computed(() => fileUploadPaths(value.value))
|
|
133
134
|
const files = computed<LocalFile[]>(() =>
|
|
134
|
-
paths.value.
|
|
135
|
-
(path) =>
|
|
136
|
-
[...props.component.files, ...uploaded.value].find((file) => file.path === path) ?? {
|
|
137
|
-
path,
|
|
138
|
-
name: path.replace(/^tmp:/, ''),
|
|
139
|
-
},
|
|
140
|
-
),
|
|
135
|
+
fileUploadEntries(paths.value, props.component.files, uploaded.value),
|
|
141
136
|
)
|
|
142
137
|
const maxFiles = computed(() =>
|
|
143
138
|
props.component.multiple ? (props.component.maxFiles ?? Infinity) : 1,
|