@palmyit/elements 0.1.3 → 0.1.7
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 -2
- package/dist/definitions.d.ts +51 -0
- package/dist/definitions.js +1737 -0
- package/dist/manifest.json +3 -3
- package/dist/plmt-elements.css +1 -1
- package/dist/plmt-elements.js +0 -115
- package/dist/registry.d.ts +9 -0
- package/dist/render/renderHtml.d.ts +5 -0
- package/dist/render/styleToVars.d.ts +2 -0
- package/dist/render/tags.d.ts +42 -0
- package/dist/render/toDom.d.ts +3 -0
- package/dist/render/types.d.ts +14 -0
- package/dist/schema/Fields/BackgroundField/backgroundValue.d.ts +15 -0
- package/dist/schema/Fields/ColorField/color-value.d.ts +6 -0
- package/dist/schema/Fields/ColorField/index.d.ts +1 -0
- package/dist/schema/Fields/FontStyleField.d.ts +2 -0
- package/dist/schema/Fields/IconPicker/iconCatalog.d.ts +3 -0
- package/dist/schema/PButton/pButton.definition.d.ts +38 -0
- package/dist/schema/PCheckbox/pCheckbox.definition.d.ts +10 -0
- package/dist/schema/PContainer/pContainer.definition.d.ts +39 -0
- package/dist/schema/PDivider/pDivider.definition.d.ts +10 -0
- package/dist/schema/PIcon/pIcon.definition.d.ts +18 -0
- package/dist/schema/PImage/pImage.definition.d.ts +33 -0
- package/dist/schema/PList/pList.definition.d.ts +11 -0
- package/dist/schema/PPage/pPage.definition.d.ts +22 -0
- package/dist/schema/PRadio/pRadio.definition.d.ts +13 -0
- package/dist/schema/PRichText/pRichText.definition.d.ts +8 -0
- package/dist/schema/PRichText/richTextMarks.d.ts +4 -0
- package/dist/schema/PRichText/richTextOptions.d.ts +2 -0
- package/dist/schema/PSection/pSection.definition.d.ts +39 -0
- package/dist/schema/PSelect/pSelect.definition.d.ts +13 -0
- package/dist/schema/PTable/pTable.definition.d.ts +20 -0
- package/dist/schema/PText/pText.definition.d.ts +46 -0
- package/dist/schema/PTextArea/pTextArea.definition.d.ts +10 -0
- package/dist/schema/PTextField/pTextField.definition.d.ts +10 -0
- package/dist/schema/PVideo/pVideo.definition.d.ts +10 -0
- package/dist/schema/addressSchema.d.ts +3 -0
- package/dist/schema/backgroundStyleDefinitions.d.ts +15 -0
- package/dist/schema/device/deviceStyle.d.ts +13 -0
- package/dist/schema/device/devices.d.ts +21 -0
- package/dist/schema/deviceSettings.d.ts +13 -0
- package/dist/schema/deviceVisibility.d.ts +19 -0
- package/dist/schema/elementConfiguration.d.ts +38 -0
- package/dist/schema/elementRegistry.d.ts +40 -0
- package/dist/schema/elementStyleDefinitions.d.ts +24 -0
- package/dist/schema/elementTemplates.d.ts +26 -0
- package/dist/schema/layoutChildren.d.ts +2 -0
- package/dist/schema/layoutElementConfiguration.d.ts +17 -0
- package/dist/schema/linkSettings.d.ts +26 -0
- package/dist/schema/style/backgroundStyle.d.ts +5 -0
- package/dist/schema/style/elementStyle.d.ts +62 -0
- package/dist/schema/style/page-styles.d.ts +3 -0
- package/dist/schema/styleItems.d.ts +53 -0
- package/dist/schema/textItems.d.ts +10 -0
- package/dist/templates/elementSpec.d.ts +15 -0
- package/dist/templates/helpers.d.ts +9 -0
- package/dist/templates.d.ts +11 -0
- package/dist/templates.js +269 -0
- package/package.json +29 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @palmyit/elements
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Element definitions, semantic HTML templates, and CSS for Palmyit builder canvases and published sites.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
yarn install
|
|
@@ -8,6 +8,6 @@ yarn test
|
|
|
8
8
|
yarn build
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Published publicly to npmjs. Pages load the
|
|
11
|
+
Published publicly to npmjs. Pages load the CSS from jsDelivr (see [docs/README.md](docs/README.md)).
|
|
12
12
|
|
|
13
13
|
A push to `main` runs `.github/workflows/deploy-to-npmjs.yml`. Each commit bumps the patch version in `package.json`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Element definitions and shared schema helpers.
|
|
3
|
+
* Import from `@palmyit/elements/definitions` — not from the main CSS/runtime entry.
|
|
4
|
+
*/
|
|
5
|
+
export type { ElementType, DocumentAttributes, ElementHistory, ElementConfiguration, RegisteredElementConfiguration, } from './schema/elementConfiguration';
|
|
6
|
+
export { elementIdSchema, defineElement } from './schema/elementConfiguration';
|
|
7
|
+
export { elementRegistry, isElementType } from './schema/elementRegistry';
|
|
8
|
+
export type { ElementTemplate, TemplateContentItem, ApplyTemplateResult } from './schema/elementTemplates';
|
|
9
|
+
export { applyElementTemplate } from './schema/elementTemplates';
|
|
10
|
+
export type { StyleDefinition, StyleItem } from './schema/styleItems';
|
|
11
|
+
export { styleItemsSchema, styleOverrideItemsSchema, styleLabels, toStyleItems, toStyleOverrideItems, } from './schema/styleItems';
|
|
12
|
+
export { withDeviceSettings, type DeviceStyleOverrides, } from './schema/deviceSettings';
|
|
13
|
+
export { VISIBILITY_PROP_BY_DEVICE, LANDSCAPE_VISIBILITY_PROP_BY_DEVICE, VISIBILITY_PROPS, DEVICE_CHOICES, visibilityProp, isShownOn, shownDeviceCount, type DeviceVisibility, type DeviceVisibilityProp, type DeviceChoice, } from './schema/deviceVisibility';
|
|
14
|
+
export { defineLayoutElement } from './schema/layoutElementConfiguration';
|
|
15
|
+
export { layoutChildren } from './schema/layoutChildren';
|
|
16
|
+
export { textItemsSchema, toTextItems, type TextItem } from './schema/textItems';
|
|
17
|
+
export { defaultPageStyle, pageStyleKeys } from './schema/PPage/pPage.definition';
|
|
18
|
+
export { addressSchema } from './schema/addressSchema';
|
|
19
|
+
export { backgroundStyleDefinitions, colorValue } from './schema/backgroundStyleDefinitions';
|
|
20
|
+
export { elementStyleDefinitions, elementStyleSchema, lengthKeys, lengthValue, type LengthKey, } from './schema/elementStyleDefinitions';
|
|
21
|
+
export { defaultLinkSettings, linkHistoryLabels, linkSettingsShape, toLinkAttributes, type LinkSettings, } from './schema/linkSettings';
|
|
22
|
+
export { pButtonDefinition, defaultButtonProps, type ButtonStyle, type PButtonDocumentProps, } from './schema/PButton/pButton.definition';
|
|
23
|
+
export { pCheckboxDefinition, defaultCheckboxProps } from './schema/PCheckbox/pCheckbox.definition';
|
|
24
|
+
export { pContainerDefinition, defaultContainerStyle } from './schema/PContainer/pContainer.definition';
|
|
25
|
+
export { pDividerDefinition, defaultDividerProps, type DividerSize } from './schema/PDivider/pDivider.definition';
|
|
26
|
+
export { pIconDefinition, defaultIconProps } from './schema/PIcon/pIcon.definition';
|
|
27
|
+
export { pImageDefinition, defaultImageProps, IMAGE_LENGTH_KEYS, IMAGE_PREFIX, type ImageStyle, type ImageLengthKey, type PImageDocumentProps, } from './schema/PImage/pImage.definition';
|
|
28
|
+
export { pListDefinition, defaultListProps } from './schema/PList/pList.definition';
|
|
29
|
+
export { pPageDefinition, type PPageRootProps } from './schema/PPage/pPage.definition';
|
|
30
|
+
export { pRadioDefinition, defaultRadioProps } from './schema/PRadio/pRadio.definition';
|
|
31
|
+
export { pRichTextDefinition, defaultRichTextProps } from './schema/PRichText/pRichText.definition';
|
|
32
|
+
export { isFontFamily } from './schema/PRichText/richTextMarks';
|
|
33
|
+
export { normalizeRichText, richTextToPlainText } from './schema/PRichText/richTextOptions';
|
|
34
|
+
export { pSectionDefinition, defaultSectionStyle } from './schema/PSection/pSection.definition';
|
|
35
|
+
export { pSelectDefinition, defaultSelectProps } from './schema/PSelect/pSelect.definition';
|
|
36
|
+
export { pTableDefinition, defaultTableProps, fitRowsToHeaders, type TableRow } from './schema/PTable/pTable.definition';
|
|
37
|
+
export { pTextDefinition, defaultTextProps, textStyleDefinitions, TEXT_PREFIX, TEXT_DECORATIONS, TEXT_ALIGNS, TEXT_TRANSFORMS, FONT_WEIGHTS, type TextStyle, type PTextDocumentProps, type TextDecoration, type TextAlign, type TextTransform, type FontWeight, } from './schema/PText/pText.definition';
|
|
38
|
+
export { pTextAreaDefinition, defaultTextAreaProps } from './schema/PTextArea/pTextArea.definition';
|
|
39
|
+
export { pTextFieldDefinition, defaultTextFieldProps } from './schema/PTextField/pTextField.definition';
|
|
40
|
+
export { pVideoDefinition, defaultVideoProps } from './schema/PVideo/pVideo.definition';
|
|
41
|
+
export type { ColorValue } from './schema/Fields/ColorField/color-value';
|
|
42
|
+
export { toHexAlpha, fromHexAlpha } from './schema/Fields/ColorField/color-value';
|
|
43
|
+
export type { BackgroundStyle } from './schema/Fields/BackgroundField/backgroundValue';
|
|
44
|
+
export { isSafeGradientArgs, gradientToCss } from './schema/Fields/BackgroundField/backgroundValue';
|
|
45
|
+
export { FONT_STYLES, type FontStyle } from './schema/Fields/FontStyleField';
|
|
46
|
+
export { NO_ICON, isOutlineIconName, labelForIcon } from './schema/Fields/IconPicker/iconCatalog';
|
|
47
|
+
export { BORDER_LINE_STYLES, FLEX_DIRECTIONS, FLEX_WRAPS, FLEX_JUSTIFY_CONTENTS, FLEX_ALIGN_ITEMS, FLEX_ALIGN_CONTENTS, defaultElementStyle, LENGTH_PATTERN, sanitizeLength, sanitizeAutoAsZero, sanitizeMaxLength, sanitizeBorderWidth, elementStyleToCssVariables, type BorderLineStyle, type FlexDirection, type FlexWrap, type FlexJustifyContent, type FlexAlignItems, type FlexAlignContent, type ElementLayout, type ElementOverflow, type GridColumnCount, type ElementStyleKind, type ElementStyle, } from './schema/style/elementStyle';
|
|
48
|
+
export { backgroundStyleToCssVariables } from './schema/style/backgroundStyle';
|
|
49
|
+
export { colorValueToCss, textSizeToCss } from './schema/style/page-styles';
|
|
50
|
+
export { builderDevices, builderViewports, deviceForWidth, orientationForWidth, type DeviceName, type Orientation, type ViewportSize, type BuilderDevice, } from './schema/device/devices';
|
|
51
|
+
export { deviceStyleProp, deviceOverride, changedStyle, resolveDeviceStyle, type DeviceStyleProp, type DeviceStyles, } from './schema/device/deviceStyle';
|