@plitzi/sdk-elements 0.38.23 → 0.39.0
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 +180 -1
- package/dist/Element/RootElement.d.ts +1 -1
- package/dist/Element/RootElement.mjs +62 -61
- package/dist/Element/RowAnchor.d.ts +15 -0
- package/dist/Element/RowAnchor.mjs +8 -0
- package/dist/Element/helpers/elementConstants.mjs +12 -0
- package/dist/Element/hocs/withElement.d.ts +1 -1
- package/dist/Element/hocs/withElement.mjs +96 -88
- package/dist/Element/hooks/useEditableContent.d.ts +11 -0
- package/dist/Element/hooks/useEditableContent.mjs +11 -10
- package/dist/Element/hooks/useElement.mjs +1 -1
- package/dist/Element/hooks/useElementDataSource.mjs +11 -10
- package/dist/Element/hooks/useFocusInteractions.d.ts +12 -0
- package/dist/Element/hooks/useFocusInteractions.mjs +9 -0
- package/dist/Element/hooks/useInternalClassName.mjs +22 -21
- package/dist/Element/hooks/useRootElementInteractions.mjs +48 -42
- package/dist/Element/hooks/useScrollInteractions.d.ts +1 -1
- package/dist/Element/hooks/useScrollInteractions.mjs +61 -30
- package/dist/dataSource/PluginSource.d.ts +22 -0
- package/dist/dataSource/PluginSource.mjs +27 -0
- package/dist/dataSource/index.d.ts +2 -0
- package/dist/dataSource/index.mjs +5 -4
- package/dist/elements/advanced/BlockHtml/BlockHtml.d.ts +1 -1
- package/dist/elements/advanced/BlockHtml/index.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/BlockJsx.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/index.d.ts +1 -1
- package/dist/elements/advanced/Custom/Custom.d.ts +1 -1
- package/dist/elements/advanced/Custom/index.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/NodeHtml.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/declaration.d.ts +3 -3
- package/dist/elements/advanced/NodeHtml/index.d.ts +4 -4
- package/dist/elements/advanced/Reference/Reference.d.ts +2 -2
- package/dist/elements/advanced/Reference/Reference.mjs +1 -1
- package/dist/elements/advanced/Reference/index.d.ts +1 -1
- package/dist/elements/basic/Button/Button.d.ts +7 -2
- package/dist/elements/basic/Button/Button.mjs +27 -25
- package/dist/elements/basic/Button/Settings.mjs +1 -1
- package/dist/elements/basic/Button/declaration.d.ts +8 -1
- package/dist/elements/basic/Button/declaration.mjs +3 -0
- package/dist/elements/basic/Button/index.d.ts +9 -2
- package/dist/elements/basic/Dropdown/Dropdown.d.ts +9 -2
- package/dist/elements/basic/Dropdown/Dropdown.mjs +93 -74
- package/dist/elements/basic/Dropdown/DropdownPopup/DropdownPopup.d.ts +1 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +1 -1
- package/dist/elements/basic/Dropdown/declaration.d.ts +31 -0
- package/dist/elements/basic/Dropdown/declaration.mjs +38 -6
- package/dist/elements/basic/Dropdown/index.d.ts +33 -2
- package/dist/elements/basic/Dropdown/useDropdown.d.ts +2 -0
- package/dist/elements/basic/Heading/Heading.d.ts +1 -1
- package/dist/elements/basic/Heading/Heading.mjs +3 -2
- package/dist/elements/basic/Heading/declaration.d.ts +2 -0
- package/dist/elements/basic/Heading/declaration.mjs +2 -0
- package/dist/elements/basic/Heading/index.d.ts +3 -1
- package/dist/elements/basic/Link/Link.d.ts +1 -1
- package/dist/elements/basic/Link/Link.mjs +46 -45
- package/dist/elements/basic/Link/declaration.d.ts +1 -0
- package/dist/elements/basic/Link/declaration.mjs +5 -0
- package/dist/elements/basic/Link/index.d.ts +2 -1
- package/dist/elements/basic/Markdown/Markdown.d.ts +1 -1
- package/dist/elements/basic/Markdown/declaration.d.ts +2 -0
- package/dist/elements/basic/Markdown/declaration.mjs +2 -0
- package/dist/elements/basic/Markdown/index.d.ts +3 -1
- package/dist/elements/basic/Paragraph/Paragraph.d.ts +1 -1
- package/dist/elements/basic/Paragraph/Paragraph.mjs +3 -2
- package/dist/elements/basic/Paragraph/Settings.mjs +1 -1
- package/dist/elements/basic/Paragraph/declaration.d.ts +2 -0
- package/dist/elements/basic/Paragraph/declaration.mjs +2 -0
- package/dist/elements/basic/Paragraph/index.d.ts +3 -1
- package/dist/elements/basic/RichText/RichText.d.ts +1 -1
- package/dist/elements/basic/RichText/declaration.d.ts +1 -0
- package/dist/elements/basic/RichText/declaration.mjs +1 -0
- package/dist/elements/basic/RichText/index.d.ts +2 -1
- package/dist/elements/basic/Text/Settings.mjs +1 -1
- package/dist/elements/basic/Text/Text.d.ts +1 -1
- package/dist/elements/basic/Text/Text.mjs +3 -2
- package/dist/elements/basic/Text/declaration.d.ts +2 -0
- package/dist/elements/basic/Text/declaration.mjs +2 -0
- package/dist/elements/basic/Text/index.d.ts +3 -1
- package/dist/elements/basic/ThemeToggle/ThemeToggle.d.ts +2 -2
- package/dist/elements/basic/ThemeToggle/declaration.d.ts +1 -0
- package/dist/elements/basic/ThemeToggle/declaration.mjs +5 -0
- package/dist/elements/basic/ThemeToggle/index.d.ts +2 -1
- package/dist/elements/declarations/index.d.ts +322 -12
- package/dist/elements/declarations/index.mjs +46 -44
- package/dist/elements/form/Form/Form.d.ts +8 -2
- package/dist/elements/form/Form/Form.mjs +102 -79
- package/dist/elements/form/Form/declaration.d.ts +21 -3
- package/dist/elements/form/Form/declaration.mjs +28 -11
- package/dist/elements/form/Form/index.d.ts +17 -2
- package/dist/elements/form/FormControl/FormControl.d.ts +8 -2
- package/dist/elements/form/FormControl/FormControl.mjs +71 -66
- package/dist/elements/form/FormControl/Settings.d.ts +6 -1
- package/dist/elements/form/FormControl/Settings.mjs +130 -98
- package/dist/elements/form/FormControl/declaration.d.ts +7 -0
- package/dist/elements/form/FormControl/declaration.mjs +21 -1
- package/dist/elements/form/FormControl/helpers/useBlurValidation.d.ts +12 -0
- package/dist/elements/form/FormControl/helpers/useBlurValidation.mjs +20 -0
- package/dist/elements/form/FormControl/helpers/validateField.d.ts +8 -0
- package/dist/elements/form/FormControl/helpers/validateField.mjs +8 -2
- package/dist/elements/form/FormControl/hocs/withFieldValue.d.ts +4 -0
- package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +49 -41
- package/dist/elements/form/FormControl/index.d.ts +8 -1
- package/dist/elements/form/FormControl/inputs/Checkbox.mjs +2 -2
- package/dist/elements/form/FormControl/inputs/Input.d.ts +5 -1
- package/dist/elements/form/FormControl/inputs/Input.mjs +42 -38
- package/dist/elements/form/FormControl/inputs/Select.d.ts +5 -1
- package/dist/elements/form/FormControl/inputs/Select.mjs +33 -28
- package/dist/elements/form/FormControl/inputs/Textarea.mjs +27 -26
- package/dist/elements/form/FormControl/inputs/useFocusWhenShown.d.ts +1 -1
- package/dist/elements/index.d.ts +3 -1
- package/dist/elements/index.mjs +32 -30
- package/dist/elements/internal/LayoutContainer/LayoutContainer.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/LayoutContainer.mjs +30 -30
- package/dist/elements/internal/LayoutContainer/index.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/mask.d.ts +13 -0
- package/dist/elements/internal/LayoutContainer/mask.mjs +16 -1
- package/dist/elements/internal/Loading/Loading.d.ts +1 -1
- package/dist/elements/internal/Loading/index.d.ts +1 -1
- package/dist/elements/internal/NotFound/NotFound.d.ts +1 -1
- package/dist/elements/internal/NotFound/index.d.ts +1 -1
- package/dist/elements/internal/Page/Page.d.ts +17 -3
- package/dist/elements/internal/Page/Page.mjs +32 -25
- package/dist/elements/internal/Page/PageHead.d.ts +11 -4
- package/dist/elements/internal/Page/PageHead.mjs +41 -19
- package/dist/elements/internal/Page/PageWithheld.d.ts +3 -2
- package/dist/elements/internal/Page/PageWithheld.mjs +41 -18
- package/dist/elements/internal/Page/Settings.d.ts +5 -1
- package/dist/elements/internal/Page/Settings.mjs +160 -121
- package/dist/elements/internal/Page/SharePreview.d.ts +13 -0
- package/dist/elements/internal/Page/SharePreview.mjs +53 -0
- package/dist/elements/internal/Page/declaration.d.ts +9 -1
- package/dist/elements/internal/Page/declaration.mjs +11 -4
- package/dist/elements/internal/Page/index.d.ts +9 -2
- package/dist/elements/media/Chart/Chart.d.ts +33 -0
- package/dist/elements/media/Chart/Chart.mjs +195 -0
- package/dist/elements/media/Chart/Settings.d.ts +6 -0
- package/dist/elements/media/Chart/Settings.mjs +92 -0
- package/dist/elements/media/Chart/chartGeometry.d.ts +37 -0
- package/dist/elements/media/Chart/chartGeometry.mjs +47 -0
- package/dist/elements/media/Chart/declaration.d.ts +144 -0
- package/dist/elements/media/Chart/declaration.mjs +107 -0
- package/dist/elements/media/Chart/index.d.ts +145 -0
- package/dist/elements/media/Chart/index.mjs +6 -0
- package/dist/elements/media/Embed/Embed.d.ts +1 -1
- package/dist/elements/media/Embed/Embed.mjs +25 -21
- package/dist/elements/media/Embed/declaration.d.ts +1 -0
- package/dist/elements/media/Embed/declaration.mjs +1 -0
- package/dist/elements/media/Embed/index.d.ts +2 -1
- package/dist/elements/media/FontAwesome/FontAwesome.d.ts +1 -1
- package/dist/elements/media/FontAwesome/index.d.ts +1 -1
- package/dist/elements/media/Image/Image.d.ts +1 -1
- package/dist/elements/media/Image/Image.mjs +35 -34
- package/dist/elements/media/Image/declaration.d.ts +2 -1
- package/dist/elements/media/Image/declaration.mjs +1 -0
- package/dist/elements/media/Image/index.d.ts +3 -2
- package/dist/elements/media/Svg/Svg.d.ts +1 -1
- package/dist/elements/media/Svg/declaration.d.ts +1 -0
- package/dist/elements/media/Svg/declaration.mjs +1 -0
- package/dist/elements/media/Svg/index.d.ts +2 -1
- package/dist/elements/media/Video/Video.d.ts +1 -1
- package/dist/elements/media/Video/declaration.d.ts +1 -0
- package/dist/elements/media/Video/declaration.mjs +1 -0
- package/dist/elements/media/Video/index.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +1 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +215 -185
- package/dist/elements/provider/ApiContainer/declaration.d.ts +9 -0
- package/dist/elements/provider/ApiContainer/declaration.mjs +10 -1
- package/dist/elements/provider/ApiContainer/hooks/useInputRefresh.d.ts +4 -4
- package/dist/elements/provider/ApiContainer/hooks/useProviderPagination.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/index.d.ts +10 -1
- package/dist/elements/provider/Channel/Channel.d.ts +1 -1
- package/dist/elements/provider/Channel/declaration.d.ts +9 -0
- package/dist/elements/provider/Channel/declaration.mjs +11 -2
- package/dist/elements/provider/Channel/index.d.ts +10 -1
- package/dist/elements/settings.mjs +42 -40
- package/dist/elements/structure/Carousel/Carousel.d.ts +1 -1
- package/dist/elements/structure/Carousel/Carousel.mjs +147 -130
- package/dist/elements/structure/Carousel/CarouselContext.d.ts +3 -3
- package/dist/elements/structure/Carousel/CarouselTrack/CarouselTrack.d.ts +1 -1
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.d.ts +6 -2
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.mjs +32 -20
- package/dist/elements/structure/Carousel/CarouselTrack/index.d.ts +1 -1
- package/dist/elements/structure/Carousel/carouselIndex.d.ts +17 -0
- package/dist/elements/structure/Carousel/carouselIndex.mjs +17 -5
- package/dist/elements/structure/Carousel/declaration.d.ts +49 -2
- package/dist/elements/structure/Carousel/declaration.mjs +26 -4
- package/dist/elements/structure/Carousel/index.d.ts +51 -4
- package/dist/elements/structure/Container/Container.d.ts +5 -3
- package/dist/elements/structure/Container/Container.mjs +6 -5
- package/dist/elements/structure/Container/Settings.d.ts +4 -2
- package/dist/elements/structure/Container/Settings.mjs +19 -5
- package/dist/elements/structure/Container/declaration.d.ts +3 -2
- package/dist/elements/structure/Container/declaration.mjs +3 -1
- package/dist/elements/structure/Container/index.d.ts +4 -3
- package/dist/elements/structure/DialogContainer/DialogContainer.d.ts +1 -1
- package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -0
- package/dist/elements/structure/DialogContainer/declaration.mjs +5 -0
- package/dist/elements/structure/DialogContainer/index.d.ts +2 -1
- package/dist/elements/structure/List/List.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/ListItem.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/index.d.ts +1 -1
- package/dist/elements/structure/List/declaration.d.ts +5 -0
- package/dist/elements/structure/List/declaration.mjs +5 -0
- package/dist/elements/structure/List/index.d.ts +7 -2
- package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +1 -0
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.d.ts +3 -1
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.mjs +33 -25
- package/dist/elements/structure/ModalContainer/ModalContainer.d.ts +1 -1
- package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -0
- package/dist/elements/structure/ModalContainer/declaration.mjs +2 -0
- package/dist/elements/structure/ModalContainer/index.d.ts +3 -1
- package/dist/elements/structure/Pagination/Pagination.d.ts +1 -1
- package/dist/elements/structure/Pagination/declaration.d.ts +1 -0
- package/dist/elements/structure/Pagination/declaration.mjs +5 -0
- package/dist/elements/structure/Pagination/index.d.ts +2 -1
- package/dist/elements/structure/TabContainer/TabContainer.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.d.ts +6 -0
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.mjs +6 -0
- package/dist/elements/structure/TabContainer/TabContainerItem/index.d.ts +7 -1
- package/dist/elements/structure/TabContainer/index.d.ts +10 -4
- package/dist/index.d.ts +216 -51
- package/dist/index.mjs +39 -37
- package/package.json +8 -8
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.d.ts +0 -16
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.mjs +0 -4
package/dist/elements/index.mjs
CHANGED
|
@@ -19,56 +19,58 @@ import _ from "./internal/LayoutContainer/index.mjs";
|
|
|
19
19
|
import v from "./internal/Loading/index.mjs";
|
|
20
20
|
import { NotFound as y } from "./internal/NotFound/index.mjs";
|
|
21
21
|
import b from "./internal/Page/index.mjs";
|
|
22
|
-
import x from "./media/
|
|
23
|
-
import S from "./media/
|
|
24
|
-
import C from "./media/
|
|
25
|
-
import w from "./media/
|
|
26
|
-
import T from "./media/
|
|
27
|
-
import E from "./
|
|
28
|
-
import D from "./provider/
|
|
29
|
-
import O from "./
|
|
30
|
-
import k from "./structure/
|
|
31
|
-
import A from "./structure/
|
|
32
|
-
import j from "./structure/
|
|
33
|
-
import M from "./structure/
|
|
34
|
-
import N from "./structure/
|
|
35
|
-
import P from "./structure/
|
|
22
|
+
import x from "./media/Chart/index.mjs";
|
|
23
|
+
import S from "./media/Embed/index.mjs";
|
|
24
|
+
import C from "./media/FontAwesome/index.mjs";
|
|
25
|
+
import w from "./media/Image/index.mjs";
|
|
26
|
+
import T from "./media/Svg/index.mjs";
|
|
27
|
+
import E from "./media/Video/index.mjs";
|
|
28
|
+
import D from "./provider/ApiContainer/index.mjs";
|
|
29
|
+
import O from "./provider/Channel/index.mjs";
|
|
30
|
+
import k from "./structure/Carousel/index.mjs";
|
|
31
|
+
import A from "./structure/Container/index.mjs";
|
|
32
|
+
import j from "./structure/DialogContainer/index.mjs";
|
|
33
|
+
import M from "./structure/List/index.mjs";
|
|
34
|
+
import N from "./structure/ModalContainer/index.mjs";
|
|
35
|
+
import P from "./structure/Pagination/index.mjs";
|
|
36
|
+
import F from "./structure/TabContainer/index.mjs";
|
|
36
37
|
//#region src/elements/index.ts
|
|
37
|
-
var
|
|
38
|
-
ApiContainer: () =>
|
|
38
|
+
var I = /* @__PURE__ */ e({
|
|
39
|
+
ApiContainer: () => D,
|
|
39
40
|
BlockHtml: () => t,
|
|
40
41
|
BlockJsx: () => n,
|
|
41
42
|
Button: () => o,
|
|
42
|
-
Carousel: () =>
|
|
43
|
-
Channel: () =>
|
|
44
|
-
|
|
43
|
+
Carousel: () => k,
|
|
44
|
+
Channel: () => O,
|
|
45
|
+
Chart: () => x,
|
|
46
|
+
Container: () => A,
|
|
45
47
|
Custom: () => r,
|
|
46
|
-
DialogContainer: () =>
|
|
48
|
+
DialogContainer: () => j,
|
|
47
49
|
Dropdown: () => s,
|
|
48
|
-
Embed: () =>
|
|
49
|
-
FontAwesome: () =>
|
|
50
|
+
Embed: () => S,
|
|
51
|
+
FontAwesome: () => C,
|
|
50
52
|
Form: () => h,
|
|
51
53
|
FormControl: () => g,
|
|
52
54
|
Heading: () => c,
|
|
53
|
-
Image: () =>
|
|
55
|
+
Image: () => w,
|
|
54
56
|
LayoutContainer: () => _,
|
|
55
57
|
Link: () => l,
|
|
56
|
-
List: () =>
|
|
58
|
+
List: () => M,
|
|
57
59
|
Loading: () => v,
|
|
58
60
|
Markdown: () => u,
|
|
59
|
-
ModalContainer: () =>
|
|
61
|
+
ModalContainer: () => N,
|
|
60
62
|
NodeHtml: () => i,
|
|
61
63
|
NotFound: () => y,
|
|
62
64
|
Page: () => b,
|
|
63
|
-
Pagination: () =>
|
|
65
|
+
Pagination: () => P,
|
|
64
66
|
Paragraph: () => d,
|
|
65
67
|
Reference: () => a,
|
|
66
68
|
RichText: () => f,
|
|
67
|
-
Svg: () =>
|
|
68
|
-
TabContainer: () =>
|
|
69
|
+
Svg: () => T,
|
|
70
|
+
TabContainer: () => F,
|
|
69
71
|
Text: () => p,
|
|
70
72
|
ThemeToggle: () => m,
|
|
71
|
-
Video: () =>
|
|
73
|
+
Video: () => E
|
|
72
74
|
});
|
|
73
75
|
//#endregion
|
|
74
|
-
export {
|
|
76
|
+
export { D as ApiContainer, t as BlockHtml, n as BlockJsx, o as Button, k as Carousel, O as Channel, x as Chart, A as Container, r as Custom, j as DialogContainer, s as Dropdown, S as Embed, C as FontAwesome, h as Form, g as FormControl, c as Heading, w as Image, _ as LayoutContainer, l as Link, M as List, v as Loading, u as Markdown, N as ModalContainer, i as NodeHtml, y as NotFound, b as Page, P as Pagination, d as Paragraph, a as Reference, f as RichText, T as Svg, F as TabContainer, p as Text, m as ThemeToggle, E as Video, I as elements_exports };
|
|
@@ -13,7 +13,7 @@ export type LayoutContainerProps = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const LayoutContainer: ({ ref, className, children, subType }: LayoutContainerProps) => import('react').JSX.Element;
|
|
15
15
|
declare const _default: {
|
|
16
|
-
(props: import('../../..').WithElementProps<LayoutContainerProps>): import('react').JSX.Element;
|
|
16
|
+
(props: import('../../..').WithElementProps<LayoutContainerProps>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
export default _default;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e from "../../../Element/hocs/withElement.mjs";
|
|
2
2
|
import t from "../../../Element/hooks/useElement.mjs";
|
|
3
3
|
import { RootElement as n } from "../../../Element/RootElement.mjs";
|
|
4
|
-
import { boxOf as r,
|
|
5
|
-
import { useCallback as
|
|
6
|
-
import { usePlitzi as
|
|
7
|
-
import { throttle as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import
|
|
4
|
+
import { boxOf as r, chromeSides as i, maskFrameOf as a } from "./mask.mjs";
|
|
5
|
+
import { useCallback as o, useEffect as s } from "react";
|
|
6
|
+
import { usePlitzi as c } from "@plitzi/sdk-shared/hooks";
|
|
7
|
+
import { throttle as l } from "@plitzi/plitzi-ui/helpers";
|
|
8
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
9
|
+
import d from "clsx";
|
|
10
10
|
//#region src/elements/internal/LayoutContainer/LayoutContainer.tsx
|
|
11
|
-
var
|
|
12
|
-
let { plitziElementLayout:
|
|
11
|
+
var f = ".plitzi-component__layout-container", p = ".plitzi-component--layout-body", m = (e) => [...e.querySelectorAll(p)].find((e) => !e.querySelector(p)) ?? null, h = ({ ref: e, className: p = "", children: h, subType: g = "div" }) => {
|
|
12
|
+
let { plitziElementLayout: _ } = t(), { settings: { previewMode: v } } = c(), y = o((e, t) => {
|
|
13
13
|
if (!e) return;
|
|
14
14
|
if (!t) {
|
|
15
15
|
e.style.removeProperty("--child-clip");
|
|
@@ -20,44 +20,44 @@ var d = ".plitzi-component__layout-container", f = ".plitzi-component--layout-bo
|
|
|
20
20
|
e.style.removeProperty("--child-clip");
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
let
|
|
23
|
+
let o = a(e), s = o.getBoundingClientRect(), c = o.offsetWidth > 0 ? s.width / o.offsetWidth : 1, l = (n.top - s.top) / c - o.clientTop, u = (n.left - s.left) / c - o.clientLeft, d = i(e, t, n), f = d.above ? `${String(l)}px` : "0", p = d.left ? `${String(u)}px` : "0", m = d.right ? `${String(u + n.width / c)}px` : "100%", h = d.below ? `${String(l + n.height / c)}px` : "100%", g = `
|
|
24
24
|
polygon(
|
|
25
25
|
evenodd,
|
|
26
26
|
/* outer rect */
|
|
27
27
|
0 0, 100% 0, 100% 100%, 0% 100%, 0 0,
|
|
28
|
-
/* inner rect */
|
|
29
|
-
${
|
|
28
|
+
/* inner rect */
|
|
29
|
+
${p} ${f}, ${m} ${f}, ${m} ${h}, ${p} ${h}, ${p} ${f}
|
|
30
30
|
)`;
|
|
31
|
-
e.style.setProperty("--child-clip",
|
|
31
|
+
e.style.setProperty("--child-clip", g);
|
|
32
32
|
}, []);
|
|
33
|
-
return
|
|
33
|
+
return s(() => {
|
|
34
34
|
let t = e?.current;
|
|
35
|
-
if (!
|
|
36
|
-
let n = null, r =
|
|
37
|
-
let e =
|
|
38
|
-
e !== n && (n &&
|
|
39
|
-
}, 50),
|
|
40
|
-
|
|
41
|
-
let o =
|
|
42
|
-
o !== t &&
|
|
35
|
+
if (!_ || !t || v || t.parentElement?.closest(f)) return;
|
|
36
|
+
let n = null, r = l(() => {
|
|
37
|
+
let e = m(t);
|
|
38
|
+
e !== n && (n && i.unobserve(n), e && i.observe(e), n = e), y(t, e);
|
|
39
|
+
}, 50), i = new ResizeObserver(r);
|
|
40
|
+
i.observe(t);
|
|
41
|
+
let o = a(t);
|
|
42
|
+
o !== t && i.observe(o);
|
|
43
43
|
let s = new MutationObserver(r);
|
|
44
44
|
return s.observe(t, {
|
|
45
45
|
childList: !0,
|
|
46
46
|
subtree: !0
|
|
47
47
|
}), t.addEventListener("scroll", r, !0), r(), () => {
|
|
48
|
-
r.cancel(),
|
|
48
|
+
r.cancel(), i.disconnect(), s.disconnect(), t.removeEventListener("scroll", r, !0);
|
|
49
49
|
};
|
|
50
50
|
}, [
|
|
51
|
-
g,
|
|
52
51
|
_,
|
|
52
|
+
v,
|
|
53
53
|
e,
|
|
54
|
-
|
|
55
|
-
]), /* @__PURE__ */
|
|
54
|
+
y
|
|
55
|
+
]), /* @__PURE__ */ u(n, {
|
|
56
56
|
ref: e,
|
|
57
|
-
tag:
|
|
58
|
-
className:
|
|
59
|
-
children:
|
|
57
|
+
tag: g,
|
|
58
|
+
className: d("plitzi-component__layout-container", p),
|
|
59
|
+
children: h
|
|
60
60
|
});
|
|
61
|
-
},
|
|
61
|
+
}, g = e(h);
|
|
62
62
|
//#endregion
|
|
63
|
-
export {
|
|
63
|
+
export { h as LayoutContainer, g as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const LayoutContainer: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./LayoutContainer').LayoutContainerProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./LayoutContainer').LayoutContainerProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "layoutContainer";
|
|
@@ -9,3 +9,16 @@ export declare const boxOf: (element: Element) => DOMRect | undefined;
|
|
|
9
9
|
* box — or, when the layout draws none, the nearest ancestor that positions what it holds.
|
|
10
10
|
*/
|
|
11
11
|
export declare const maskFrameOf: (layout: HTMLElement) => HTMLElement;
|
|
12
|
+
/** Which sides of its page a shell draws something on — a header above, a footer below, a sidebar beside. */
|
|
13
|
+
export type ChromeSides = {
|
|
14
|
+
above: boolean;
|
|
15
|
+
below: boolean;
|
|
16
|
+
left: boolean;
|
|
17
|
+
right: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Where the shell draws something around its page — or only leaves room the page's own background fills: the empty end
|
|
21
|
+
* of a shell as tall as the screen, the gutters beside a centred page. Masked, that room read as a grey slab around
|
|
22
|
+
* every page; only what the shell draws is chrome.
|
|
23
|
+
*/
|
|
24
|
+
export declare const chromeSides: (layout: HTMLElement, body: Element, page: DOMRect) => ChromeSides;
|
|
@@ -9,6 +9,21 @@ var e = (e) => getComputedStyle(e).display === "contents", t = (n) => {
|
|
|
9
9
|
if (!e(t)) return t;
|
|
10
10
|
for (let e = t.parentElement; e; e = e.parentElement) if (getComputedStyle(e).position !== "static") return e;
|
|
11
11
|
return t.ownerDocument.documentElement;
|
|
12
|
+
}, r = (e, t, n) => {
|
|
13
|
+
let r = {
|
|
14
|
+
above: !1,
|
|
15
|
+
below: !1,
|
|
16
|
+
left: !1,
|
|
17
|
+
right: !1
|
|
18
|
+
};
|
|
19
|
+
for (let i of e.querySelectorAll("[data-plitzi-el]")) {
|
|
20
|
+
if (i.contains(t) || t.contains(i)) continue;
|
|
21
|
+
let e = i.getBoundingClientRect();
|
|
22
|
+
if (e.width <= 0 || e.height <= 0) continue;
|
|
23
|
+
let a = e.top < n.bottom - 1 && e.bottom > n.top + 1;
|
|
24
|
+
r.above ||= e.top < n.top - 1 && !a, r.below ||= e.bottom > n.bottom + 1 && !a, r.left ||= a && e.left < n.left - 1, r.right ||= a && e.right > n.right + 1;
|
|
25
|
+
}
|
|
26
|
+
return r;
|
|
12
27
|
};
|
|
13
28
|
//#endregion
|
|
14
|
-
export { t as boxOf, n as maskFrameOf };
|
|
29
|
+
export { t as boxOf, r as chromeSides, n as maskFrameOf };
|
|
@@ -5,7 +5,7 @@ export type LoadingProps = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const Loading: ({ ref, className }: LoadingProps) => import('react').JSX.Element;
|
|
7
7
|
declare const _default: {
|
|
8
|
-
(props: import('../../..').WithElementProps<LoadingProps>): import('react').JSX.Element;
|
|
8
|
+
(props: import('../../..').WithElementProps<LoadingProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Loading: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Loading').LoadingProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Loading').LoadingProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "loading";
|
|
@@ -5,7 +5,7 @@ export type NotFoundProps = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const NotFound: ({ ref, className }: NotFoundProps) => import('react').JSX.Element | undefined;
|
|
7
7
|
declare const _default: {
|
|
8
|
-
(props: import('../../..').WithElementProps<NotFoundProps>): import('react').JSX.Element;
|
|
8
|
+
(props: import('../../..').WithElementProps<NotFoundProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const NotFound: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./NotFound').NotFoundProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./NotFound').NotFoundProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "notFound";
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { DocumentScroll } from './declaration';
|
|
2
|
-
import { PageAccess, PageWithheld as WithheldReason } from '@plitzi/sdk-shared/schema';
|
|
2
|
+
import { OgType, PageAccess, PageWithheld as WithheldReason } from '@plitzi/sdk-shared/schema';
|
|
3
3
|
import { ReactNode, RefObject } from 'react';
|
|
4
4
|
export type PageProps = {
|
|
5
5
|
ref?: RefObject<HTMLElement>;
|
|
6
6
|
seoEnabled?: boolean;
|
|
7
7
|
seoPageTitle?: string;
|
|
8
8
|
seoPageDescription?: string;
|
|
9
|
+
/** For search engines: `noindex`, `noindex, nofollow`. */
|
|
10
|
+
seoRobots?: string;
|
|
11
|
+
/** The page's JSON-LD, each object as it is written into the head. */
|
|
12
|
+
seoStructuredData?: Record<string, unknown>[];
|
|
13
|
+
/**
|
|
14
|
+
* The picture a link to the page shows — a chat's preview card, a post (`og:image`): a file of the site (`/og.png`)
|
|
15
|
+
* or an address, about 1200×630. A template over the page's server providers too: a room's page shows its cover.
|
|
16
|
+
* Left out, the space's `shareImage`.
|
|
17
|
+
*/
|
|
18
|
+
seoImage?: string;
|
|
19
|
+
/** What the picture shows, for whoever cannot see it (`og:image:alt`). */
|
|
20
|
+
seoImageAlt?: string;
|
|
21
|
+
/** What the page is, in Open Graph's words: `website` (the default), `article`, `profile`, `music.playlist`… */
|
|
22
|
+
seoType?: OgType;
|
|
9
23
|
/**
|
|
10
24
|
* A template over the page's server providers and `navigation` that says this address shows nothing — a record that
|
|
11
25
|
* is not there: the page server sends it with status 404, rendered as written. Read there only (`serverTemplates`).
|
|
@@ -36,9 +50,9 @@ export type PageProps = {
|
|
|
36
50
|
layoutContainer?: string;
|
|
37
51
|
children?: ReactNode;
|
|
38
52
|
};
|
|
39
|
-
declare const Page: ({ ref, seoEnabled, seoPageTitle, seoPageDescription, documentScroll, withheld, className, layout, layoutContainer, children }: PageProps) => import('react').JSX.Element;
|
|
53
|
+
declare const Page: ({ ref, seoEnabled, seoPageTitle, seoPageDescription, seoRobots, seoStructuredData, seoImage, seoImageAlt, seoType, documentScroll, withheld, className, layout, layoutContainer, children }: PageProps) => import('react').JSX.Element;
|
|
40
54
|
declare const _default: {
|
|
41
|
-
(props: import('../../..').WithElementProps<PageProps>): import('react').JSX.Element;
|
|
55
|
+
(props: import('../../..').WithElementProps<PageProps>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
42
56
|
displayName: string;
|
|
43
57
|
};
|
|
44
58
|
export default _default;
|
|
@@ -13,61 +13,68 @@ import { useRenderSettings as p, useSdkStore as m } from "@plitzi/sdk-shared/sto
|
|
|
13
13
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
14
|
import _ from "clsx";
|
|
15
15
|
import { InteractionsContext as v } from "@plitzi/sdk-interactions";
|
|
16
|
+
import { AuthContext as y } from "@plitzi/sdk-auth";
|
|
16
17
|
//#region src/elements/internal/Page/Page.tsx
|
|
17
|
-
var
|
|
18
|
+
var b = {
|
|
18
19
|
locked: "html,body{height:100%;overflow:hidden;overscroll-behavior:none}",
|
|
19
20
|
noBounce: "html,body{overscroll-behavior:none}"
|
|
20
|
-
},
|
|
21
|
+
}, x = (e) => e.map((e) => ({
|
|
21
22
|
...e,
|
|
22
23
|
plitziElementLayout: {
|
|
23
24
|
slots: [e.slot],
|
|
24
25
|
rootId: e.slot,
|
|
25
26
|
type: "layout"
|
|
26
27
|
}
|
|
27
|
-
})),
|
|
28
|
+
})), S = (t, n, r) => t.reduce((t, { layout: r, slot: i, plitziElementLayout: o }) => /* @__PURE__ */ h(e, {
|
|
28
29
|
bodies: { [i]: t },
|
|
29
30
|
children: /* @__PURE__ */ h(a, { internalProps: {
|
|
30
31
|
id: r,
|
|
31
32
|
rootId: n,
|
|
32
33
|
plitziElementLayout: o
|
|
33
34
|
} })
|
|
34
|
-
}, i), r),
|
|
35
|
-
let { id:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
}, i), r), C = ({ ref: e, seoEnabled: n = !1, seoPageTitle: a = "Title", seoPageDescription: C = "Description", seoRobots: w, seoStructuredData: T, seoImage: E, seoImageAlt: D, seoType: O, documentScroll: k = "", withheld: A, className: j = "", layout: M = "", layoutContainer: N = "", children: P }) => {
|
|
36
|
+
let { id: F } = r(), { settings: { previewMode: I } } = f(), { interactionsManager: L } = l(v), { ownsHead: R, renderMode: z } = p(), B = R && z !== "widget", [[V, H]] = m(["navigation.routeParams", "navigation.queryParams"]), { authenticated: U, user: W } = l(y), G = U ? `${String(W?.details?.id ?? "")}:${W?.details?.username ?? ""}` : "", K = o(M, N), q = d(() => x(K), [K]), J = d(() => S(q, F, A ? /* @__PURE__ */ h(c, { reason: A }) : P), [
|
|
37
|
+
q,
|
|
38
|
+
F,
|
|
39
|
+
P,
|
|
40
|
+
A
|
|
40
41
|
]);
|
|
41
42
|
return u(() => {
|
|
42
43
|
let e = !1;
|
|
43
44
|
return queueMicrotask(() => {
|
|
44
|
-
e ||
|
|
45
|
-
pageId:
|
|
46
|
-
routeParams:
|
|
47
|
-
queryParams:
|
|
45
|
+
e || L.interactionTrigger(F, "onPageLoad", {
|
|
46
|
+
pageId: F,
|
|
47
|
+
routeParams: V,
|
|
48
|
+
queryParams: H
|
|
48
49
|
});
|
|
49
50
|
}), () => {
|
|
50
51
|
e = !0;
|
|
51
52
|
};
|
|
52
53
|
}, [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
F,
|
|
55
|
+
L,
|
|
56
|
+
H,
|
|
57
|
+
V,
|
|
58
|
+
G
|
|
57
59
|
]), /* @__PURE__ */ g(i, {
|
|
58
60
|
ref: e,
|
|
59
|
-
className: _("plitzi-component__page",
|
|
61
|
+
className: _("plitzi-component__page", j),
|
|
60
62
|
interactionTriggers: t.triggers,
|
|
61
63
|
children: [
|
|
62
|
-
n &&
|
|
63
|
-
pageId:
|
|
64
|
+
n && I && R && /* @__PURE__ */ h(s, {
|
|
65
|
+
pageId: F,
|
|
64
66
|
title: a,
|
|
65
|
-
description:
|
|
67
|
+
description: C,
|
|
68
|
+
...w ? { robots: w } : {},
|
|
69
|
+
...T ? { structuredData: T } : {},
|
|
70
|
+
...E ? { image: E } : {},
|
|
71
|
+
...D ? { imageAlt: D } : {},
|
|
72
|
+
...O ? { type: O } : {}
|
|
66
73
|
}),
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
k && B && /* @__PURE__ */ h("style", { children: b[k] }),
|
|
75
|
+
J
|
|
69
76
|
]
|
|
70
77
|
});
|
|
71
|
-
},
|
|
78
|
+
}, w = n(C);
|
|
72
79
|
//#endregion
|
|
73
|
-
export {
|
|
80
|
+
export { C as Page, w as default };
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
import { OgType } from '@plitzi/sdk-shared/schema';
|
|
1
2
|
export type PageHeadProps = {
|
|
2
3
|
pageId: string;
|
|
3
4
|
title?: string;
|
|
4
5
|
description?: string;
|
|
6
|
+
robots?: string;
|
|
7
|
+
structuredData?: Record<string, unknown>[];
|
|
8
|
+
image?: string;
|
|
9
|
+
imageAlt?: string;
|
|
10
|
+
type?: OgType;
|
|
5
11
|
};
|
|
6
12
|
/**
|
|
7
|
-
* The page's
|
|
8
|
-
*
|
|
9
|
-
*
|
|
13
|
+
* The page's head: its title, its JSON-LD and every tag `pageHeadTags` says of it — description, robots, Open Graph and
|
|
14
|
+
* card with its picture, its address, the space's icon, colour and language — its words, or its templates read against
|
|
15
|
+
* the answers of its server providers — `rsc.data`, what the server wrote the HTML's head from, and what a navigation
|
|
16
|
+
* fetches before it lands — so the tab says the record a detail page shows, on arrival and after every move.
|
|
10
17
|
*/
|
|
11
|
-
declare const PageHead: ({ pageId, title, description }: PageHeadProps) => import('react').JSX.Element;
|
|
18
|
+
declare const PageHead: ({ pageId, title, description, robots, structuredData, image, imageAlt, type }: PageHeadProps) => import('react').JSX.Element;
|
|
12
19
|
export default PageHead;
|
|
@@ -1,29 +1,51 @@
|
|
|
1
1
|
import { useMemo as e } from "react";
|
|
2
2
|
import { useCommonStore as t } from "@plitzi/sdk-shared/store";
|
|
3
3
|
import { isRecord as n } from "@plitzi/sdk-shared/helpers";
|
|
4
|
-
import { collectServerElements as r,
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { Helmet as
|
|
4
|
+
import { collectServerElements as r, jsonForScript as i, pageHeadTags as a, pageSeoText as o, pageServerContext as s, pageStructuredData as c, spaceIdentity as l } from "@plitzi/sdk-shared/schema";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
|
+
import { Helmet as f } from "@dr.pogodin/react-helmet";
|
|
7
7
|
//#region src/elements/internal/Page/PageHead.tsx
|
|
8
|
-
var
|
|
9
|
-
let [[
|
|
8
|
+
var p = () => typeof window > "u" ? "" : `${window.location.origin}${window.location.pathname}`, m = ({ pageId: m, title: h, description: g, robots: _, structuredData: v, image: y, imageAlt: b, type: x }) => {
|
|
9
|
+
let [[S, C, w, T, E]] = t([
|
|
10
10
|
"schema.flat",
|
|
11
11
|
"rsc.data",
|
|
12
12
|
"navigation.routeParams",
|
|
13
|
-
"navigation.queryParams"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
"navigation.queryParams",
|
|
14
|
+
"schema.settings"
|
|
15
|
+
]), D = e(() => n(S) ? r({ flat: S }, m) : [], [S, m]), O = e(() => s(D, C ?? {}, {
|
|
16
|
+
routeParams: w,
|
|
17
|
+
queryParams: T
|
|
17
18
|
}), [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
]),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
D,
|
|
20
|
+
C,
|
|
21
|
+
w,
|
|
22
|
+
T
|
|
23
|
+
]), k = o(h, O), A = o(g, O), j = e(() => c(v, O), [v, O]), M = o(y, O), N = o(b, O), P = a({
|
|
24
|
+
...k ? { title: k } : {},
|
|
25
|
+
...A ? { description: A } : {},
|
|
26
|
+
..._ ? { robots: _ } : {},
|
|
27
|
+
...M ? { image: M } : {},
|
|
28
|
+
...M && N ? { imageAlt: N } : {},
|
|
29
|
+
...x ? { type: x } : {}
|
|
30
|
+
}, l(E), p());
|
|
31
|
+
return /* @__PURE__ */ d(f, { children: [
|
|
32
|
+
P.lang && /* @__PURE__ */ u("html", { lang: P.lang }),
|
|
33
|
+
!!k && /* @__PURE__ */ u("title", { children: k }),
|
|
34
|
+
P.meta.map((e) => /* @__PURE__ */ u("meta", {
|
|
35
|
+
...e.attribute === "name" ? { name: e.key } : { property: e.key },
|
|
36
|
+
content: e.content,
|
|
37
|
+
...e.media ? { media: e.media } : {}
|
|
38
|
+
}, `${e.key}${e.media ?? ""}`)),
|
|
39
|
+
P.links.map((e) => /* @__PURE__ */ u("link", {
|
|
40
|
+
rel: e.rel,
|
|
41
|
+
href: e.href,
|
|
42
|
+
...e.type ? { type: e.type } : {}
|
|
43
|
+
}, e.rel)),
|
|
44
|
+
j.map((e, t) => /* @__PURE__ */ u("script", {
|
|
45
|
+
type: "application/ld+json",
|
|
46
|
+
children: i(e)
|
|
47
|
+
}, t))
|
|
48
|
+
] });
|
|
27
49
|
};
|
|
28
50
|
//#endregion
|
|
29
|
-
export {
|
|
51
|
+
export { m as default };
|
|
@@ -3,8 +3,9 @@ export type PageWithheldProps = {
|
|
|
3
3
|
reason: Reason;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
|
-
* What a page the server withheld from this visitor shows instead of its content — which was never sent
|
|
7
|
-
*
|
|
6
|
+
* What a page the server withheld from this visitor shows instead of its content — which was never sent — inside the
|
|
7
|
+
* page's own layout so the site around it still works; the server answers it with 401 or 403. The page the space names
|
|
8
|
+
* for it (`settings.withheldPage`), or else why, in a sentence.
|
|
8
9
|
*/
|
|
9
10
|
declare const PageWithheld: ({ reason }: PageWithheldProps) => import('react').JSX.Element;
|
|
10
11
|
export default PageWithheld;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "../../../Element/hooks/useInternalItems.mjs";
|
|
2
|
+
import { usePlitzi as t } from "@plitzi/sdk-shared/hooks";
|
|
3
|
+
import { useCommonStore as n } from "@plitzi/sdk-shared/store";
|
|
4
|
+
import { withheldPageOf as r } from "@plitzi/sdk-shared/schema";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
2
6
|
//#region src/elements/internal/Page/PageWithheld.tsx
|
|
3
|
-
var
|
|
7
|
+
var o = {
|
|
4
8
|
unauthenticated: {
|
|
5
9
|
title: "Sign in to see this page",
|
|
6
10
|
text: "This page is for people who are signed in and have access to it."
|
|
@@ -9,7 +13,7 @@ var n = {
|
|
|
9
13
|
title: "This page is not available to you",
|
|
10
14
|
text: "It is for people with access you do not have. If you think you should, ask whoever runs this site."
|
|
11
15
|
}
|
|
12
|
-
},
|
|
16
|
+
}, s = {
|
|
13
17
|
display: "flex",
|
|
14
18
|
flexDirection: "column",
|
|
15
19
|
gap: "8px",
|
|
@@ -18,26 +22,45 @@ var n = {
|
|
|
18
22
|
padding: "0 16px",
|
|
19
23
|
textAlign: "center",
|
|
20
24
|
color: "var(--foreground, inherit)"
|
|
21
|
-
},
|
|
25
|
+
}, c = {
|
|
22
26
|
margin: 0,
|
|
23
27
|
fontSize: "24px",
|
|
24
28
|
lineHeight: 1.25
|
|
25
|
-
},
|
|
29
|
+
}, l = {
|
|
26
30
|
margin: 0,
|
|
27
31
|
color: "var(--muted, inherit)",
|
|
28
32
|
fontSize: "16px",
|
|
29
33
|
lineHeight: 1.55
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})
|
|
41
|
-
|
|
34
|
+
}, u = ({ page: t, previewMode: n }) => e({
|
|
35
|
+
id: t.id,
|
|
36
|
+
definition: t.definition,
|
|
37
|
+
children: void 0,
|
|
38
|
+
previewMode: n
|
|
39
|
+
}), d = ({ reason: e }) => {
|
|
40
|
+
let [[d, f, p]] = n([
|
|
41
|
+
"schema.flat",
|
|
42
|
+
"schema.pages",
|
|
43
|
+
"schema.settings"
|
|
44
|
+
]), { settings: { previewMode: m } } = t(), h = r({
|
|
45
|
+
flat: d,
|
|
46
|
+
pages: f,
|
|
47
|
+
settings: p
|
|
48
|
+
});
|
|
49
|
+
return h === void 0 ? /* @__PURE__ */ a("section", {
|
|
50
|
+
className: "plitzi-component__page-withheld",
|
|
51
|
+
style: s,
|
|
52
|
+
"data-withheld": e,
|
|
53
|
+
children: [/* @__PURE__ */ i("h1", {
|
|
54
|
+
style: c,
|
|
55
|
+
children: o[e].title
|
|
56
|
+
}), /* @__PURE__ */ i("p", {
|
|
57
|
+
style: l,
|
|
58
|
+
children: o[e].text
|
|
59
|
+
})]
|
|
60
|
+
}) : /* @__PURE__ */ i(u, {
|
|
61
|
+
page: d[h],
|
|
62
|
+
previewMode: m
|
|
63
|
+
});
|
|
64
|
+
};
|
|
42
65
|
//#endregion
|
|
43
|
-
export {
|
|
66
|
+
export { d as default };
|
|
@@ -8,6 +8,10 @@ type SettingsProps = {
|
|
|
8
8
|
folder?: string;
|
|
9
9
|
seoPageTitle?: string;
|
|
10
10
|
seoPageDescription?: string;
|
|
11
|
+
seoRobots?: string;
|
|
12
|
+
seoImage?: string;
|
|
13
|
+
seoImageAlt?: string;
|
|
14
|
+
seoType?: string;
|
|
11
15
|
slug?: string;
|
|
12
16
|
layout?: string;
|
|
13
17
|
layoutContainer?: string;
|
|
@@ -18,5 +22,5 @@ type SettingsProps = {
|
|
|
18
22
|
access?: PageAccess | '';
|
|
19
23
|
onUpdate?: (key: string, value: string | boolean | number | PageAccess) => void;
|
|
20
24
|
};
|
|
21
|
-
declare const Settings: ({ id, seoEnabled, enabled, name, folder, seoPageTitle, seoPageDescription, slug, layout, layoutContainer, accessLevel, unauthorizedBehaviour, unauthorizedPageRedirect, documentScroll, access, onUpdate }: SettingsProps) => import('react').JSX.Element;
|
|
25
|
+
declare const Settings: ({ id, seoEnabled, enabled, name, folder, seoPageTitle, seoPageDescription, seoRobots, seoImage, seoImageAlt, seoType, slug, layout, layoutContainer, accessLevel, unauthorizedBehaviour, unauthorizedPageRedirect, documentScroll, access, onUpdate }: SettingsProps) => import('react').JSX.Element;
|
|
22
26
|
export default Settings;
|