@plitzi/sdk-elements 0.37.8 → 0.37.9

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.
@@ -1,147 +1,137 @@
1
- import e from "../../../Element/LayoutBody.mjs";
2
- import t from "../../../Element/hocs/withElement.mjs";
3
- import n from "../../../Element/hooks/useElement.mjs";
4
- import { RootElement as r } from "../../../Element/RootElement.mjs";
5
- import i from "../../../Element/PluginManager.mjs";
6
- import { use as a, useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
7
- import d from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
8
- import { useCommonStore as f } from "@plitzi/sdk-shared/store";
9
- import { get as p } from "@plitzi/plitzi-ui/helpers";
10
- import { StoreProvider as m } from "@plitzi/nexus/react";
11
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
- import _ from "clsx";
1
+ import { isVisible as e } from "../../../Element/helpers/isVisible.mjs";
2
+ import t from "../../../Element/LayoutBody.mjs";
3
+ import n from "../../../Element/hooks/useInternalItems.mjs";
4
+ import r from "../../../Element/hocs/withElement.mjs";
5
+ import i from "../../../Element/hooks/useElement.mjs";
6
+ import { RootElement as a } from "../../../Element/RootElement.mjs";
7
+ import o from "../../../Element/PluginManager.mjs";
8
+ import s from "../../../Element/ReplicaProvider.mjs";
9
+ import { useId as c, useMemo as l } from "react";
10
+ import u from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
11
+ import { useCommonStore as d } from "@plitzi/sdk-shared/store";
12
+ import { COMPONENT_PROPS_SOURCE as f } from "@plitzi/sdk-shared/schema/schemaConstants";
13
+ import { StoreProvider as p } from "@plitzi/nexus/react";
14
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
15
+ import g from "clsx";
16
+ import { HIDDEN_CLASS as _ } from "@plitzi/sdk-shared/style/styleStates";
13
17
  //#region src/elements/advanced/Reference/Reference.tsx
14
- var v = ({ ref: t, children: v, className: y = "", referenceType: b = "element", referenceId: x = "", referenceContainer: S = "" }) => {
15
- let { id: C, definition: { rootId: w, styleSelectors: T } } = n(), { settings: { previewMode: E, environment: D }, contexts: { SegmentsContext: O } } = d(), [[k, A]] = f(["schema", "segments"]), { segmentGet: j } = a(O), M = l(k);
16
- M.current = k;
17
- let N = l(A);
18
- N.current = A;
19
- let P = o((e, t) => {
20
- let n, r;
21
- switch (t) {
22
- case "segment": {
23
- let t = p(N.current, e);
24
- if (!t) return;
25
- let i = p(t, "definition.baseElementId");
26
- r = p(t, "schema"), n = p(t, `schema.flat.${i}`);
27
- break;
28
- }
29
- default: n = p(M.current, `flat.${e}`), r = M.current;
30
- }
31
- if (n) return {
32
- element: n,
33
- elementType: p(n, "definition.type"),
34
- referenceContextData: {
35
- schema: r,
36
- prevSchema: M.current
37
- }
38
- };
39
- }, []), [F, I] = u(P(x, b)), L = o(async (e, t) => {
40
- let n = P(e, t);
41
- if (n) {
42
- I(n);
43
- return;
44
- }
45
- let r, i;
46
- switch (t) {
47
- case "segment": {
48
- let t;
49
- if (e && (t = await j(e)), !t) return;
50
- let n = p(t, "definition.baseElementId");
51
- i = p(t, "schema"), r = p(t, `schema.flat.${n}`);
52
- break;
53
- }
54
- default: r = p(M.current, `flat.${e}`), i = M.current;
55
- }
56
- if (!r) {
57
- I(void 0);
58
- return;
18
+ var v = (e, t) => Object.fromEntries(Object.entries(e.props ?? {}).map(([e, n]) => [e, t[e] ?? n.default ?? null])), y = (t, n) => g(t, { [_]: !e(n.visibility) }), b = ({ instance: e, instanceId: t, items: r, plitziElementLayout: i, previewMode: a }) => {
19
+ let o = l(() => ({
20
+ ...e,
21
+ items: r
22
+ }), [e, r]);
23
+ return n({
24
+ id: t,
25
+ definition: o,
26
+ plitziElementLayout: i,
27
+ children: void 0,
28
+ previewMode: a
29
+ });
30
+ }, x = ({ ref: e, className: n, componentId: r, previewMode: u }) => {
31
+ let { id: _, attributes: x, definition: S, plitziElementLayout: C, elementState: w, definition: { styleSelectors: T } } = i(), [E] = d("schema.components"), D = l(() => S.items ?? [], [S.items]), O = l(() => D.map((e) => `schema.flat.${e}.attributes.slot`), [D]), [k] = d(O), A = c(), j = Object.hasOwn(E, r) ? E[r] : void 0, M = l(() => j ? {
32
+ schema: { flat: j.flat },
33
+ runtime: { sources: { [f]: v(j, x) } }
34
+ } : {}, [j, x]), N = l(() => ({
35
+ slots: j?.slots ?? [],
36
+ rootId: _,
37
+ type: "component"
38
+ }), [j?.slots, _]), P = l(() => {
39
+ let e = j?.slots ?? [], t = {};
40
+ for (let n of e) {
41
+ let r = D.filter((t, r) => {
42
+ let i = k[r];
43
+ return (typeof i == "string" ? i : e[0]) === n;
44
+ });
45
+ t[n] = /* @__PURE__ */ m(b, {
46
+ instance: S,
47
+ instanceId: _,
48
+ items: r,
49
+ plitziElementLayout: C,
50
+ previewMode: u
51
+ });
59
52
  }
60
- I({
61
- element: r,
62
- elementType: p(r, "definition.type"),
63
- referenceContextData: {
64
- schema: i,
65
- prevSchema: M.current
66
- }
67
- });
68
- }, [P, j]);
69
- s(() => {
70
- L(x, b);
53
+ return t;
71
54
  }, [
72
- L,
73
- x,
74
- b
75
- ]);
76
- let R = c(() => ({
77
- containerId: S,
78
- type: b,
79
- rootId: C
80
- }), [
55
+ j?.slots,
56
+ D,
57
+ k,
81
58
  S,
82
- b,
83
- C
84
- ]), z = c(() => ({
85
- id: F?.element?.id ?? "",
86
- rootId: w,
87
- className: T.base
59
+ _,
60
+ C,
61
+ u
62
+ ]), F = y(T.base, w), I = l(() => ({
63
+ id: j?.rootId ?? "",
64
+ rootId: _,
65
+ className: F
88
66
  }), [
89
- F?.element?.id,
90
- w,
91
- T.base
92
- ]);
93
- if (!F) return /* @__PURE__ */ h(r, {
94
- ref: t,
95
- className: _("plitzi-component__reference", y, { "reference--build-mode": !E }),
96
- children: !E && /* @__PURE__ */ g("div", {
97
- className: "reference__label",
98
- children: ["Element Reference ", /* @__PURE__ */ h("b", {
99
- className: "capitalize",
100
- children: b
101
- })]
67
+ j?.rootId,
68
+ _,
69
+ F
70
+ ]), L = j ? j.flat[j.rootId] : void 0, R = L && /* @__PURE__ */ m(s, { children: /* @__PURE__ */ m(p, {
71
+ inherit: "live",
72
+ name: `Component:${r}:${_}`,
73
+ segment: A,
74
+ value: M,
75
+ children: /* @__PURE__ */ m(t, {
76
+ bodies: P,
77
+ children: /* @__PURE__ */ m(o, {
78
+ type: L.definition.type,
79
+ internalProps: I,
80
+ plitziElementLayout: N
81
+ }, `${_}_${r}`)
102
82
  })
83
+ }) });
84
+ return u && R ? R : /* @__PURE__ */ h(a, {
85
+ ref: e,
86
+ className: g("plitzi-component__reference", n, { "reference--build-mode": !u }),
87
+ children: [R, !u && !L && /* @__PURE__ */ h("div", {
88
+ className: "reference__label",
89
+ children: [
90
+ "Component ",
91
+ r,
92
+ " not found"
93
+ ]
94
+ })]
103
95
  });
104
- let { element: B, elementType: V, referenceContextData: H } = F;
105
- return E && B && b === "element" ? /* @__PURE__ */ h(m, {
106
- name: `Reference:${C}`,
107
- value: H,
108
- children: /* @__PURE__ */ h(e, {
109
- body: v,
110
- children: /* @__PURE__ */ h(i, {
111
- type: V,
112
- internalProps: z,
113
- plitziElementLayout: R
114
- }, `${C}_${x}`)
115
- })
116
- }) : /* @__PURE__ */ g(r, {
117
- ref: t,
118
- className: _("plitzi-component__reference", y, { "reference--build-mode": !E }),
119
- children: [
120
- /* @__PURE__ */ h(m, {
121
- name: `Reference:${C}`,
122
- value: H,
123
- children: B && /* @__PURE__ */ h(e, {
124
- body: v,
125
- children: /* @__PURE__ */ h(i, {
126
- type: V,
127
- internalProps: z,
128
- plitziElementLayout: R
129
- }, `${C}_${x}`)
130
- })
131
- }),
132
- !E && !B && /* @__PURE__ */ g("div", {
133
- className: "reference__label",
134
- children: ["Element Reference ", b]
135
- }),
136
- E && !B && b === "segment" && /* @__PURE__ */ g("div", { children: [
137
- "Segment ",
138
- /* @__PURE__ */ h("b", { children: x }),
139
- " not found, publish to ",
140
- /* @__PURE__ */ h("b", { children: D }),
141
- " environment"
142
- ] })
143
- ]
96
+ }, S = ({ ref: e, className: t, referenceId: n, previewMode: r }) => {
97
+ let { id: u, elementState: f, definition: { rootId: _, styleSelectors: v } } = i(), [b] = d(`schema.flat.${n}`), x = b, S = c(), C = y(v.base, f), w = l(() => ({
98
+ id: x?.id ?? "",
99
+ rootId: _,
100
+ className: C
101
+ }), [
102
+ x?.id,
103
+ _,
104
+ C
105
+ ]), T = x && /* @__PURE__ */ m(s, { children: /* @__PURE__ */ m(p, {
106
+ inherit: "live",
107
+ name: `Reference:${u}`,
108
+ segment: S,
109
+ children: /* @__PURE__ */ m(o, {
110
+ type: x.definition.type,
111
+ internalProps: w
112
+ }, `${u}_${n}`)
113
+ }) });
114
+ return r && T ? T : /* @__PURE__ */ h(a, {
115
+ ref: e,
116
+ className: g("plitzi-component__reference", t, { "reference--build-mode": !r }),
117
+ children: [T, !r && !x && /* @__PURE__ */ m("div", {
118
+ className: "reference__label",
119
+ children: "Element Reference"
120
+ })]
121
+ });
122
+ }, C = ({ ref: e, className: t = "", referenceType: n = "element", referenceId: r = "" }) => {
123
+ let { settings: { previewMode: i = !0 } } = u();
124
+ return n === "component" ? /* @__PURE__ */ m(x, {
125
+ ref: e,
126
+ className: t,
127
+ componentId: r,
128
+ previewMode: i
129
+ }) : /* @__PURE__ */ m(S, {
130
+ ref: e,
131
+ className: t,
132
+ referenceId: r,
133
+ previewMode: i
144
134
  });
145
- }, y = t(v);
135
+ }, w = r(C);
146
136
  //#endregion
147
- export { v as Reference, y as default };
137
+ export { C as Reference, w as default };
@@ -1,8 +1,9 @@
1
1
  type SettingsProps = {
2
- referenceType?: 'element' | 'segment' | '';
2
+ referenceType?: 'element' | 'component';
3
3
  referenceId?: string;
4
- referenceContainer?: string;
5
- onUpdate?: (key: string, value: string | number | boolean) => void;
4
+ onUpdate?: (key: string, value: string | number | boolean | object) => void;
5
+ /** An instance's props arrive here as the attributes they are. */
6
+ [prop: string]: unknown;
6
7
  };
7
- declare const Settings: ({ referenceType, referenceId, referenceContainer, onUpdate }: SettingsProps) => import('react').JSX.Element;
8
+ declare const Settings: ({ referenceType, referenceId, onUpdate, ...values }: SettingsProps) => import('react').JSX.Element;
8
9
  export default Settings;
@@ -1,96 +1,57 @@
1
- import { use as e, useCallback as t, useMemo as n } from "react";
2
- import r from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
3
- import { useCommonStore as i } from "@plitzi/sdk-shared/store";
4
- import { get as a } from "@plitzi/plitzi-ui/helpers";
5
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
- import c from "@plitzi/plitzi-ui/Select2";
1
+ import e from "./PropField.mjs";
2
+ import { useCallback as t, useMemo as n } from "react";
3
+ import { useCommonStore as r } from "@plitzi/sdk-shared/store";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import o from "@plitzi/plitzi-ui/Select2";
7
6
  //#region src/elements/advanced/Reference/Settings.tsx
8
- var l = ({ referenceType: l = "element", referenceId: u = "", referenceContainer: d = "", onUpdate: f }) => {
9
- let { contexts: { SegmentsContext: p } } = r(), [[m, h]] = i(["schema", "segments"]), { segmentGet: g, segmentsFetch: _ } = e(p), v = t((e) => {
10
- f?.("referenceType", e?.value ?? ""), f?.("referenceId", ""), f?.("referenceContainer", "");
11
- }, [f]), y = t((e) => {
12
- f?.("referenceId", e?.value ?? ""), f?.("referenceContainer", ""), e?.value && l === "segment" && g(e.value);
13
- }, [
14
- f,
15
- l,
16
- g
17
- ]), b = t((e) => f?.("referenceContainer", e?.value ?? ""), [f]), x = n(() => [{
18
- value: "element",
19
- label: "Element"
20
- }, {
21
- value: "segment",
22
- label: "Segment"
23
- }], []), S = n(() => {
24
- switch (l) {
25
- case "segment": return a(h, `${u}.schema`, void 0);
26
- default: return m;
27
- }
28
- }, [
29
- l,
30
- h,
31
- u,
32
- m
33
- ]), C = n(() => {
34
- switch (l) {
35
- case "element": return Object.values(S.flat).reduce((e, t) => [...e, {
36
- value: t.id,
37
- label: a(t, "definition.label")
38
- }], []);
39
- case "segment": return new Promise((e) => {
40
- _().then((t) => {
41
- e(a(t, "edges", []).map((e) => ({
42
- value: e.identifier,
43
- label: a(e, "definition.name", e.id)
44
- })));
45
- });
46
- });
47
- default: return [];
48
- }
49
- }, [
50
- S,
51
- l,
52
- _
53
- ]), w = n(() => {
54
- if (!u) return [];
55
- switch (l) {
56
- case "segment": {
57
- let e = a(h, u), t = a(e, "definition.baseElementId");
58
- return S?.flat ? Object.values(S.flat).filter((e) => a(e, "definition.type", "") === "container" && a(e, "definition.rootId", "") === t && Array.isArray(a(e, "definition.items")) && a(e, "definition.items", []).length === 0).map((e) => ({
59
- value: e.id,
60
- label: a(e, "definition.label")
61
- })) : [];
62
- }
63
- default: return [];
64
- }
65
- }, [
66
- u,
67
- l,
68
- h,
69
- S?.flat
70
- ]);
71
- return /* @__PURE__ */ s("div", {
72
- className: "flex h-full flex-col py-2",
7
+ var s = [{
8
+ value: "element",
9
+ label: "Element"
10
+ }, {
11
+ value: "component",
12
+ label: "Component"
13
+ }], c = ({ component: t, values: n, onUpdate: r }) => /* @__PURE__ */ i("div", {
14
+ className: "flex flex-col gap-2",
15
+ children: Object.entries(t.props ?? {}).map(([t, a]) => /* @__PURE__ */ i(e, {
16
+ name: t,
17
+ prop: a,
18
+ value: n[t],
19
+ onUpdate: r
20
+ }, t))
21
+ }), l = ({ referenceType: e = "element", referenceId: l = "", onUpdate: u, ...d }) => {
22
+ let [[f, p]] = r(["schema.flat", "schema.components"]), m = t((e) => {
23
+ u?.("referenceType", e?.value ?? "element"), u?.("referenceId", "");
24
+ }, [u]), h = t((e) => u?.("referenceId", e?.value ?? ""), [u]), g = n(() => e === "component" ? Object.values(p).map((e) => ({
25
+ value: e.id,
26
+ label: e.label ?? e.id
27
+ })) : Object.values(f).map((e) => ({
28
+ value: e.id,
29
+ label: e.definition.label
30
+ })), [
31
+ e,
32
+ p,
33
+ f
34
+ ]), _ = e === "component" && Object.hasOwn(p, l) ? p[l] : void 0;
35
+ return /* @__PURE__ */ a("div", {
36
+ className: "flex h-full flex-col gap-2 py-2",
73
37
  children: [
74
- /* @__PURE__ */ o(c, {
75
- value: l,
76
- onChange: v,
77
- placeholder: "Search...",
38
+ /* @__PURE__ */ i(o, {
39
+ value: e,
78
40
  label: "Reference Type",
79
- options: x
41
+ onChange: m,
42
+ options: s
80
43
  }),
81
- /* @__PURE__ */ o(c, {
82
- value: u,
83
- label: "Reference ID",
84
- onChange: y,
44
+ /* @__PURE__ */ i(o, {
45
+ value: l,
46
+ label: e === "component" ? "Component" : "Element",
47
+ onChange: h,
85
48
  placeholder: "Search...",
86
- options: C
49
+ options: g
87
50
  }),
88
- l === "segment" && /* @__PURE__ */ o(c, {
89
- value: d,
90
- label: "Reference Container",
91
- placeholder: "None",
92
- onChange: b,
93
- options: w
51
+ _ && /* @__PURE__ */ i(c, {
52
+ component: _,
53
+ values: d,
54
+ onUpdate: u
94
55
  })
95
56
  ]
96
57
  });
@@ -8,12 +8,11 @@ declare const declaration: {
8
8
  readonly attributes: {
9
9
  readonly referenceType: "element";
10
10
  readonly referenceId: "";
11
- readonly referenceContainer: "";
12
11
  };
13
12
  readonly definition: {
14
13
  readonly label: "Reference";
15
14
  readonly type: "reference";
16
- readonly description: "Reuses another element or template by id, rendering it in place.";
15
+ readonly description: "Places one of the components of the space, or renders another of its elements by id, in place.";
17
16
  readonly items: readonly [];
18
17
  readonly bindings: {};
19
18
  readonly styleSelectors: {
@@ -53,8 +52,7 @@ declare const declaration: {
53
52
  readonly settings: {};
54
53
  };
55
54
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
56
- referenceType: import('@plitzi/sdk-shared').ElementLayoutType;
57
55
  referenceId: string;
58
- referenceContainer: string;
56
+ referenceType: "element" | "component";
59
57
  }>>;
60
58
  export default declaration;
@@ -5,13 +5,12 @@ var t = e()({
5
5
  content: {
6
6
  attributes: {
7
7
  referenceType: "element",
8
- referenceId: "",
9
- referenceContainer: ""
8
+ referenceId: ""
10
9
  },
11
10
  definition: {
12
11
  label: "Reference",
13
12
  type: "reference",
14
- description: "Reuses another element or template by id, rendering it in place.",
13
+ description: "Places one of the components of the space, or renders another of its elements by id, in place.",
15
14
  items: [],
16
15
  bindings: {},
17
16
  styleSelectors: { base: "" },
@@ -7,12 +7,11 @@ declare const Reference: {
7
7
  readonly attributes: {
8
8
  readonly referenceType: "element";
9
9
  readonly referenceId: "";
10
- readonly referenceContainer: "";
11
10
  };
12
11
  readonly definition: {
13
12
  readonly label: "Reference";
14
13
  readonly type: "reference";
15
- readonly description: "Reuses another element or template by id, rendering it in place.";
14
+ readonly description: "Places one of the components of the space, or renders another of its elements by id, in place.";
16
15
  readonly items: readonly [];
17
16
  readonly bindings: {};
18
17
  readonly styleSelectors: {
@@ -52,8 +51,7 @@ declare const Reference: {
52
51
  readonly settings: {};
53
52
  };
54
53
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
55
- referenceType: import('@plitzi/sdk-shared').ElementLayoutType;
56
54
  referenceId: string;
57
- referenceContainer: string;
55
+ referenceType: "element" | "component";
58
56
  }>>;
59
57
  export default Reference;
@@ -3109,12 +3109,11 @@ export declare const elementDeclarations: {
3109
3109
  readonly attributes: {
3110
3110
  readonly referenceType: "element";
3111
3111
  readonly referenceId: "";
3112
- readonly referenceContainer: "";
3113
3112
  };
3114
3113
  readonly definition: {
3115
3114
  readonly label: "Reference";
3116
3115
  readonly type: "reference";
3117
- readonly description: "Reuses another element or template by id, rendering it in place.";
3116
+ readonly description: "Places one of the components of the space, or renders another of its elements by id, in place.";
3118
3117
  readonly items: readonly [];
3119
3118
  readonly bindings: {};
3120
3119
  readonly styleSelectors: {
@@ -3154,9 +3153,8 @@ export declare const elementDeclarations: {
3154
3153
  readonly settings: {};
3155
3154
  };
3156
3155
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
3157
- referenceType: import('@plitzi/sdk-shared').ElementLayoutType;
3158
3156
  referenceId: string;
3159
- referenceContainer: string;
3157
+ referenceType: "element" | "component";
3160
3158
  }>>;
3161
3159
  readonly RichText: {
3162
3160
  readonly type: "richText";
@@ -7,56 +7,56 @@ import a from "./declaration.mjs";
7
7
  import o from "../../../Element/hooks/useLayoutChain.mjs";
8
8
  import { use as s, useEffect as c, useMemo as l } from "react";
9
9
  import u from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
10
- import { useSdkStore as d } from "@plitzi/sdk-shared/store";
11
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
12
- import m from "clsx";
13
- import { Helmet as h } from "@dr.pogodin/react-helmet";
10
+ import { useRenderSettings as d, useSdkStore as f } from "@plitzi/sdk-shared/store";
11
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
+ import h from "clsx";
13
+ import { Helmet as g } from "@dr.pogodin/react-helmet";
14
14
  //#region src/elements/internal/Page/Page.tsx
15
- var g = (e) => e.map((e) => ({
15
+ var _ = (e) => e.map((e) => ({
16
16
  ...e,
17
17
  plitziElementLayout: {
18
- containerId: e.slot,
18
+ slots: [e.slot],
19
19
  rootId: e.slot,
20
20
  type: "layout"
21
21
  }
22
- })), _ = (t, n, r) => t.reduce((t, { layout: r, slot: a, plitziElementLayout: o }) => /* @__PURE__ */ f(e, {
23
- body: t,
24
- children: /* @__PURE__ */ f(i, { internalProps: {
22
+ })), v = (t, n, r) => t.reduce((t, { layout: r, slot: a, plitziElementLayout: o }) => /* @__PURE__ */ p(e, {
23
+ bodies: { [a]: t },
24
+ children: /* @__PURE__ */ p(i, { internalProps: {
25
25
  id: r,
26
26
  rootId: n,
27
27
  plitziElementLayout: o
28
28
  } })
29
- }, a), r), v = ({ ref: e, seoEnabled: t = !1, seoPageTitle: i = "Title", seoPageDescription: v = "Description", className: y = "", layout: b = "", layoutContainer: x = "", children: S }) => {
30
- let { id: C } = n(), { settings: { previewMode: w }, contexts: { InteractionsContext: T } } = u(), { interactionsManager: E } = s(T), [[D, O]] = d(["navigation.routeParams", "navigation.queryParams"]), k = o(b, x), A = l(() => g(k), [k]), j = l(() => _(A, C, S), [
31
- A,
32
- C,
33
- S
29
+ }, a), r), y = ({ ref: e, seoEnabled: t = !1, seoPageTitle: i = "Title", seoPageDescription: y = "Description", className: b = "", layout: x = "", layoutContainer: S = "", children: C }) => {
30
+ let { id: w } = n(), { settings: { previewMode: T }, contexts: { InteractionsContext: E } } = u(), { interactionsManager: D } = s(E), { ownsHead: O } = d(), [[k, A]] = f(["navigation.routeParams", "navigation.queryParams"]), j = o(x, S), M = l(() => _(j), [j]), N = l(() => v(M, w, C), [
31
+ M,
32
+ w,
33
+ C
34
34
  ]);
35
35
  return c(() => {
36
36
  let e = !1;
37
37
  return queueMicrotask(() => {
38
- e || E.interactionTrigger(C, "onPageLoad", {
39
- pageId: C,
40
- routeParams: D,
41
- queryParams: O
38
+ e || D.interactionTrigger(w, "onPageLoad", {
39
+ pageId: w,
40
+ routeParams: k,
41
+ queryParams: A
42
42
  });
43
43
  }), () => {
44
44
  e = !0;
45
45
  };
46
46
  }, [
47
- C,
48
- E,
49
- O,
50
- D
51
- ]), /* @__PURE__ */ p(r, {
47
+ w,
48
+ D,
49
+ A,
50
+ k
51
+ ]), /* @__PURE__ */ m(r, {
52
52
  ref: e,
53
- className: m("plitzi-component__page", y),
53
+ className: h("plitzi-component__page", b),
54
54
  interactionTriggers: a.triggers,
55
- children: [t && w && /* @__PURE__ */ p(h, { children: [!!i && /* @__PURE__ */ f("title", { children: i }), !!v && /* @__PURE__ */ f("meta", {
55
+ children: [t && T && O && /* @__PURE__ */ m(g, { children: [!!i && /* @__PURE__ */ p("title", { children: i }), !!y && /* @__PURE__ */ p("meta", {
56
56
  name: "description",
57
- content: v
58
- })] }), j]
57
+ content: y
58
+ })] }), N]
59
59
  });
60
- }, y = t(v);
60
+ }, b = t(y);
61
61
  //#endregion
62
- export { v as Page, y as default };
62
+ export { y as Page, b as default };