UNPKG

payload-lexical-typography

Version:
127 lines (121 loc) 4.32 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var index_exports = {}; __export(index_exports, { TextColorFeature: () => TextColorFeature, TextFontFamilyFeature: () => TextFontFamilyFeature, TextLetterSpacingFeature: () => TextLetterSpacingFeature, TextLineHeightFeature: () => TextLineHeightFeature, TextSizeFeature: () => TextSizeFeature }); module.exports = __toCommonJS(index_exports); // src/features/textColor/feature.server.ts var import_richtext_lexical = require("@payloadcms/richtext-lexical"); var TextColorFeature = (0, import_richtext_lexical.createServerFeature)({ feature({ props }) { return { ClientFeature: "payload-lexical-typography/client#TextColorClientFeature", clientFeatureProps: { colors: props?.colors ?? [], colorPicker: props?.colorPicker, hideAttribution: props?.hideAttribution ?? false, listView: props?.listView } }; }, key: "textColor" }); // src/features/textSize/feature.server.ts var import_richtext_lexical2 = require("@payloadcms/richtext-lexical"); var TextSizeFeature = (0, import_richtext_lexical2.createServerFeature)({ feature({ props }) { return { ClientFeature: "payload-lexical-typography/client#TextSizeClientFeature", clientFeatureProps: { hideAttribution: props?.hideAttribution, sizes: props?.sizes, method: props?.method, scroll: props?.scroll, customSize: props?.customSize } }; }, key: "textSize" }); // src/features/textLetterSpacing/feature.server.ts var import_richtext_lexical3 = require("@payloadcms/richtext-lexical"); var TextLetterSpacingFeature = (0, import_richtext_lexical3.createServerFeature)({ feature({ props }) { return { ClientFeature: "payload-lexical-typography/client#TextLetterSpacingClientFeature", clientFeatureProps: { hideAttribution: props?.hideAttribution, spacings: props?.spacings, method: props?.method, scroll: props?.scroll, customSpacing: props?.customSpacing } }; }, key: "textLetterSpacing" }); // src/features/textLineHeight/feature.server.ts var import_richtext_lexical4 = require("@payloadcms/richtext-lexical"); var TextLineHeightFeature = (0, import_richtext_lexical4.createServerFeature)({ feature({ props }) { return { ClientFeature: "payload-lexical-typography/client#TextLineHeightClientFeature", clientFeatureProps: { hideAttribution: props?.hideAttribution, lineHeights: props?.lineHeights, scroll: props?.scroll, customLineHeight: props?.customLineHeight, method: props?.method } }; }, key: "textLineHeight" }); // src/features/textFontFamily/feature.server.ts var import_richtext_lexical5 = require("@payloadcms/richtext-lexical"); var TextFontFamilyFeature = (0, import_richtext_lexical5.createServerFeature)({ feature({ props }) { return { ClientFeature: "payload-lexical-typography/client#TextFontFamilyClientFeature", clientFeatureProps: { hideAttribution: props?.hideAttribution, fontFamilies: props?.fontFamilies, method: props?.method, scroll: props?.scroll, customFontFamily: props?.customFontFamily } }; }, key: "textFontFamily" }); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { TextColorFeature, TextFontFamilyFeature, TextLetterSpacingFeature, TextLineHeightFeature, TextSizeFeature }); //# sourceMappingURL=index.cjs.map