@palmyit/elements 0.1.8 → 0.1.19
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/README.md +2 -0
- package/dist/definitions.d.ts +15 -9
- package/dist/definitions.js +1756 -949
- package/dist/elements/article/definition.d.ts +43 -0
- package/dist/elements/article/template.d.ts +12 -0
- package/dist/elements/button/definition.d.ts +1 -0
- package/dist/elements/footer/definition.d.ts +35 -0
- package/dist/elements/footer/template.d.ts +2 -0
- package/dist/elements/heading/definition.d.ts +29 -0
- package/dist/elements/heading/template.d.ts +2 -0
- package/dist/elements/icon/definition.d.ts +11 -0
- package/dist/elements/image/definition.d.ts +47 -0
- package/dist/elements/image/template.d.ts +30 -0
- package/dist/elements/list/definition.d.ts +2 -0
- package/dist/elements/nav/definition.d.ts +39 -0
- package/dist/elements/nav/template.d.ts +17 -0
- package/dist/elements/page/definition.d.ts +41 -1
- package/dist/elements/table/definition.d.ts +2 -0
- package/dist/elements/text/definition.d.ts +2 -1
- package/dist/elements/video/definition.d.ts +39 -0
- package/dist/elements/video/template.d.ts +6 -0
- package/dist/elements/video/youtube.d.ts +4 -0
- package/dist/manifest.json +2 -2
- package/dist/plmt-elements.css +1 -1
- package/dist/render/renderHtml.d.ts +1 -1
- package/dist/render/styleToClasses.d.ts +8 -9
- package/dist/render/styleToVars.d.ts +2 -0
- package/dist/render/styleTokens.d.ts +11 -1
- package/dist/render/tags.d.ts +9 -1
- package/dist/render/types.d.ts +4 -0
- package/dist/schema/Fields/ColorField/colorText.d.ts +3 -0
- package/dist/schema/Fields/IconPicker/iconCatalog.d.ts +5 -1
- package/dist/schema/addressSchema.d.ts +2 -0
- package/dist/schema/device/devices.d.ts +8 -0
- package/dist/schema/deviceSettings.d.ts +1 -1
- package/dist/schema/elementCategories.d.ts +29 -0
- package/dist/schema/elementConfiguration.d.ts +1 -1
- package/dist/schema/elementRegistry.d.ts +25 -1
- package/dist/schema/elementStyleDefinitions.d.ts +6 -14
- package/dist/schema/elementTemplates.d.ts +3 -2
- package/dist/schema/linkSettings.d.ts +19 -2
- package/dist/schema/style/elementStyle.d.ts +1 -1
- package/dist/schema/styleItems.d.ts +18 -0
- package/dist/schema/styleTokensSchema.d.ts +34 -18
- package/dist/tags.json +5 -1
- package/dist/templates/brands/brandSpec.d.ts +5 -0
- package/dist/templates/elementSpec.d.ts +1 -1
- package/dist/templates/head.d.ts +43 -0
- package/dist/templates/heroicons/heroiconSpec.d.ts +6 -0
- package/dist/templates.d.ts +3 -0
- package/dist/templates.js +1351 -237
- package/dist/youtube-BDsE1Bz3.js +910 -0
- package/package.json +3 -3
- package/dist/styleToClasses-CZSWp6Ez.js +0 -683
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TextItem } from '../../schema/textItems';
|
|
2
|
+
import { HeadingLevel } from '../heading/definition';
|
|
3
|
+
import { ImageAspectRatio, ImageShadow } from '../image/definition';
|
|
4
|
+
export declare const ARTICLE_LAYOUTS: readonly ["vertical", "horizontal"];
|
|
5
|
+
export type ArticleLayout = (typeof ARTICLE_LAYOUTS)[number];
|
|
6
|
+
export declare const ARTICLE_EXCERPT_LINES: readonly ["2", "3", "4", "none"];
|
|
7
|
+
export type ArticleExcerptLines = (typeof ARTICLE_EXCERPT_LINES)[number];
|
|
8
|
+
export type PArticleDocumentProps = {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
titleLevel: HeadingLevel;
|
|
12
|
+
excerpt: string;
|
|
13
|
+
href: string;
|
|
14
|
+
linkLabel: string;
|
|
15
|
+
image: string;
|
|
16
|
+
imageAlt: string;
|
|
17
|
+
publishedAt: string;
|
|
18
|
+
author: string;
|
|
19
|
+
tags: TextItem[];
|
|
20
|
+
layout: ArticleLayout;
|
|
21
|
+
clickableCard: boolean;
|
|
22
|
+
excerptLines: ArticleExcerptLines;
|
|
23
|
+
imageAspect: ImageAspectRatio;
|
|
24
|
+
shadow: ImageShadow;
|
|
25
|
+
};
|
|
26
|
+
export declare const defaultArticleProps: {
|
|
27
|
+
title: string;
|
|
28
|
+
titleLevel: "2";
|
|
29
|
+
excerpt: string;
|
|
30
|
+
href: string;
|
|
31
|
+
linkLabel: string;
|
|
32
|
+
image: string;
|
|
33
|
+
imageAlt: string;
|
|
34
|
+
publishedAt: string;
|
|
35
|
+
author: string;
|
|
36
|
+
tags: TextItem[];
|
|
37
|
+
layout: "vertical";
|
|
38
|
+
clickableCard: boolean;
|
|
39
|
+
excerptLines: "3";
|
|
40
|
+
imageAspect: "video";
|
|
41
|
+
shadow: "none";
|
|
42
|
+
};
|
|
43
|
+
export declare const pArticleDefinition: import('../../definitions').ElementConfiguration<PArticleDocumentProps & Partial<import('../../definitions').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ElementSpec, ElementSpecOptions, ShortcodeNode } from '../../render/types';
|
|
2
|
+
export declare const ARTICLE_LAYOUT_CLASSES: {
|
|
3
|
+
readonly vertical: "flex flex-col";
|
|
4
|
+
readonly horizontal: "flex flex-row mobile:flex-col";
|
|
5
|
+
};
|
|
6
|
+
export declare const ARTICLE_CLAMP_CLASSES: {
|
|
7
|
+
readonly '2': "line-clamp-2";
|
|
8
|
+
readonly '3': "line-clamp-3";
|
|
9
|
+
readonly '4': "line-clamp-4";
|
|
10
|
+
readonly none: "";
|
|
11
|
+
};
|
|
12
|
+
export declare function articleTemplate(node: ShortcodeNode, _options?: ElementSpecOptions): ElementSpec | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ElementStyle } from '../../schema/style/elementStyle';
|
|
2
|
+
import { BRAND_NETWORKS } from '../../templates/brands/brandSpec';
|
|
3
|
+
export type FooterLinkItem = {
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
};
|
|
7
|
+
export type FooterLinkGroup = {
|
|
8
|
+
heading: string;
|
|
9
|
+
items: FooterLinkItem[];
|
|
10
|
+
};
|
|
11
|
+
export type FooterSocialLink = {
|
|
12
|
+
network: (typeof BRAND_NETWORKS)[number];
|
|
13
|
+
href: string;
|
|
14
|
+
};
|
|
15
|
+
export type PFooterDocumentProps = {
|
|
16
|
+
id: string;
|
|
17
|
+
linkGroups: FooterLinkGroup[];
|
|
18
|
+
copyright: string;
|
|
19
|
+
address: string;
|
|
20
|
+
phone: string;
|
|
21
|
+
email: string;
|
|
22
|
+
socialLinks: FooterSocialLink[];
|
|
23
|
+
style: ElementStyle;
|
|
24
|
+
};
|
|
25
|
+
export declare const defaultFooterStyle: ElementStyle;
|
|
26
|
+
export declare const defaultFooterProps: {
|
|
27
|
+
linkGroups: FooterLinkGroup[];
|
|
28
|
+
copyright: string;
|
|
29
|
+
address: string;
|
|
30
|
+
phone: string;
|
|
31
|
+
email: string;
|
|
32
|
+
socialLinks: FooterSocialLink[];
|
|
33
|
+
style: ElementStyle;
|
|
34
|
+
};
|
|
35
|
+
export declare const pFooterDefinition: import('../../definitions').ElementConfiguration<PFooterDocumentProps & Partial<import('../../definitions').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LinkSettings } from '../../schema/linkSettings';
|
|
2
|
+
import { TextStyle } from '../text/definition';
|
|
3
|
+
export declare const HEADING_LEVELS: readonly ["1", "2", "3", "4", "5", "6"];
|
|
4
|
+
export type HeadingLevel = (typeof HEADING_LEVELS)[number];
|
|
5
|
+
export type PHeadingDocumentProps = LinkSettings & {
|
|
6
|
+
id: string;
|
|
7
|
+
text: string;
|
|
8
|
+
level: HeadingLevel;
|
|
9
|
+
anchor: string;
|
|
10
|
+
style: TextStyle;
|
|
11
|
+
};
|
|
12
|
+
export declare const defaultHeadingProps: {
|
|
13
|
+
style: TextStyle;
|
|
14
|
+
href: string;
|
|
15
|
+
target: import('../../schema/linkSettings').LinkTarget;
|
|
16
|
+
description: string;
|
|
17
|
+
rel: import('../../definitions').LinkRel;
|
|
18
|
+
text: string;
|
|
19
|
+
level: "2";
|
|
20
|
+
anchor: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const HEADING_PREFIX = "--palmyit-heading";
|
|
23
|
+
export declare const pHeadingDefinition: import('../../definitions').ElementConfiguration<LinkSettings & {
|
|
24
|
+
id: string;
|
|
25
|
+
text: string;
|
|
26
|
+
level: HeadingLevel;
|
|
27
|
+
anchor: string;
|
|
28
|
+
style: TextStyle;
|
|
29
|
+
} & Partial<import('../../definitions').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import { LinkSettings } from '../../schema/linkSettings';
|
|
2
|
+
export declare const iconSizes: readonly ["small", "medium", "large"];
|
|
3
|
+
export type IconSize = (typeof iconSizes)[number];
|
|
4
|
+
export declare const iconShapes: readonly ["outline", "solid"];
|
|
5
|
+
export type IconShape = (typeof iconShapes)[number];
|
|
2
6
|
export type PIconDocumentProps = LinkSettings & {
|
|
3
7
|
id: string;
|
|
4
8
|
icon: string;
|
|
5
9
|
label: string;
|
|
10
|
+
size: IconSize;
|
|
11
|
+
shape: IconShape;
|
|
6
12
|
};
|
|
7
13
|
export declare const defaultIconProps: {
|
|
8
14
|
href: string;
|
|
9
15
|
target: import('../../schema/linkSettings').LinkTarget;
|
|
10
16
|
description: string;
|
|
17
|
+
rel: import('../../definitions').LinkRel;
|
|
11
18
|
icon: string;
|
|
12
19
|
label: string;
|
|
20
|
+
size: IconSize;
|
|
21
|
+
shape: IconShape;
|
|
13
22
|
};
|
|
14
23
|
export declare const pIconDefinition: import('../../definitions').ElementConfiguration<LinkSettings & {
|
|
15
24
|
id: string;
|
|
16
25
|
icon: string;
|
|
17
26
|
label: string;
|
|
27
|
+
size: IconSize;
|
|
28
|
+
shape: IconShape;
|
|
18
29
|
} & Partial<import('../../definitions').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
@@ -4,6 +4,16 @@ import { BackgroundStyle } from '../../schema/Fields/BackgroundField/backgroundV
|
|
|
4
4
|
import { StyleColor } from '../../render/styleTokens';
|
|
5
5
|
export declare const IMAGE_LENGTH_KEYS: ("width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "borderRadiusTopLeft" | "borderRadiusTopRight" | "borderRadiusBottomRight" | "borderRadiusBottomLeft")[];
|
|
6
6
|
export type ImageLengthKey = (typeof IMAGE_LENGTH_KEYS)[number];
|
|
7
|
+
export declare const IMAGE_ASPECT_RATIOS: readonly ["auto", "square", "video", "3/4", "4/3"];
|
|
8
|
+
export type ImageAspectRatio = (typeof IMAGE_ASPECT_RATIOS)[number];
|
|
9
|
+
export declare const IMAGE_OBJECT_FITS: readonly ["cover", "contain"];
|
|
10
|
+
export type ImageObjectFit = (typeof IMAGE_OBJECT_FITS)[number];
|
|
11
|
+
export declare const IMAGE_OBJECT_POSITIONS: readonly ["center", "top", "bottom", "left", "right", "left-top", "right-top", "left-bottom", "right-bottom"];
|
|
12
|
+
export type ImageObjectPosition = (typeof IMAGE_OBJECT_POSITIONS)[number];
|
|
13
|
+
export declare const IMAGE_SHADOWS: readonly ["none", "sm", "md", "lg", "xl"];
|
|
14
|
+
export type ImageShadow = (typeof IMAGE_SHADOWS)[number];
|
|
15
|
+
export declare const IMAGE_CAPTION_ALIGNS: readonly ["start", "center"];
|
|
16
|
+
export type ImageCaptionAlign = (typeof IMAGE_CAPTION_ALIGNS)[number];
|
|
7
17
|
/** Every key stays unset until the user edits it, so the image keeps its natural size and no frame. */
|
|
8
18
|
export type ImageStyle = Partial<BackgroundStyle & Record<ImageLengthKey, string> & {
|
|
9
19
|
borderWidth: string;
|
|
@@ -14,14 +24,39 @@ export type PImageDocumentProps = LinkSettings & {
|
|
|
14
24
|
id: string;
|
|
15
25
|
src: string;
|
|
16
26
|
alt: string;
|
|
27
|
+
priority: boolean;
|
|
28
|
+
caption: string;
|
|
29
|
+
decorative: boolean;
|
|
30
|
+
intrinsicWidth: number | null;
|
|
31
|
+
intrinsicHeight: number | null;
|
|
32
|
+
tabletSrc: string;
|
|
33
|
+
mobileSrc: string;
|
|
34
|
+
aspectRatio: ImageAspectRatio;
|
|
35
|
+
objectFit: ImageObjectFit | '';
|
|
36
|
+
objectPosition: ImageObjectPosition;
|
|
37
|
+
shadow: ImageShadow;
|
|
38
|
+
captionAlign: ImageCaptionAlign;
|
|
17
39
|
style: ImageStyle;
|
|
18
40
|
};
|
|
19
41
|
export declare const defaultImageProps: {
|
|
20
42
|
href: string;
|
|
21
43
|
target: import('../../schema/linkSettings').LinkTarget;
|
|
22
44
|
description: string;
|
|
45
|
+
rel: import('../../definitions').LinkRel;
|
|
23
46
|
src: string;
|
|
24
47
|
alt: string;
|
|
48
|
+
priority: boolean;
|
|
49
|
+
caption: string;
|
|
50
|
+
decorative: boolean;
|
|
51
|
+
intrinsicWidth: number | null;
|
|
52
|
+
intrinsicHeight: number | null;
|
|
53
|
+
tabletSrc: string;
|
|
54
|
+
mobileSrc: string;
|
|
55
|
+
aspectRatio: "auto";
|
|
56
|
+
objectFit: "";
|
|
57
|
+
objectPosition: "center";
|
|
58
|
+
shadow: "none";
|
|
59
|
+
captionAlign: "start";
|
|
25
60
|
style: ImageStyle;
|
|
26
61
|
};
|
|
27
62
|
export declare const IMAGE_PREFIX = "--palmyit-image";
|
|
@@ -29,5 +64,17 @@ export declare const pImageDefinition: import('../../definitions').ElementConfig
|
|
|
29
64
|
id: string;
|
|
30
65
|
src: string;
|
|
31
66
|
alt: string;
|
|
67
|
+
priority: boolean;
|
|
68
|
+
caption: string;
|
|
69
|
+
decorative: boolean;
|
|
70
|
+
intrinsicWidth: number | null;
|
|
71
|
+
intrinsicHeight: number | null;
|
|
72
|
+
tabletSrc: string;
|
|
73
|
+
mobileSrc: string;
|
|
74
|
+
aspectRatio: ImageAspectRatio;
|
|
75
|
+
objectFit: ImageObjectFit | "";
|
|
76
|
+
objectPosition: ImageObjectPosition;
|
|
77
|
+
shadow: ImageShadow;
|
|
78
|
+
captionAlign: ImageCaptionAlign;
|
|
32
79
|
style: ImageStyle;
|
|
33
80
|
} & Partial<import('../../definitions').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
@@ -1,2 +1,32 @@
|
|
|
1
1
|
import { ElementSpec, ElementSpecOptions, ShortcodeNode } from '../../render/types';
|
|
2
|
+
/** Literal utility maps so Tailwind `@source` finds every class. */
|
|
3
|
+
export declare const IMAGE_ASPECT_CLASSES: {
|
|
4
|
+
readonly auto: "";
|
|
5
|
+
readonly square: "aspect-square";
|
|
6
|
+
readonly video: "aspect-video";
|
|
7
|
+
readonly '3/4': "aspect-3/4";
|
|
8
|
+
readonly '4/3': "aspect-4/3";
|
|
9
|
+
};
|
|
10
|
+
export declare const IMAGE_FIT_CLASSES: {
|
|
11
|
+
readonly cover: "object-cover";
|
|
12
|
+
readonly contain: "object-contain";
|
|
13
|
+
};
|
|
14
|
+
export declare const IMAGE_POSITION_CLASSES: {
|
|
15
|
+
readonly center: "object-center";
|
|
16
|
+
readonly top: "object-top";
|
|
17
|
+
readonly bottom: "object-bottom";
|
|
18
|
+
readonly left: "object-left";
|
|
19
|
+
readonly right: "object-right";
|
|
20
|
+
readonly 'left-top': "object-left-top";
|
|
21
|
+
readonly 'right-top': "object-right-top";
|
|
22
|
+
readonly 'left-bottom': "object-left-bottom";
|
|
23
|
+
readonly 'right-bottom': "object-right-bottom";
|
|
24
|
+
};
|
|
25
|
+
export declare const IMAGE_SHADOW_CLASSES: {
|
|
26
|
+
readonly none: "";
|
|
27
|
+
readonly sm: "shadow-sm";
|
|
28
|
+
readonly md: "shadow-md";
|
|
29
|
+
readonly lg: "shadow-lg";
|
|
30
|
+
readonly xl: "shadow-xl";
|
|
31
|
+
};
|
|
2
32
|
export declare function imageTemplate(node: ShortcodeNode, _options?: ElementSpecOptions): ElementSpec | null;
|
|
@@ -2,10 +2,12 @@ import { TextItem } from '../../schema/textItems';
|
|
|
2
2
|
export type PListDocumentProps = {
|
|
3
3
|
id: string;
|
|
4
4
|
items: TextItem[];
|
|
5
|
+
ordered: boolean;
|
|
5
6
|
};
|
|
6
7
|
export declare const defaultListProps: {
|
|
7
8
|
items: {
|
|
8
9
|
text: string;
|
|
9
10
|
}[];
|
|
11
|
+
ordered: boolean;
|
|
10
12
|
};
|
|
11
13
|
export declare const pListDefinition: import('../../definitions').ElementConfiguration<PListDocumentProps & Partial<import('../../definitions').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LINK_TARGETS } from '../../schema/linkSettings';
|
|
2
|
+
export declare const NAV_POSITIONS: readonly ["static", "sticky", "overlay"];
|
|
3
|
+
export type NavPosition = (typeof NAV_POSITIONS)[number];
|
|
4
|
+
export declare const NAV_ALIGNMENTS: readonly ["start", "center", "end"];
|
|
5
|
+
export type NavAlignment = (typeof NAV_ALIGNMENTS)[number];
|
|
6
|
+
export declare const NAV_MOBILE_MENUS: readonly ["collapse", "scroll"];
|
|
7
|
+
export type NavMobileMenu = (typeof NAV_MOBILE_MENUS)[number];
|
|
8
|
+
export declare const NAV_COLLAPSE_AT: readonly ["tablet", "mobile"];
|
|
9
|
+
export type NavCollapseAt = (typeof NAV_COLLAPSE_AT)[number];
|
|
10
|
+
export declare const NAV_HEIGHTS: readonly ["14", "16", "20"];
|
|
11
|
+
export type NavHeight = (typeof NAV_HEIGHTS)[number];
|
|
12
|
+
export type NavItem = {
|
|
13
|
+
label: string;
|
|
14
|
+
href: string;
|
|
15
|
+
target: (typeof LINK_TARGETS)[number];
|
|
16
|
+
};
|
|
17
|
+
export type NavCta = {
|
|
18
|
+
label: string;
|
|
19
|
+
href: string;
|
|
20
|
+
};
|
|
21
|
+
export type PNavDocumentProps = {
|
|
22
|
+
id: string;
|
|
23
|
+
brandText: string;
|
|
24
|
+
brandLogo: string;
|
|
25
|
+
brandHref: string;
|
|
26
|
+
items: NavItem[];
|
|
27
|
+
ctaLabel: string;
|
|
28
|
+
ctaHref: string;
|
|
29
|
+
position: NavPosition;
|
|
30
|
+
alignment: NavAlignment;
|
|
31
|
+
mobileMenu: NavMobileMenu;
|
|
32
|
+
collapseAt: NavCollapseAt;
|
|
33
|
+
glass: boolean;
|
|
34
|
+
border: boolean;
|
|
35
|
+
shadow: boolean;
|
|
36
|
+
height: NavHeight;
|
|
37
|
+
};
|
|
38
|
+
export declare const defaultNavProps: Omit<PNavDocumentProps, 'id'>;
|
|
39
|
+
export declare const pNavDefinition: import('../../definitions').ElementConfiguration<PNavDocumentProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementSpec, ElementSpecOptions, ShortcodeNode } from '../../render/types';
|
|
2
|
+
export declare const NAV_POSITION_CLASSES: {
|
|
3
|
+
readonly static: "";
|
|
4
|
+
readonly sticky: "sticky top-0 z-40";
|
|
5
|
+
readonly overlay: "absolute inset-x-0 top-0 z-40";
|
|
6
|
+
};
|
|
7
|
+
export declare const NAV_HEIGHT_CLASSES: {
|
|
8
|
+
readonly '14': "h-14";
|
|
9
|
+
readonly '16': "h-16";
|
|
10
|
+
readonly '20': "h-20";
|
|
11
|
+
};
|
|
12
|
+
export declare const NAV_ALIGN_CLASSES: {
|
|
13
|
+
readonly start: "justify-start";
|
|
14
|
+
readonly center: "justify-center";
|
|
15
|
+
readonly end: "justify-end";
|
|
16
|
+
};
|
|
17
|
+
export declare function navTemplate(node: ShortcodeNode, options?: ElementSpecOptions): ElementSpec | null;
|
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
import { StyleColor, TextSizeToken } from '../../render/styleTokens';
|
|
1
|
+
import { StyleColor, TextSizeToken, LEADING_TOKENS } from '../../render/styleTokens';
|
|
2
|
+
export declare const PAGE_DIRS: readonly ["auto", "ltr", "rtl"];
|
|
3
|
+
export type PageDir = (typeof PAGE_DIRS)[number];
|
|
4
|
+
export declare const PAGE_TEXT_SIZES: readonly ["sm", "base", "lg"];
|
|
5
|
+
export type PageTextSize = (typeof PAGE_TEXT_SIZES)[number];
|
|
6
|
+
export declare const CONTENT_WIDTHS: readonly ["5xl", "6xl", "7xl", "full"];
|
|
7
|
+
export type ContentWidth = (typeof CONTENT_WIDTHS)[number];
|
|
8
|
+
export declare const RADIUS_STYLES: readonly ["square", "soft", "rounded"];
|
|
9
|
+
export type RadiusStyle = (typeof RADIUS_STYLES)[number];
|
|
10
|
+
export declare const LINK_UNDERLINES: readonly ["always", "hover", "never"];
|
|
11
|
+
export type LinkUnderline = (typeof LINK_UNDERLINES)[number];
|
|
2
12
|
export type PPageRootProps = {
|
|
3
13
|
pageId: string;
|
|
4
14
|
url: string;
|
|
5
15
|
title: string;
|
|
16
|
+
seoTitle: string;
|
|
17
|
+
description: string;
|
|
18
|
+
lang: string;
|
|
19
|
+
dir: PageDir;
|
|
20
|
+
shareImage: string;
|
|
21
|
+
hideFromSearch: boolean;
|
|
22
|
+
bodyFont: string;
|
|
23
|
+
headingFont: string;
|
|
24
|
+
lineHeight: (typeof LEADING_TOKENS)[number] | '';
|
|
25
|
+
accentColor: string;
|
|
26
|
+
contentWidth: ContentWidth;
|
|
27
|
+
radiusStyle: RadiusStyle;
|
|
28
|
+
linkUnderline: LinkUnderline;
|
|
6
29
|
backgroundColor: StyleColor;
|
|
7
30
|
textColor: StyleColor;
|
|
8
31
|
textSize: TextSizeToken | number | string;
|
|
@@ -18,5 +41,22 @@ export declare const defaultPageStyle: {
|
|
|
18
41
|
};
|
|
19
42
|
textSize: "sm";
|
|
20
43
|
};
|
|
44
|
+
export declare const defaultPageSeo: {
|
|
45
|
+
seoTitle: string;
|
|
46
|
+
description: string;
|
|
47
|
+
lang: string;
|
|
48
|
+
dir: "auto";
|
|
49
|
+
shareImage: string;
|
|
50
|
+
hideFromSearch: boolean;
|
|
51
|
+
};
|
|
52
|
+
export declare const defaultPageTheme: {
|
|
53
|
+
bodyFont: string;
|
|
54
|
+
headingFont: string;
|
|
55
|
+
lineHeight: "";
|
|
56
|
+
accentColor: string;
|
|
57
|
+
contentWidth: "7xl";
|
|
58
|
+
radiusStyle: "soft";
|
|
59
|
+
linkUnderline: "hover";
|
|
60
|
+
};
|
|
21
61
|
export declare const pageStyleKeys: readonly string[];
|
|
22
62
|
export declare const pPageDefinition: import('../../definitions').ElementConfiguration<PPageRootProps>;
|
|
@@ -6,6 +6,7 @@ export type PTableDocumentProps = {
|
|
|
6
6
|
id: string;
|
|
7
7
|
headers: TextItem[];
|
|
8
8
|
rows: TableRow[];
|
|
9
|
+
caption: string;
|
|
9
10
|
};
|
|
10
11
|
export declare const defaultTableProps: {
|
|
11
12
|
headers: {
|
|
@@ -14,6 +15,7 @@ export declare const defaultTableProps: {
|
|
|
14
15
|
rows: {
|
|
15
16
|
cells: string[];
|
|
16
17
|
}[];
|
|
18
|
+
caption: string;
|
|
17
19
|
};
|
|
18
20
|
/** Pads or trims every row to one cell per column. */
|
|
19
21
|
export declare function fitRowsToHeaders(columnCount: number, rows: readonly TableRow[]): TableRow[];
|
|
@@ -3,7 +3,7 @@ import { StyleDefinition } from '../../schema/styleItems';
|
|
|
3
3
|
import { StyleColor } from '../../render/styleTokens';
|
|
4
4
|
import { FontStyle } from '../../schema/Fields/FontStyleField';
|
|
5
5
|
export declare const TEXT_DECORATIONS: readonly ["none", "underline", "overline", "line-through"];
|
|
6
|
-
export declare const TEXT_ALIGNS: readonly ["left", "center", "right", "justify"];
|
|
6
|
+
export declare const TEXT_ALIGNS: readonly ["start", "end", "left", "center", "right", "justify"];
|
|
7
7
|
export declare const TEXT_TRANSFORMS: readonly ["none", "capitalize", "uppercase", "lowercase"];
|
|
8
8
|
export declare const FONT_WEIGHTS: readonly ["100", "200", "300", "400", "500", "600", "700", "800", "900"];
|
|
9
9
|
export type TextDecoration = (typeof TEXT_DECORATIONS)[number];
|
|
@@ -34,6 +34,7 @@ export declare const defaultTextProps: {
|
|
|
34
34
|
href: string;
|
|
35
35
|
target: import('../../schema/linkSettings').LinkTarget;
|
|
36
36
|
description: string;
|
|
37
|
+
rel: import('../../definitions').LinkRel;
|
|
37
38
|
text: string;
|
|
38
39
|
};
|
|
39
40
|
export declare const TEXT_PREFIX = "--palmyit-text";
|
|
@@ -1,10 +1,49 @@
|
|
|
1
|
+
export declare const VIDEO_SOURCES: readonly ["file", "youtube"];
|
|
2
|
+
export type VideoSource = (typeof VIDEO_SOURCES)[number];
|
|
3
|
+
export declare const VIDEO_PRELOADS: readonly ["none", "metadata"];
|
|
4
|
+
export type VideoPreload = (typeof VIDEO_PRELOADS)[number];
|
|
5
|
+
export declare const VIDEO_ASPECT_RATIOS: readonly ["video", "9/16", "4/3", "square"];
|
|
6
|
+
export type VideoAspectRatio = (typeof VIDEO_ASPECT_RATIOS)[number];
|
|
7
|
+
export type VideoCaptionTrack = {
|
|
8
|
+
src: string;
|
|
9
|
+
srclang: string;
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
1
12
|
export type PVideoDocumentProps = {
|
|
2
13
|
id: string;
|
|
14
|
+
source: VideoSource;
|
|
3
15
|
src: string;
|
|
16
|
+
youtubeUrl: string;
|
|
4
17
|
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
poster: string;
|
|
20
|
+
uploadDate: string;
|
|
21
|
+
captions: VideoCaptionTrack[];
|
|
22
|
+
autoplay: boolean;
|
|
23
|
+
loop: boolean;
|
|
24
|
+
muted: boolean;
|
|
25
|
+
controls: boolean;
|
|
26
|
+
preload: VideoPreload;
|
|
27
|
+
startAt: number;
|
|
28
|
+
aspectRatio: VideoAspectRatio;
|
|
29
|
+
caption: string;
|
|
5
30
|
};
|
|
6
31
|
export declare const defaultVideoProps: {
|
|
32
|
+
source: "file";
|
|
7
33
|
src: string;
|
|
34
|
+
youtubeUrl: string;
|
|
8
35
|
title: string;
|
|
36
|
+
description: string;
|
|
37
|
+
poster: string;
|
|
38
|
+
uploadDate: string;
|
|
39
|
+
captions: VideoCaptionTrack[];
|
|
40
|
+
autoplay: boolean;
|
|
41
|
+
loop: boolean;
|
|
42
|
+
muted: boolean;
|
|
43
|
+
controls: boolean;
|
|
44
|
+
preload: "metadata";
|
|
45
|
+
startAt: number;
|
|
46
|
+
aspectRatio: "video";
|
|
47
|
+
caption: string;
|
|
9
48
|
};
|
|
10
49
|
export declare const pVideoDefinition: import('../../definitions').ElementConfiguration<PVideoDocumentProps & Partial<import('../../definitions').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { ElementSpec, ElementSpecOptions, ShortcodeNode } from '../../render/types';
|
|
2
|
+
export declare const VIDEO_ASPECT_CLASSES: {
|
|
3
|
+
readonly video: "aspect-video";
|
|
4
|
+
readonly '9/16': "aspect-9/16";
|
|
5
|
+
readonly '4/3': "aspect-4/3";
|
|
6
|
+
readonly square: "aspect-square";
|
|
7
|
+
};
|
|
2
8
|
export declare function videoTemplate(node: ShortcodeNode, _options?: ElementSpecOptions): ElementSpec | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Extract an 11-character YouTube video id from common URL shapes. */
|
|
2
|
+
export declare function parseYoutubeId(value: string): string | null;
|
|
3
|
+
export declare function youtubeEmbedUrl(id: string, startAt?: number): string;
|
|
4
|
+
export declare function youtubeThumbnailUrl(id: string): string;
|
package/dist/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.19",
|
|
3
3
|
"files": {
|
|
4
|
-
"plmt-elements.css": "sha384-
|
|
4
|
+
"plmt-elements.css": "sha384-aWYUiJ/OG2gpKI9s8H3w3lCHOtdqu1QsEjd08xja1ixWnTkeCiQQkenwY3cBL1HU",
|
|
5
5
|
"plmt-elements.js": "sha384-OLBgp1GsljhM2TJ+sbHjaiH9txEUvgdDTAzHv2P24donTt6/529l+9Ua0vFImLlb"
|
|
6
6
|
}
|
|
7
7
|
}
|