@plitzi/sdk-elements 0.38.13 → 0.38.15

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.
@@ -4,16 +4,19 @@ import n from "../DropdownContext.mjs";
4
4
  import { use as r, useImperativeHandle as i } from "react";
5
5
  import { jsx as a } from "react/jsx-runtime";
6
6
  import o from "clsx";
7
+ import { createPortal as s } from "react-dom";
7
8
  //#region src/elements/basic/Dropdown/DropdownPopup/DropdownPopup.tsx
8
- var s = ({ ref: e, className: s = "", children: c }) => {
9
- let { popupRef: l, openPopup: u, parameters: d, onClick: f } = r(n);
10
- return i(e, () => l.current ?? null, [l]), /* @__PURE__ */ a(t, {
11
- ref: l,
12
- className: o("plitzi-component__dropdown-popup", s, { "popup-container--no-visible": !u || !d }),
13
- style: d,
14
- onClick: f,
15
- children: c
9
+ var c = ({ ref: e, className: c = "", children: l }) => {
10
+ let { popupRef: u, openPopup: d, parameters: f, onClick: p, layer: m } = r(n);
11
+ i(e, () => u.current ?? null, [u]);
12
+ let h = /* @__PURE__ */ a(t, {
13
+ ref: u,
14
+ className: o("plitzi-component__dropdown-popup", c, { "popup-container--no-visible": !d || !f }),
15
+ style: f,
16
+ onClick: p,
17
+ children: l
16
18
  });
17
- }, c = e(s);
19
+ return m ? s(h, m) : h;
20
+ }, l = e(c);
18
21
  //#endregion
19
- export { s as DropdownPopup, c as default };
22
+ export { c as DropdownPopup, l as default };
@@ -1,5 +1,7 @@
1
1
  import { MouseEvent, RefObject } from 'react';
2
2
  export type UseDropdownTriggerProps = {
3
+ /** The dropdown's own element, where its trigger is. */
4
+ rootRef?: RefObject<HTMLElement | null>;
3
5
  popupRef: RefObject<HTMLElement | null>;
4
6
  open: boolean;
5
7
  /** Where the popup is drawn; until it is known the popup is hidden, and nothing in it can take the focus. */
@@ -22,5 +24,5 @@ export type UseDropdownTriggerProps = {
22
24
  *
23
25
  * @returns what the dropdown's own click handler calls first, to learn whether a keyboard pressed the trigger.
24
26
  */
25
- declare const useDropdownTrigger: ({ popupRef, open, positioned, enabled }: UseDropdownTriggerProps) => ((event: MouseEvent) => void);
27
+ declare const useDropdownTrigger: ({ rootRef, popupRef, open, positioned, enabled }: UseDropdownTriggerProps) => ((event: MouseEvent) => void);
26
28
  export default useDropdownTrigger;
@@ -1,30 +1,28 @@
1
1
  import { useCallback as e, useEffect as t, useRef as n } from "react";
2
2
  //#region src/elements/basic/Dropdown/useDropdownTrigger.ts
3
- var r = "button, a[href], input, select, textarea, [role=\"button\"]", i = (e) => {
4
- let t = e?.closest(".plitzi-component__dropdown");
5
- return t ? [...t.querySelectorAll(r)].find((t) => !e?.contains(t)) : void 0;
6
- }, a = ({ popupRef: a, open: o, positioned: s, enabled: c }) => {
7
- let l = n(!1), u = n(o), d = e((e) => {
8
- l.current = e.detail === 0;
3
+ var r = "button, a[href], input, select, textarea, [role=\"button\"]", i = (e, t) => e ? [...e.querySelectorAll(r)].find((e) => !t?.contains(e)) : void 0, a = ({ rootRef: a, popupRef: o, open: s, positioned: c, enabled: l }) => {
4
+ let u = n(!1), d = n(s), f = e((e) => {
5
+ u.current = e.detail === 0;
9
6
  }, []);
10
7
  return t(() => {
11
- let e = c ? i(a.current) : void 0;
12
- e && (e.setAttribute("aria-haspopup", "true"), e.setAttribute("aria-expanded", String(o)));
8
+ let e = l ? i(a?.current, o.current) : void 0;
9
+ e && (e.setAttribute("aria-haspopup", "true"), e.setAttribute("aria-expanded", String(s)));
13
10
  }), t(() => {
14
- let e = a.current, t = u.current && !o;
15
- if (u.current = o, c && e) {
11
+ let e = o.current, t = d.current && !s;
12
+ if (d.current = s, l && e) {
16
13
  if (t && e.contains(e.ownerDocument.activeElement)) {
17
- i(e)?.focus({ preventScroll: !0 });
14
+ i(a?.current, e)?.focus({ preventScroll: !0 });
18
15
  return;
19
16
  }
20
- o && s && l.current && !e.contains(e.ownerDocument.activeElement) && (l.current = !1, e.querySelector(r)?.focus({ preventScroll: !0 }));
17
+ s && c && u.current && !e.contains(e.ownerDocument.activeElement) && (u.current = !1, e.querySelector(r)?.focus({ preventScroll: !0 }));
21
18
  }
22
19
  }, [
20
+ l,
21
+ s,
23
22
  c,
24
23
  o,
25
- s,
26
24
  a
27
- ]), d;
25
+ ]), f;
28
26
  };
29
27
  //#endregion
30
28
  export { a as default };
@@ -2,6 +2,7 @@ import { default as BlockHtmlDeclaration } from '../advanced/BlockHtml/declarati
2
2
  import { default as BlockJsxDeclaration } from '../advanced/BlockJsx/declaration';
3
3
  import { default as CustomDeclaration } from '../advanced/Custom/declaration';
4
4
  import { default as NodeHtmlDeclaration } from '../advanced/NodeHtml/declaration';
5
+ import { default as PlitziSdkDeclaration } from '../advanced/PlitziSdk/declaration';
5
6
  import { default as ReferenceDeclaration } from '../advanced/Reference/declaration';
6
7
  import { default as ButtonDeclaration } from '../basic/Button/declaration';
7
8
  import { default as DropdownDeclaration } from '../basic/Dropdown/declaration';
@@ -2955,6 +2956,9 @@ export declare const elementDeclarations: {
2955
2956
  readonly Page: import('@plitzi/sdk-shared/authoring/declare').DeclaredElement<{
2956
2957
  readonly type: "page";
2957
2958
  readonly serverTemplates: readonly ["seoPageTitle", "seoPageDescription", "notFound"];
2959
+ readonly attributeValues: {
2960
+ readonly documentScroll: readonly ["locked", "noBounce"];
2961
+ };
2958
2962
  readonly triggers: {
2959
2963
  readonly onPageLoad: {
2960
2964
  readonly action: "onPageLoad";
@@ -3020,6 +3024,7 @@ export declare const elementDeclarations: {
3020
3024
  seoEnabled?: boolean | undefined;
3021
3025
  seoPageTitle?: string | undefined;
3022
3026
  seoPageDescription?: string | undefined;
3027
+ documentScroll?: (import('../internal/Page/declaration').DocumentScroll | "") | undefined;
3023
3028
  }>>;
3024
3029
  readonly Pagination: import('@plitzi/sdk-shared/authoring/declare').DeclaredElement<{
3025
3030
  readonly type: "pagination";
@@ -3117,6 +3122,30 @@ export declare const elementDeclarations: {
3117
3122
  }, Partial<{
3118
3123
  content?: string | number | undefined;
3119
3124
  }>>;
3125
+ readonly PlitziSdk: import('@plitzi/sdk-shared/authoring/declare').DeclaredElement<{
3126
+ readonly type: "plitziSdk";
3127
+ readonly content: {
3128
+ readonly attributes: {
3129
+ readonly spaceKey: "";
3130
+ readonly environment: "main";
3131
+ };
3132
+ readonly definition: {
3133
+ readonly label: "Plitzi Sdk";
3134
+ readonly description: "Another space drawn inside this one, as a widget — its home page, no router of its own: by its key, or from its documents (`offlineData`), bound to UI generated on the fly.";
3135
+ };
3136
+ readonly market: {
3137
+ readonly category: "advanced";
3138
+ readonly icon: "https://cdn.plitzi.com/resources/img/favicon.svg";
3139
+ };
3140
+ readonly defaultStyle: {
3141
+ readonly style: {
3142
+ readonly base: {
3143
+ readonly default: {};
3144
+ };
3145
+ };
3146
+ };
3147
+ };
3148
+ }, import('../advanced/PlitziSdk/declaration').PlitziSdkAttributes>;
3120
3149
  readonly Reference: import('@plitzi/sdk-shared/authoring/declare').DeclaredElement<{
3121
3150
  readonly type: "reference";
3122
3151
  readonly content: {
@@ -3527,7 +3556,7 @@ export declare const elementDeclarations: {
3527
3556
  }>>;
3528
3557
  };
3529
3558
  export type ElementDeclarationName = keyof typeof elementDeclarations;
3530
- export { ApiContainerDeclaration, BlockHtmlDeclaration, BlockJsxDeclaration, ButtonDeclaration, CarouselDeclaration, CarouselTrackDeclaration, ChannelDeclaration, ContainerDeclaration, CustomDeclaration, DialogContainerDeclaration, DropdownDeclaration, DropdownPopupDeclaration, EmbedDeclaration, FontAwesomeDeclaration, FormControlDeclaration, FormDeclaration, HeadingDeclaration, ImageDeclaration, LayoutContainerDeclaration, LinkDeclaration, ListDeclaration, ListItemDeclaration, LoadingDeclaration, MarkdownDeclaration, ModalContainerDeclaration, NodeHtmlDeclaration, NotFoundDeclaration, PageDeclaration, PaginationDeclaration, ParagraphDeclaration, ReferenceDeclaration, RichTextDeclaration, SvgDeclaration, TabContainerBodyDeclaration, TabContainerDeclaration, TabContainerHeaderDeclaration, TabContainerItemDeclaration, TextDeclaration, ThemeToggleDeclaration, VideoDeclaration };
3559
+ export { ApiContainerDeclaration, BlockHtmlDeclaration, BlockJsxDeclaration, ButtonDeclaration, CarouselDeclaration, CarouselTrackDeclaration, ChannelDeclaration, ContainerDeclaration, CustomDeclaration, DialogContainerDeclaration, DropdownDeclaration, DropdownPopupDeclaration, EmbedDeclaration, FontAwesomeDeclaration, FormControlDeclaration, FormDeclaration, HeadingDeclaration, ImageDeclaration, LayoutContainerDeclaration, LinkDeclaration, ListDeclaration, ListItemDeclaration, LoadingDeclaration, MarkdownDeclaration, ModalContainerDeclaration, NodeHtmlDeclaration, NotFoundDeclaration, PageDeclaration, PaginationDeclaration, ParagraphDeclaration, PlitziSdkDeclaration, ReferenceDeclaration, RichTextDeclaration, SvgDeclaration, TabContainerBodyDeclaration, TabContainerDeclaration, TabContainerHeaderDeclaration, TabContainerItemDeclaration, TextDeclaration, ThemeToggleDeclaration, VideoDeclaration };
3531
3560
  /**
3532
3561
  * Each type's `serverTemplates`, by the type a document names: the attributes the page server evaluates against a
3533
3562
  * context of its own, which the element runtime leaves as written and the authoring lint holds to that context.
@@ -2,84 +2,86 @@ import e from "../advanced/BlockHtml/declaration.mjs";
2
2
  import t from "../advanced/BlockJsx/declaration.mjs";
3
3
  import n from "../advanced/Custom/declaration.mjs";
4
4
  import r from "../advanced/NodeHtml/declaration.mjs";
5
- import i from "../advanced/Reference/declaration.mjs";
6
- import a from "../basic/Button/declaration.mjs";
7
- import o from "../basic/Dropdown/declaration.mjs";
8
- import s from "../basic/Dropdown/DropdownPopup/declaration.mjs";
9
- import c from "../basic/Heading/declaration.mjs";
10
- import l from "../basic/Link/declaration.mjs";
11
- import u from "../basic/Markdown/declaration.mjs";
12
- import d from "../basic/Paragraph/declaration.mjs";
13
- import f from "../basic/RichText/declaration.mjs";
14
- import p from "../basic/Text/declaration.mjs";
15
- import m from "../basic/ThemeToggle/declaration.mjs";
16
- import h from "../form/Form/declaration.mjs";
17
- import g from "../form/FormControl/declaration.mjs";
18
- import _ from "../internal/LayoutContainer/declaration.mjs";
19
- import v from "../internal/Loading/declaration.mjs";
20
- import y from "../internal/NotFound/declaration.mjs";
21
- import b from "../internal/Page/declaration.mjs";
22
- import x from "../media/Embed/declaration.mjs";
23
- import S from "../media/FontAwesome/declaration.mjs";
24
- import C from "../media/Image/declaration.mjs";
25
- import w from "../media/Svg/declaration.mjs";
26
- import T from "../media/Video/declaration.mjs";
27
- import E from "../provider/ApiContainer/declaration.mjs";
28
- import D from "../provider/Channel/declaration.mjs";
29
- import O from "../structure/Carousel/CarouselTrack/declaration.mjs";
30
- import k from "../structure/Carousel/declaration.mjs";
31
- import A from "../structure/Container/declaration.mjs";
32
- import j from "../structure/DialogContainer/declaration.mjs";
33
- import M from "../structure/List/declaration.mjs";
34
- import N from "../structure/List/ListItem/declaration.mjs";
35
- import P from "../structure/ModalContainer/declaration.mjs";
36
- import F from "../structure/Pagination/declaration.mjs";
37
- import I from "../structure/TabContainer/declaration.mjs";
38
- import L from "../structure/TabContainer/TabContainerBody/declaration.mjs";
39
- import R from "../structure/TabContainer/TabContainerHeader/declaration.mjs";
40
- import z from "../structure/TabContainer/TabContainerItem/declaration.mjs";
5
+ import i from "../advanced/PlitziSdk/declaration.mjs";
6
+ import a from "../advanced/Reference/declaration.mjs";
7
+ import o from "../basic/Button/declaration.mjs";
8
+ import s from "../basic/Dropdown/declaration.mjs";
9
+ import c from "../basic/Dropdown/DropdownPopup/declaration.mjs";
10
+ import l from "../basic/Heading/declaration.mjs";
11
+ import u from "../basic/Link/declaration.mjs";
12
+ import d from "../basic/Markdown/declaration.mjs";
13
+ import f from "../basic/Paragraph/declaration.mjs";
14
+ import p from "../basic/RichText/declaration.mjs";
15
+ import m from "../basic/Text/declaration.mjs";
16
+ import h from "../basic/ThemeToggle/declaration.mjs";
17
+ import g from "../form/Form/declaration.mjs";
18
+ import _ from "../form/FormControl/declaration.mjs";
19
+ import v from "../internal/LayoutContainer/declaration.mjs";
20
+ import y from "../internal/Loading/declaration.mjs";
21
+ import b from "../internal/NotFound/declaration.mjs";
22
+ import x from "../internal/Page/declaration.mjs";
23
+ import S from "../media/Embed/declaration.mjs";
24
+ import C from "../media/FontAwesome/declaration.mjs";
25
+ import w from "../media/Image/declaration.mjs";
26
+ import T from "../media/Svg/declaration.mjs";
27
+ import E from "../media/Video/declaration.mjs";
28
+ import D from "../provider/ApiContainer/declaration.mjs";
29
+ import O from "../provider/Channel/declaration.mjs";
30
+ import k from "../structure/Carousel/CarouselTrack/declaration.mjs";
31
+ import A from "../structure/Carousel/declaration.mjs";
32
+ import j from "../structure/Container/declaration.mjs";
33
+ import M from "../structure/DialogContainer/declaration.mjs";
34
+ import N from "../structure/List/declaration.mjs";
35
+ import P from "../structure/List/ListItem/declaration.mjs";
36
+ import F from "../structure/ModalContainer/declaration.mjs";
37
+ import I from "../structure/Pagination/declaration.mjs";
38
+ import L from "../structure/TabContainer/declaration.mjs";
39
+ import R from "../structure/TabContainer/TabContainerBody/declaration.mjs";
40
+ import z from "../structure/TabContainer/TabContainerHeader/declaration.mjs";
41
+ import B from "../structure/TabContainer/TabContainerItem/declaration.mjs";
41
42
  //#region src/elements/declarations/index.ts
42
- var B = {
43
- ApiContainer: E,
43
+ var V = {
44
+ ApiContainer: D,
44
45
  BlockHtml: e,
45
46
  BlockJsx: t,
46
- Button: a,
47
- Carousel: k,
48
- CarouselTrack: O,
49
- Channel: D,
50
- Container: A,
47
+ Button: o,
48
+ Carousel: A,
49
+ CarouselTrack: k,
50
+ Channel: O,
51
+ Container: j,
51
52
  Custom: n,
52
- DialogContainer: j,
53
- Dropdown: o,
54
- DropdownPopup: s,
55
- Embed: x,
56
- FontAwesome: S,
57
- Form: h,
58
- FormControl: g,
59
- Heading: c,
60
- Image: C,
61
- LayoutContainer: _,
62
- Link: l,
63
- List: M,
64
- ListItem: N,
65
- Loading: v,
66
- Markdown: u,
67
- ModalContainer: P,
53
+ DialogContainer: M,
54
+ Dropdown: s,
55
+ DropdownPopup: c,
56
+ Embed: S,
57
+ FontAwesome: C,
58
+ Form: g,
59
+ FormControl: _,
60
+ Heading: l,
61
+ Image: w,
62
+ LayoutContainer: v,
63
+ Link: u,
64
+ List: N,
65
+ ListItem: P,
66
+ Loading: y,
67
+ Markdown: d,
68
+ ModalContainer: F,
68
69
  NodeHtml: r,
69
- NotFound: y,
70
- Page: b,
71
- Pagination: F,
72
- Paragraph: d,
73
- Reference: i,
74
- RichText: f,
75
- Svg: w,
76
- TabContainer: I,
77
- TabContainerBody: L,
78
- TabContainerHeader: R,
79
- TabContainerItem: z,
80
- Text: p,
81
- ThemeToggle: m,
82
- Video: T
83
- }, V = Object.fromEntries(Object.values(B).flatMap((e) => "serverTemplates" in e ? [[e.type, e.serverTemplates]] : []));
70
+ NotFound: b,
71
+ Page: x,
72
+ Pagination: I,
73
+ Paragraph: f,
74
+ PlitziSdk: i,
75
+ Reference: a,
76
+ RichText: p,
77
+ Svg: T,
78
+ TabContainer: L,
79
+ TabContainerBody: R,
80
+ TabContainerHeader: z,
81
+ TabContainerItem: B,
82
+ Text: m,
83
+ ThemeToggle: h,
84
+ Video: E
85
+ }, H = Object.fromEntries(Object.values(V).flatMap((e) => "serverTemplates" in e ? [[e.type, e.serverTemplates]] : []));
84
86
  //#endregion
85
- export { E as ApiContainerDeclaration, e as BlockHtmlDeclaration, t as BlockJsxDeclaration, a as ButtonDeclaration, k as CarouselDeclaration, O as CarouselTrackDeclaration, D as ChannelDeclaration, A as ContainerDeclaration, n as CustomDeclaration, j as DialogContainerDeclaration, o as DropdownDeclaration, s as DropdownPopupDeclaration, x as EmbedDeclaration, S as FontAwesomeDeclaration, g as FormControlDeclaration, h as FormDeclaration, c as HeadingDeclaration, C as ImageDeclaration, _ as LayoutContainerDeclaration, l as LinkDeclaration, M as ListDeclaration, N as ListItemDeclaration, v as LoadingDeclaration, u as MarkdownDeclaration, P as ModalContainerDeclaration, r as NodeHtmlDeclaration, y as NotFoundDeclaration, b as PageDeclaration, F as PaginationDeclaration, d as ParagraphDeclaration, i as ReferenceDeclaration, f as RichTextDeclaration, w as SvgDeclaration, L as TabContainerBodyDeclaration, I as TabContainerDeclaration, R as TabContainerHeaderDeclaration, z as TabContainerItemDeclaration, p as TextDeclaration, m as ThemeToggleDeclaration, T as VideoDeclaration, B as elementDeclarations, V as serverTemplatesByType };
87
+ export { D as ApiContainerDeclaration, e as BlockHtmlDeclaration, t as BlockJsxDeclaration, o as ButtonDeclaration, A as CarouselDeclaration, k as CarouselTrackDeclaration, O as ChannelDeclaration, j as ContainerDeclaration, n as CustomDeclaration, M as DialogContainerDeclaration, s as DropdownDeclaration, c as DropdownPopupDeclaration, S as EmbedDeclaration, C as FontAwesomeDeclaration, _ as FormControlDeclaration, g as FormDeclaration, l as HeadingDeclaration, w as ImageDeclaration, v as LayoutContainerDeclaration, u as LinkDeclaration, N as ListDeclaration, P as ListItemDeclaration, y as LoadingDeclaration, d as MarkdownDeclaration, F as ModalContainerDeclaration, r as NodeHtmlDeclaration, b as NotFoundDeclaration, x as PageDeclaration, I as PaginationDeclaration, f as ParagraphDeclaration, i as PlitziSdkDeclaration, a as ReferenceDeclaration, p as RichTextDeclaration, T as SvgDeclaration, R as TabContainerBodyDeclaration, L as TabContainerDeclaration, z as TabContainerHeaderDeclaration, B as TabContainerItemDeclaration, m as TextDeclaration, h as ThemeToggleDeclaration, E as VideoDeclaration, V as elementDeclarations, H as serverTemplatesByType };
@@ -1,3 +1,4 @@
1
+ import { DocumentScroll } from './declaration';
1
2
  import { ReactNode, RefObject } from 'react';
2
3
  export type PageProps = {
3
4
  ref?: RefObject<HTMLElement>;
@@ -9,12 +10,22 @@ export type PageProps = {
9
10
  * is not there: the page server sends it with status 404, rendered as written. Read there only (`serverTemplates`).
10
11
  */
11
12
  notFound?: string;
13
+ /**
14
+ * How the document this page is drawn in moves. Unset, it scrolls as any page does. `noBounce` keeps the scroll and
15
+ * takes away what a finger pulls past either end — iOS's rubber band, the browser's pull-to-refresh. `locked` holds the
16
+ * document still: a dashboard, a board, a screen that fills the window and scrolls only inside the panels that say so
17
+ * (`overflow: auto` on their own) — on a tablet a finger dragged anywhere else otherwise pulled the whole page.
18
+ *
19
+ * Written onto the document only when the document is the page's own — never onto the one a widget or a space drawn
20
+ * inside another space is embedded in, nor the builder's.
21
+ */
22
+ documentScroll?: DocumentScroll | '';
12
23
  className?: string;
13
24
  layout?: string;
14
25
  layoutContainer?: string;
15
26
  children?: ReactNode;
16
27
  };
17
- declare const Page: ({ ref, seoEnabled, seoPageTitle, seoPageDescription, className, layout, layoutContainer, children }: PageProps) => import('react').JSX.Element;
28
+ declare const Page: ({ ref, seoEnabled, seoPageTitle, seoPageDescription, documentScroll, className, layout, layoutContainer, children }: PageProps) => import('react').JSX.Element;
18
29
  declare const _default: {
19
30
  (props: import('../../../Element/hocs/withElement').WithElementProps<PageProps>): import('react').JSX.Element;
20
31
  displayName: string;
@@ -13,52 +13,59 @@ import { jsx as m, jsxs as h } from "react/jsx-runtime";
13
13
  import g from "clsx";
14
14
  import _ from "@plitzi/sdk-interactions/InteractionsContext";
15
15
  //#region src/elements/internal/Page/Page.tsx
16
- var v = (e) => e.map((e) => ({
16
+ var v = {
17
+ locked: "html,body{height:100%;overflow:hidden;overscroll-behavior:none}",
18
+ noBounce: "html,body{overscroll-behavior:none}"
19
+ }, y = (e) => e.map((e) => ({
17
20
  ...e,
18
21
  plitziElementLayout: {
19
22
  slots: [e.slot],
20
23
  rootId: e.slot,
21
24
  type: "layout"
22
25
  }
23
- })), y = (t, n, r) => t.reduce((t, { layout: r, slot: i, plitziElementLayout: o }) => /* @__PURE__ */ m(e, {
26
+ })), b = (t, n, r) => t.reduce((t, { layout: r, slot: i, plitziElementLayout: o }) => /* @__PURE__ */ m(e, {
24
27
  bodies: { [i]: t },
25
28
  children: /* @__PURE__ */ m(a, { internalProps: {
26
29
  id: r,
27
30
  rootId: n,
28
31
  plitziElementLayout: o
29
32
  } })
30
- }, i), r), b = ({ ref: e, seoEnabled: n = !1, seoPageTitle: a = "Title", seoPageDescription: b = "Description", className: x = "", layout: S = "", layoutContainer: C = "", children: w }) => {
31
- let { id: T } = r(), { settings: { previewMode: E } } = d(), { interactionsManager: D } = c(_), { ownsHead: O } = f(), [[k, A]] = p(["navigation.routeParams", "navigation.queryParams"]), j = o(S, C), M = u(() => v(j), [j]), N = u(() => y(M, T, w), [
32
- M,
33
- T,
34
- w
33
+ }, i), r), x = ({ ref: e, seoEnabled: n = !1, seoPageTitle: a = "Title", seoPageDescription: x = "Description", documentScroll: S = "", className: C = "", layout: w = "", layoutContainer: T = "", children: E }) => {
34
+ let { id: D } = r(), { settings: { previewMode: O } } = d(), { interactionsManager: k } = c(_), { ownsHead: A, renderMode: j } = f(), M = A && j !== "widget", [[N, P]] = p(["navigation.routeParams", "navigation.queryParams"]), F = o(w, T), I = u(() => y(F), [F]), L = u(() => b(I, D, E), [
35
+ I,
36
+ D,
37
+ E
35
38
  ]);
36
39
  return l(() => {
37
40
  let e = !1;
38
41
  return queueMicrotask(() => {
39
- e || D.interactionTrigger(T, "onPageLoad", {
40
- pageId: T,
41
- routeParams: k,
42
- queryParams: A
42
+ e || k.interactionTrigger(D, "onPageLoad", {
43
+ pageId: D,
44
+ routeParams: N,
45
+ queryParams: P
43
46
  });
44
47
  }), () => {
45
48
  e = !0;
46
49
  };
47
50
  }, [
48
- T,
49
51
  D,
50
- A,
51
- k
52
+ k,
53
+ P,
54
+ N
52
55
  ]), /* @__PURE__ */ h(i, {
53
56
  ref: e,
54
- className: g("plitzi-component__page", x),
57
+ className: g("plitzi-component__page", C),
55
58
  interactionTriggers: t.triggers,
56
- children: [n && E && O && /* @__PURE__ */ m(s, {
57
- pageId: T,
58
- title: a,
59
- description: b
60
- }), N]
59
+ children: [
60
+ n && O && A && /* @__PURE__ */ m(s, {
61
+ pageId: D,
62
+ title: a,
63
+ description: x
64
+ }),
65
+ S && M && /* @__PURE__ */ m("style", { children: v[S] }),
66
+ L
67
+ ]
61
68
  });
62
- }, x = n(b);
69
+ }, S = n(x);
63
70
  //#endregion
64
- export { b as Page, x as default };
71
+ export { x as Page, S as default };
@@ -1,3 +1,4 @@
1
+ import { DocumentScroll } from './declaration';
1
2
  type SettingsProps = {
2
3
  id?: string;
3
4
  seoEnabled?: boolean;
@@ -12,7 +13,8 @@ type SettingsProps = {
12
13
  accessLevel?: 'public' | 'authenticated' | '';
13
14
  unauthorizedBehaviour?: '' | 'redirect';
14
15
  unauthorizedPageRedirect?: string;
16
+ documentScroll?: DocumentScroll | '';
15
17
  onUpdate?: (key: string, value: string | boolean | number) => void;
16
18
  };
17
- declare const Settings: ({ id, seoEnabled, enabled, name, folder, seoPageTitle, seoPageDescription, slug, layout, layoutContainer, accessLevel, unauthorizedBehaviour, unauthorizedPageRedirect, onUpdate }: SettingsProps) => import('react').JSX.Element;
19
+ declare const Settings: ({ id, seoEnabled, enabled, name, folder, seoPageTitle, seoPageDescription, slug, layout, layoutContainer, accessLevel, unauthorizedBehaviour, unauthorizedPageRedirect, documentScroll, onUpdate }: SettingsProps) => import('react').JSX.Element;
18
20
  export default Settings;