@makeswift/runtime 0.1.1 → 0.1.2

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/dist/index.es3.js CHANGED
@@ -57,7 +57,7 @@ const Link = forwardRef(function Link2(_a, ref) {
57
57
  const page = usePage(link && link.type === "OPEN_PAGE" ? link.payload.pageId : null);
58
58
  const elementKey = (link == null ? void 0 : link.type) === "SCROLL_TO_ELEMENT" ? (_a2 = link.payload.elementIdConfig) == null ? void 0 : _a2.elementKey : null;
59
59
  const elementId = useElementId(elementKey);
60
- let href = "";
60
+ let href = "#";
61
61
  let target;
62
62
  let block;
63
63
  if (link) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.es3.js","sources":["../src/components/hooks/usePage.ts","../src/components/shared/Link/index.tsx"],"sourcesContent":["import { useQuery } from '../../api/react'\nimport { PAGE_PATHNAMES_BY_ID } from '../utils/queries'\n\ntype Page = {\n id: string\n pathname: string\n}\n\nexport function usePage(pageId: string | null | undefined): Page | null | undefined {\n const { error, data = {} } = useQuery(PAGE_PATHNAMES_BY_ID, {\n skip: pageId == null,\n variables: { ids: [pageId] },\n })\n\n if (pageId == null || error != null) return null\n\n const { pagePathnamesById: [page] = [] } = data\n\n return page\n}\n","import { ComponentPropsWithoutRef, forwardRef, MouseEvent } from 'react'\nimport scrollIntoView from 'scroll-into-view-if-needed'\nimport NextLink from 'next/link'\n\nimport { LinkValue as LinkPropControllerValue } from '../../../prop-controllers/descriptors'\nimport { usePage } from '../../hooks'\nimport { useElementId } from '../../../runtimes/react'\n\ntype BaseProps = {\n link?: LinkPropControllerValue\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => unknown\n}\n\ntype Props = BaseProps & Omit<ComponentPropsWithoutRef<'a'>, keyof BaseProps>\n\nexport const Link = forwardRef<HTMLAnchorElement, Props>(function Link(\n { link, onClick = () => {}, ...restOfProps }: Props,\n ref,\n) {\n const page = usePage(link && link.type === 'OPEN_PAGE' ? link.payload.pageId : null)\n const elementKey =\n link?.type === 'SCROLL_TO_ELEMENT' ? link.payload.elementIdConfig?.elementKey : null\n const elementId = useElementId(elementKey)\n\n let href = ''\n let target: '_blank' | '_self' | undefined\n let block: 'start' | 'center' | 'end' | undefined\n\n if (link) {\n switch (link.type) {\n case 'OPEN_PAGE': {\n if (page) href = `/${page.pathname}`\n\n target = link.payload.openInNewTab ? '_blank' : '_self'\n\n break\n }\n\n case 'OPEN_URL': {\n href = link.payload.url\n\n target = link.payload.openInNewTab ? '_blank' : '_self'\n\n break\n }\n\n case 'SEND_EMAIL': {\n const { to, subject = '', body = '' } = link.payload\n\n if (to != null) href = `mailto:${to}?subject=${subject}&body=${body}`\n\n break\n }\n\n case 'CALL_PHONE': {\n href = `tel:${link.payload.phoneNumber}`\n\n break\n }\n\n case 'SCROLL_TO_ELEMENT': {\n href = `#${elementId ?? ''}`\n block = link.payload.block\n\n break\n }\n\n default:\n throw new RangeError(`Invalid link type \"${(link as any).type}.\"`)\n }\n }\n\n function handleClick(event: MouseEvent<HTMLAnchorElement>) {\n onClick(event)\n\n if (event.defaultPrevented) return\n\n /**\n * When we introduced `next/link` instead of just `a` element slate no longer prevented link from navigating within\n * content mode. This is a hack to compensate for what would be expected as slate's default behavior.\n * On upgrade of slate this can be reevaluated.\n */\n if (event.currentTarget.isContentEditable) return event.preventDefault()\n\n if (link && link.type === 'SCROLL_TO_ELEMENT') {\n let hash: string | undefined\n\n try {\n hash = new URL(`http://www.example.com/${href}`).hash\n } catch (error) {\n console.error(`Link received invalid href: ${href}`, error)\n }\n\n if (href != null && href === hash) {\n event.preventDefault()\n const view = event.view as unknown as Window\n\n scrollIntoView(view.document.querySelector(hash)!, {\n behavior: 'smooth',\n block,\n })\n\n if (view.location.hash !== hash) view.history.pushState({}, '', hash)\n }\n }\n }\n\n return (\n <NextLink href={href}>\n {/* eslint-disable-next-line */}\n <a {...restOfProps} ref={ref} target={target} onClick={handleClick} />\n </NextLink>\n )\n})\n"],"names":["Link","forwardRef","ref","link","onClick","restOfProps","page","usePage","type","payload","pageId","elementKey","elementIdConfig","elementId","useElementId","href","target","block","pathname","openInNewTab","url","to","subject","body","phoneNumber","RangeError","handleClick","event","defaultPrevented","currentTarget","isContentEditable","preventDefault","hash","URL","error","view","scrollIntoView","document","querySelector","behavior","location","history","pushState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,iBAAiB,QAA4D;AAClF,QAAM,EAAE,OAAO,OAAO,CAAC,MAAM,SAAS,sBAAsB;AAAA,IAC1D,MAAM,UAAU;AAAA,IAChB,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE;AAAA,EAAA,CAC5B;AAEG,MAAA,UAAU,QAAQ,SAAS;AAAa,WAAA;AAE5C,QAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAO,MAAA;AAEpC,SAAA;AACT;ACJaA,MAAAA,OAAOC,WAAqC,eACvD,IACAC,KACA;AAFA,eAAEC;AAAAA;AAAAA,IAAMC,UAAU,MAAM;AAAA,IAAE;AAAA,MAA1B,IAA+BC,wBAA/B,IAA+BA;AAAAA,IAA7BF;AAAAA,IAAMC;AAAAA;;AAGFE,QAAAA,OAAOC,QAAQJ,QAAQA,KAAKK,SAAS,cAAcL,KAAKM,QAAQC,SAAS,IAA3D;AACpB,QAAMC,aACJR,8BAAMK,UAAS,sBAAsBL,YAAKM,QAAQG,oBAAbT,oBAA8BQ,aAAa;AAC5EE,QAAAA,YAAYC,aAAaH,UAAD;AAE1BI,MAAAA,OAAO;AACPC,MAAAA;AACAC,MAAAA;AAEJ,MAAId,MAAM;AACAA,YAAAA,KAAKK;AAAAA,WACN,aAAa;AACZF,YAAAA;AAAMS,iBAAQ,IAAGT,KAAKY;AAEjBf,iBAAAA,KAAKM,QAAQU,eAAe,WAAW;AAEhD;AAAA,MACD;AAAA,WAEI,YAAY;AACfJ,eAAOZ,KAAKM,QAAQW;AAEXjB,iBAAAA,KAAKM,QAAQU,eAAe,WAAW;AAEhD;AAA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index.es3.js","sources":["../src/components/hooks/usePage.ts","../src/components/shared/Link/index.tsx"],"sourcesContent":["import { useQuery } from '../../api/react'\nimport { PAGE_PATHNAMES_BY_ID } from '../utils/queries'\n\ntype Page = {\n id: string\n pathname: string\n}\n\nexport function usePage(pageId: string | null | undefined): Page | null | undefined {\n const { error, data = {} } = useQuery(PAGE_PATHNAMES_BY_ID, {\n skip: pageId == null,\n variables: { ids: [pageId] },\n })\n\n if (pageId == null || error != null) return null\n\n const { pagePathnamesById: [page] = [] } = data\n\n return page\n}\n","import { ComponentPropsWithoutRef, forwardRef, MouseEvent } from 'react'\nimport scrollIntoView from 'scroll-into-view-if-needed'\nimport NextLink from 'next/link'\n\nimport { LinkValue as LinkPropControllerValue } from '../../../prop-controllers/descriptors'\nimport { usePage } from '../../hooks'\nimport { useElementId } from '../../../runtimes/react'\n\ntype BaseProps = {\n link?: LinkPropControllerValue\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => unknown\n}\n\ntype Props = BaseProps & Omit<ComponentPropsWithoutRef<'a'>, keyof BaseProps>\n\nexport const Link = forwardRef<HTMLAnchorElement, Props>(function Link(\n { link, onClick = () => {}, ...restOfProps }: Props,\n ref,\n) {\n const page = usePage(link && link.type === 'OPEN_PAGE' ? link.payload.pageId : null)\n const elementKey =\n link?.type === 'SCROLL_TO_ELEMENT' ? link.payload.elementIdConfig?.elementKey : null\n const elementId = useElementId(elementKey)\n\n let href = '#'\n let target: '_blank' | '_self' | undefined\n let block: 'start' | 'center' | 'end' | undefined\n\n if (link) {\n switch (link.type) {\n case 'OPEN_PAGE': {\n if (page) href = `/${page.pathname}`\n\n target = link.payload.openInNewTab ? '_blank' : '_self'\n\n break\n }\n\n case 'OPEN_URL': {\n href = link.payload.url\n\n target = link.payload.openInNewTab ? '_blank' : '_self'\n\n break\n }\n\n case 'SEND_EMAIL': {\n const { to, subject = '', body = '' } = link.payload\n\n if (to != null) href = `mailto:${to}?subject=${subject}&body=${body}`\n\n break\n }\n\n case 'CALL_PHONE': {\n href = `tel:${link.payload.phoneNumber}`\n\n break\n }\n\n case 'SCROLL_TO_ELEMENT': {\n href = `#${elementId ?? ''}`\n block = link.payload.block\n\n break\n }\n\n default:\n throw new RangeError(`Invalid link type \"${(link as any).type}.\"`)\n }\n }\n\n function handleClick(event: MouseEvent<HTMLAnchorElement>) {\n onClick(event)\n\n if (event.defaultPrevented) return\n\n /**\n * When we introduced `next/link` instead of just `a` element slate no longer prevented link from navigating within\n * content mode. This is a hack to compensate for what would be expected as slate's default behavior.\n * On upgrade of slate this can be reevaluated.\n */\n if (event.currentTarget.isContentEditable) return event.preventDefault()\n\n if (link && link.type === 'SCROLL_TO_ELEMENT') {\n let hash: string | undefined\n\n try {\n hash = new URL(`http://www.example.com/${href}`).hash\n } catch (error) {\n console.error(`Link received invalid href: ${href}`, error)\n }\n\n if (href != null && href === hash) {\n event.preventDefault()\n const view = event.view as unknown as Window\n\n scrollIntoView(view.document.querySelector(hash)!, {\n behavior: 'smooth',\n block,\n })\n\n if (view.location.hash !== hash) view.history.pushState({}, '', hash)\n }\n }\n }\n\n return (\n <NextLink href={href}>\n {/* eslint-disable-next-line */}\n <a {...restOfProps} ref={ref} target={target} onClick={handleClick} />\n </NextLink>\n )\n})\n"],"names":["Link","forwardRef","ref","link","onClick","restOfProps","page","usePage","type","payload","pageId","elementKey","elementIdConfig","elementId","useElementId","href","target","block","pathname","openInNewTab","url","to","subject","body","phoneNumber","RangeError","handleClick","event","defaultPrevented","currentTarget","isContentEditable","preventDefault","hash","URL","error","view","scrollIntoView","document","querySelector","behavior","location","history","pushState"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,iBAAiB,QAA4D;AAClF,QAAM,EAAE,OAAO,OAAO,CAAC,MAAM,SAAS,sBAAsB;AAAA,IAC1D,MAAM,UAAU;AAAA,IAChB,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE;AAAA,EAAA,CAC5B;AAEG,MAAA,UAAU,QAAQ,SAA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AsC;AACzDvB,YAAQuB,KAAD;AAEHA,QAAAA,MAAMC;AAAkB;AAOxBD,QAAAA,MAAME,cAAcC;AAAmB,aAAOH,MAAMI;AAEpD5B,QAAAA,QAAQA,KAAKK,SAAS,qBAAqB;AACzCwB,UAAAA;AAEA,UAAA;AACFA,eAAO,IAAIC,IAAK,0BAAyBlB,MAAlC,EAA0CiB;AAAAA,eAC1CE;AACCA,gBAAAA,MAAO,+BAA8BnB,QAAQmB,KAArD;AAAA,MACD;AAEGnB,UAAAA,QAAQ,QAAQA,SAASiB,MAAM;AACjCL,cAAMI,eAAN;AACMI,cAAAA,OAAOR,MAAMQ;AAEnBC,uBAAeD,KAAKE,SAASC,cAAcN,IAA5B,GAAoC;AAAA,UACjDO,UAAU;AAAA,UACVtB;AAAAA,QAAAA,CAFY;AAKVkB,YAAAA,KAAKK,SAASR,SAASA;AAAMG,eAAKM,QAAQC,UAAU,IAAI,IAAIV,IAA/B;AAAA,MAClC;AAAA,IACF;AAAA,EACF;AAED,6BACG,UAAD;AAAA,IAAU;AAAA,IAAV,oEAES3B;MAAa;AAAA,MAAU;AAAA,MAAgB,SAASqB;AAAAA,IAAAA,EAAvD;AAAA,EAAA,CAHJ;AAMD,CAlG6B;;"}
package/dist/style.cjs.js CHANGED
@@ -5,7 +5,8 @@ const StyleControlProperty = {
5
5
  Margin: "makeswift::controls::style::property::margin",
6
6
  Padding: "makeswift::controls::style::property::padding",
7
7
  Border: "makeswift::controls::style::property::border",
8
- BorderRadius: "makeswift::controls::style::property::border-radius"
8
+ BorderRadius: "makeswift::controls::style::property::border-radius",
9
+ TextStyle: "makeswift::controls::style::property::text-style"
9
10
  };
10
11
  const StyleControlDefaultProperties = [
11
12
  StyleControlProperty.Width,
@@ -16,7 +17,8 @@ const AllStyleControlProperties = [
16
17
  StyleControlProperty.Margin,
17
18
  StyleControlProperty.Padding,
18
19
  StyleControlProperty.Border,
19
- StyleControlProperty.BorderRadius
20
+ StyleControlProperty.BorderRadius,
21
+ StyleControlProperty.TextStyle
20
22
  ];
21
23
  function Style(params) {
22
24
  var _a;
@@ -32,6 +34,7 @@ Style.Margin = StyleControlProperty.Margin;
32
34
  Style.Padding = StyleControlProperty.Padding;
33
35
  Style.Border = StyleControlProperty.Border;
34
36
  Style.BorderRadius = StyleControlProperty.BorderRadius;
37
+ Style.TextStyle = StyleControlProperty.TextStyle;
35
38
  exports.Style = Style;
36
39
  exports.StyleControlProperty = StyleControlProperty;
37
40
  exports.StyleControlType = StyleControlType;
@@ -1 +1 @@
1
- {"version":3,"file":"style.cjs.js","sources":["../src/controls/style.ts"],"sourcesContent":["import { ColorData, ResponsiveValue } from './types'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n *\n * @todos\n * - Add additional units\n * - Rename `value` field to `amount` or a more descriptive name representative of the \"distance\"\n * represented by a CSS length\n */\nexport type LengthData = { value: number; unit: 'px' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */\nexport type PercentageData = { value: number; unit: '%' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */\nexport type LengthPercentageData = LengthData | PercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/width */\nexport type WidthPropertyData = LengthPercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */\nexport type MarginLonghandPropertyData = LengthData | 'auto'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type MarginPropertyData = {\n marginTop: MarginLonghandPropertyData | null | undefined\n marginRight: MarginLonghandPropertyData | null | undefined\n marginBottom: MarginLonghandPropertyData | null | undefined\n marginLeft: MarginLonghandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */\nexport type PaddingLonghandPropertyData = LengthData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type PaddingPropertyData = {\n paddingTop: PaddingLonghandPropertyData | null | undefined\n paddingRight: PaddingLonghandPropertyData | null | undefined\n paddingBottom: PaddingLonghandPropertyData | null | undefined\n paddingLeft: PaddingLonghandPropertyData | null | undefined\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\n */\ntype BorderStyle = 'dotted' | 'dashed' | 'solid'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties\n *\n * @todos\n * - Change `width` to be a `Length`\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderSideShorthandPropertyData = {\n width: number | null | undefined\n style: BorderStyle\n color?: ColorData | null\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderPropertyData = {\n borderTop: BorderSideShorthandPropertyData | null | undefined\n borderRight: BorderSideShorthandPropertyData | null | undefined\n borderBottom: BorderSideShorthandPropertyData | null | undefined\n borderLeft: BorderSideShorthandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */\nexport type BorderRadiusLonghandPropertyData = LengthPercentageData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderRadiusPropertyData = {\n borderTopLeftRadius: LengthPercentageData | null | undefined\n borderTopRightRadius: LengthPercentageData | null | undefined\n borderBottomRightRadius: LengthPercentageData | null | undefined\n borderBottomLeftRadius: LengthPercentageData | null | undefined\n}\n\nexport type StyleControlData = {\n width?: ResponsiveValue<WidthPropertyData>\n margin?: ResponsiveValue<MarginPropertyData>\n padding?: ResponsiveValue<PaddingPropertyData>\n border?: ResponsiveValue<BorderPropertyData>\n borderRadius?: ResponsiveValue<BorderRadiusPropertyData>\n}\n\nexport const StyleControlType = 'makeswift::controls::style'\n\nexport const StyleControlProperty = {\n Width: 'makeswift::controls::style::property::width',\n Margin: 'makeswift::controls::style::property::margin',\n Padding: 'makeswift::controls::style::property::padding',\n Border: 'makeswift::controls::style::property::border',\n BorderRadius: 'makeswift::controls::style::property::border-radius',\n} as const\n\nexport type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty]\n\ntype StyleControlParams = { properties?: StyleControlProperty[] }\n\nexport type StyleControlConfig = { properties: StyleControlProperty[] }\n\nconst StyleControlDefaultProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n]\n\nconst AllStyleControlProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n StyleControlProperty.Padding,\n StyleControlProperty.Border,\n StyleControlProperty.BorderRadius,\n]\n\nexport type StyleControlDefinition = {\n type: typeof StyleControlType\n config: StyleControlConfig\n}\n\n/**\n * @todos\n * - Add support for custom panel labels.\n * - Add support for default values. Internally, default values must be represented with the same\n * format as the underlying data so that controls can show these values.\n */\nexport function Style(params?: StyleControlParams): StyleControlDefinition {\n return {\n type: StyleControlType,\n config: { properties: params?.properties ?? StyleControlDefaultProperties },\n }\n}\n\nStyle.Default = StyleControlDefaultProperties\nStyle.All = AllStyleControlProperties\n\nStyle.Width = StyleControlProperty.Width\nStyle.Margin = StyleControlProperty.Margin\nStyle.Padding = StyleControlProperty.Padding\nStyle.Border = StyleControlProperty.Border\nStyle.BorderRadius = StyleControlProperty.BorderRadius\n"],"names":[],"mappings":";AAiHO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAChB;AAQA,MAAM,gCAAwD;AAAA,EAC5D,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,4BAAoD;AAAA,EACxD,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAaO,eAAe,QAAqD;;AAClE,SAAA;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,YAAY,uCAAQ,eAAR,YAAsB,8BAA8B;AAAA,EAAA;AAE9E;AAEA,MAAM,UAAU;AAChB,MAAM,MAAM;AAEZ,MAAM,QAAQ,qBAAqB;AACnC,MAAM,SAAS,qBAAqB;AACpC,MAAM,UAAU,qBAAqB;AACrC,MAAM,SAAS,qBAAqB;AACpC,MAAM,eAAe,qBAAqB;;;;"}
1
+ {"version":3,"file":"style.cjs.js","sources":["../src/controls/style.ts"],"sourcesContent":["import { ColorData, ResponsiveValue } from './types'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n *\n * @todos\n * - Add additional units\n * - Rename `value` field to `amount` or a more descriptive name representative of the \"distance\"\n * represented by a CSS length\n */\nexport type LengthData = { value: number; unit: 'px' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */\nexport type PercentageData = { value: number; unit: '%' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */\nexport type LengthPercentageData = LengthData | PercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/width */\nexport type WidthPropertyData = LengthPercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */\nexport type MarginLonghandPropertyData = LengthData | 'auto'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type MarginPropertyData = {\n marginTop: MarginLonghandPropertyData | null | undefined\n marginRight: MarginLonghandPropertyData | null | undefined\n marginBottom: MarginLonghandPropertyData | null | undefined\n marginLeft: MarginLonghandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */\nexport type PaddingLonghandPropertyData = LengthData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type PaddingPropertyData = {\n paddingTop: PaddingLonghandPropertyData | null | undefined\n paddingRight: PaddingLonghandPropertyData | null | undefined\n paddingBottom: PaddingLonghandPropertyData | null | undefined\n paddingLeft: PaddingLonghandPropertyData | null | undefined\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\n */\ntype BorderStyle = 'dotted' | 'dashed' | 'solid'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties\n *\n * @todos\n * - Change `width` to be a `Length`\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderSideShorthandPropertyData = {\n width: number | null | undefined\n style: BorderStyle\n color?: ColorData | null\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderPropertyData = {\n borderTop: BorderSideShorthandPropertyData | null | undefined\n borderRight: BorderSideShorthandPropertyData | null | undefined\n borderBottom: BorderSideShorthandPropertyData | null | undefined\n borderLeft: BorderSideShorthandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */\nexport type BorderRadiusLonghandPropertyData = LengthPercentageData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderRadiusPropertyData = {\n borderTopLeftRadius: LengthPercentageData | null | undefined\n borderTopRightRadius: LengthPercentageData | null | undefined\n borderBottomRightRadius: LengthPercentageData | null | undefined\n borderBottomLeftRadius: LengthPercentageData | null | undefined\n}\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-family\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontFamilyPropertyData = string | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type LetterSpacingPropertyData = number | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontSizePropertyData =\n | {\n value: number\n unit: 'px'\n }\n | null\n | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontWeightPropertyData = number | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform\n *\n * @todos\n * - Match the type with specification\n */\nexport type TextTransformPropertyData = 'uppercase'[]\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style\n *\n * @todos\n * - Match the type with specification\n */\nexport type FontStylePropertyData = 'italic'[]\n\n/**\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type TextStylePropertyData = {\n fontFamily?: FontFamilyPropertyData | null | undefined\n letterSpacing: LetterSpacingPropertyData | null | undefined\n fontSize: FontSizePropertyData | null | undefined\n fontWeight: FontWeightPropertyData | null | undefined\n textTransform: TextTransformPropertyData\n fontStyle: FontStylePropertyData\n}\n\nexport type StyleControlData = {\n width?: ResponsiveValue<WidthPropertyData>\n margin?: ResponsiveValue<MarginPropertyData>\n padding?: ResponsiveValue<PaddingPropertyData>\n border?: ResponsiveValue<BorderPropertyData>\n borderRadius?: ResponsiveValue<BorderRadiusPropertyData>\n textStyle?: ResponsiveValue<TextStylePropertyData>\n}\n\nexport const StyleControlType = 'makeswift::controls::style'\n\nexport const StyleControlProperty = {\n Width: 'makeswift::controls::style::property::width',\n Margin: 'makeswift::controls::style::property::margin',\n Padding: 'makeswift::controls::style::property::padding',\n Border: 'makeswift::controls::style::property::border',\n BorderRadius: 'makeswift::controls::style::property::border-radius',\n TextStyle: 'makeswift::controls::style::property::text-style',\n} as const\n\nexport type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty]\n\ntype StyleControlParams = { properties?: StyleControlProperty[] }\n\nexport type StyleControlConfig = { properties: StyleControlProperty[] }\n\nconst StyleControlDefaultProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n]\n\nconst AllStyleControlProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n StyleControlProperty.Padding,\n StyleControlProperty.Border,\n StyleControlProperty.BorderRadius,\n StyleControlProperty.TextStyle,\n]\n\nexport type StyleControlDefinition = {\n type: typeof StyleControlType\n config: StyleControlConfig\n}\n\n/**\n * @todos\n * - Add support for custom panel labels.\n * - Add support for default values. Internally, default values must be represented with the same\n * format as the underlying data so that controls can show these values.\n */\nexport function Style(params?: StyleControlParams): StyleControlDefinition {\n return {\n type: StyleControlType,\n config: { properties: params?.properties ?? StyleControlDefaultProperties },\n }\n}\n\nStyle.Default = StyleControlDefaultProperties\nStyle.All = AllStyleControlProperties\n\nStyle.Width = StyleControlProperty.Width\nStyle.Margin = StyleControlProperty.Margin\nStyle.Padding = StyleControlProperty.Padding\nStyle.Border = StyleControlProperty.Border\nStyle.BorderRadius = StyleControlProperty.BorderRadius\nStyle.TextStyle = StyleControlProperty.TextStyle\n"],"names":[],"mappings":";AA0LO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,WAAW;AACb;AAQA,MAAM,gCAAwD;AAAA,EAC5D,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,4BAAoD;AAAA,EACxD,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAaO,eAAe,QAAqD;;AAClE,SAAA;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,YAAY,uCAAQ,eAAR,YAAsB,8BAA8B;AAAA,EAAA;AAE9E;AAEA,MAAM,UAAU;AAChB,MAAM,MAAM;AAEZ,MAAM,QAAQ,qBAAqB;AACnC,MAAM,SAAS,qBAAqB;AACpC,MAAM,UAAU,qBAAqB;AACrC,MAAM,SAAS,qBAAqB;AACpC,MAAM,eAAe,qBAAqB;AAC1C,MAAM,YAAY,qBAAqB;;;;"}
package/dist/style.es.js CHANGED
@@ -4,7 +4,8 @@ const StyleControlProperty = {
4
4
  Margin: "makeswift::controls::style::property::margin",
5
5
  Padding: "makeswift::controls::style::property::padding",
6
6
  Border: "makeswift::controls::style::property::border",
7
- BorderRadius: "makeswift::controls::style::property::border-radius"
7
+ BorderRadius: "makeswift::controls::style::property::border-radius",
8
+ TextStyle: "makeswift::controls::style::property::text-style"
8
9
  };
9
10
  const StyleControlDefaultProperties = [
10
11
  StyleControlProperty.Width,
@@ -15,7 +16,8 @@ const AllStyleControlProperties = [
15
16
  StyleControlProperty.Margin,
16
17
  StyleControlProperty.Padding,
17
18
  StyleControlProperty.Border,
18
- StyleControlProperty.BorderRadius
19
+ StyleControlProperty.BorderRadius,
20
+ StyleControlProperty.TextStyle
19
21
  ];
20
22
  function Style(params) {
21
23
  var _a;
@@ -31,5 +33,6 @@ Style.Margin = StyleControlProperty.Margin;
31
33
  Style.Padding = StyleControlProperty.Padding;
32
34
  Style.Border = StyleControlProperty.Border;
33
35
  Style.BorderRadius = StyleControlProperty.BorderRadius;
36
+ Style.TextStyle = StyleControlProperty.TextStyle;
34
37
  export { StyleControlType as S, StyleControlProperty as a, Style as b };
35
38
  //# sourceMappingURL=style.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.es.js","sources":["../src/controls/style.ts"],"sourcesContent":["import { ColorData, ResponsiveValue } from './types'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n *\n * @todos\n * - Add additional units\n * - Rename `value` field to `amount` or a more descriptive name representative of the \"distance\"\n * represented by a CSS length\n */\nexport type LengthData = { value: number; unit: 'px' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */\nexport type PercentageData = { value: number; unit: '%' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */\nexport type LengthPercentageData = LengthData | PercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/width */\nexport type WidthPropertyData = LengthPercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */\nexport type MarginLonghandPropertyData = LengthData | 'auto'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type MarginPropertyData = {\n marginTop: MarginLonghandPropertyData | null | undefined\n marginRight: MarginLonghandPropertyData | null | undefined\n marginBottom: MarginLonghandPropertyData | null | undefined\n marginLeft: MarginLonghandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */\nexport type PaddingLonghandPropertyData = LengthData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type PaddingPropertyData = {\n paddingTop: PaddingLonghandPropertyData | null | undefined\n paddingRight: PaddingLonghandPropertyData | null | undefined\n paddingBottom: PaddingLonghandPropertyData | null | undefined\n paddingLeft: PaddingLonghandPropertyData | null | undefined\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\n */\ntype BorderStyle = 'dotted' | 'dashed' | 'solid'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties\n *\n * @todos\n * - Change `width` to be a `Length`\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderSideShorthandPropertyData = {\n width: number | null | undefined\n style: BorderStyle\n color?: ColorData | null\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderPropertyData = {\n borderTop: BorderSideShorthandPropertyData | null | undefined\n borderRight: BorderSideShorthandPropertyData | null | undefined\n borderBottom: BorderSideShorthandPropertyData | null | undefined\n borderLeft: BorderSideShorthandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */\nexport type BorderRadiusLonghandPropertyData = LengthPercentageData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderRadiusPropertyData = {\n borderTopLeftRadius: LengthPercentageData | null | undefined\n borderTopRightRadius: LengthPercentageData | null | undefined\n borderBottomRightRadius: LengthPercentageData | null | undefined\n borderBottomLeftRadius: LengthPercentageData | null | undefined\n}\n\nexport type StyleControlData = {\n width?: ResponsiveValue<WidthPropertyData>\n margin?: ResponsiveValue<MarginPropertyData>\n padding?: ResponsiveValue<PaddingPropertyData>\n border?: ResponsiveValue<BorderPropertyData>\n borderRadius?: ResponsiveValue<BorderRadiusPropertyData>\n}\n\nexport const StyleControlType = 'makeswift::controls::style'\n\nexport const StyleControlProperty = {\n Width: 'makeswift::controls::style::property::width',\n Margin: 'makeswift::controls::style::property::margin',\n Padding: 'makeswift::controls::style::property::padding',\n Border: 'makeswift::controls::style::property::border',\n BorderRadius: 'makeswift::controls::style::property::border-radius',\n} as const\n\nexport type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty]\n\ntype StyleControlParams = { properties?: StyleControlProperty[] }\n\nexport type StyleControlConfig = { properties: StyleControlProperty[] }\n\nconst StyleControlDefaultProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n]\n\nconst AllStyleControlProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n StyleControlProperty.Padding,\n StyleControlProperty.Border,\n StyleControlProperty.BorderRadius,\n]\n\nexport type StyleControlDefinition = {\n type: typeof StyleControlType\n config: StyleControlConfig\n}\n\n/**\n * @todos\n * - Add support for custom panel labels.\n * - Add support for default values. Internally, default values must be represented with the same\n * format as the underlying data so that controls can show these values.\n */\nexport function Style(params?: StyleControlParams): StyleControlDefinition {\n return {\n type: StyleControlType,\n config: { properties: params?.properties ?? StyleControlDefaultProperties },\n }\n}\n\nStyle.Default = StyleControlDefaultProperties\nStyle.All = AllStyleControlProperties\n\nStyle.Width = StyleControlProperty.Width\nStyle.Margin = StyleControlProperty.Margin\nStyle.Padding = StyleControlProperty.Padding\nStyle.Border = StyleControlProperty.Border\nStyle.BorderRadius = StyleControlProperty.BorderRadius\n"],"names":[],"mappings":"AAiHO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAChB;AAQA,MAAM,gCAAwD;AAAA,EAC5D,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,4BAAoD;AAAA,EACxD,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAaO,eAAe,QAAqD;AAxCpE;AAyCE,SAAA;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,YAAY,uCAAQ,eAAR,YAAsB,8BAA8B;AAAA,EAAA;AAE9E;AAEA,MAAM,UAAU;AAChB,MAAM,MAAM;AAEZ,MAAM,QAAQ,qBAAqB;AACnC,MAAM,SAAS,qBAAqB;AACpC,MAAM,UAAU,qBAAqB;AACrC,MAAM,SAAS,qBAAqB;AACpC,MAAM,eAAe,qBAAqB;;"}
1
+ {"version":3,"file":"style.es.js","sources":["../src/controls/style.ts"],"sourcesContent":["import { ColorData, ResponsiveValue } from './types'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n *\n * @todos\n * - Add additional units\n * - Rename `value` field to `amount` or a more descriptive name representative of the \"distance\"\n * represented by a CSS length\n */\nexport type LengthData = { value: number; unit: 'px' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */\nexport type PercentageData = { value: number; unit: '%' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */\nexport type LengthPercentageData = LengthData | PercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/width */\nexport type WidthPropertyData = LengthPercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */\nexport type MarginLonghandPropertyData = LengthData | 'auto'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type MarginPropertyData = {\n marginTop: MarginLonghandPropertyData | null | undefined\n marginRight: MarginLonghandPropertyData | null | undefined\n marginBottom: MarginLonghandPropertyData | null | undefined\n marginLeft: MarginLonghandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */\nexport type PaddingLonghandPropertyData = LengthData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type PaddingPropertyData = {\n paddingTop: PaddingLonghandPropertyData | null | undefined\n paddingRight: PaddingLonghandPropertyData | null | undefined\n paddingBottom: PaddingLonghandPropertyData | null | undefined\n paddingLeft: PaddingLonghandPropertyData | null | undefined\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\n */\ntype BorderStyle = 'dotted' | 'dashed' | 'solid'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties\n *\n * @todos\n * - Change `width` to be a `Length`\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderSideShorthandPropertyData = {\n width: number | null | undefined\n style: BorderStyle\n color?: ColorData | null\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderPropertyData = {\n borderTop: BorderSideShorthandPropertyData | null | undefined\n borderRight: BorderSideShorthandPropertyData | null | undefined\n borderBottom: BorderSideShorthandPropertyData | null | undefined\n borderLeft: BorderSideShorthandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */\nexport type BorderRadiusLonghandPropertyData = LengthPercentageData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderRadiusPropertyData = {\n borderTopLeftRadius: LengthPercentageData | null | undefined\n borderTopRightRadius: LengthPercentageData | null | undefined\n borderBottomRightRadius: LengthPercentageData | null | undefined\n borderBottomLeftRadius: LengthPercentageData | null | undefined\n}\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-family\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontFamilyPropertyData = string | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type LetterSpacingPropertyData = number | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontSizePropertyData =\n | {\n value: number\n unit: 'px'\n }\n | null\n | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontWeightPropertyData = number | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform\n *\n * @todos\n * - Match the type with specification\n */\nexport type TextTransformPropertyData = 'uppercase'[]\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style\n *\n * @todos\n * - Match the type with specification\n */\nexport type FontStylePropertyData = 'italic'[]\n\n/**\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type TextStylePropertyData = {\n fontFamily?: FontFamilyPropertyData | null | undefined\n letterSpacing: LetterSpacingPropertyData | null | undefined\n fontSize: FontSizePropertyData | null | undefined\n fontWeight: FontWeightPropertyData | null | undefined\n textTransform: TextTransformPropertyData\n fontStyle: FontStylePropertyData\n}\n\nexport type StyleControlData = {\n width?: ResponsiveValue<WidthPropertyData>\n margin?: ResponsiveValue<MarginPropertyData>\n padding?: ResponsiveValue<PaddingPropertyData>\n border?: ResponsiveValue<BorderPropertyData>\n borderRadius?: ResponsiveValue<BorderRadiusPropertyData>\n textStyle?: ResponsiveValue<TextStylePropertyData>\n}\n\nexport const StyleControlType = 'makeswift::controls::style'\n\nexport const StyleControlProperty = {\n Width: 'makeswift::controls::style::property::width',\n Margin: 'makeswift::controls::style::property::margin',\n Padding: 'makeswift::controls::style::property::padding',\n Border: 'makeswift::controls::style::property::border',\n BorderRadius: 'makeswift::controls::style::property::border-radius',\n TextStyle: 'makeswift::controls::style::property::text-style',\n} as const\n\nexport type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty]\n\ntype StyleControlParams = { properties?: StyleControlProperty[] }\n\nexport type StyleControlConfig = { properties: StyleControlProperty[] }\n\nconst StyleControlDefaultProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n]\n\nconst AllStyleControlProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n StyleControlProperty.Padding,\n StyleControlProperty.Border,\n StyleControlProperty.BorderRadius,\n StyleControlProperty.TextStyle,\n]\n\nexport type StyleControlDefinition = {\n type: typeof StyleControlType\n config: StyleControlConfig\n}\n\n/**\n * @todos\n * - Add support for custom panel labels.\n * - Add support for default values. Internally, default values must be represented with the same\n * format as the underlying data so that controls can show these values.\n */\nexport function Style(params?: StyleControlParams): StyleControlDefinition {\n return {\n type: StyleControlType,\n config: { properties: params?.properties ?? StyleControlDefaultProperties },\n }\n}\n\nStyle.Default = StyleControlDefaultProperties\nStyle.All = AllStyleControlProperties\n\nStyle.Width = StyleControlProperty.Width\nStyle.Margin = StyleControlProperty.Margin\nStyle.Padding = StyleControlProperty.Padding\nStyle.Border = StyleControlProperty.Border\nStyle.BorderRadius = StyleControlProperty.BorderRadius\nStyle.TextStyle = StyleControlProperty.TextStyle\n"],"names":[],"mappings":"AA0LO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,WAAW;AACb;AAQA,MAAM,gCAAwD;AAAA,EAC5D,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,4BAAoD;AAAA,EACxD,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAaO,eAAe,QAAqD;AA1CpE;AA2CE,SAAA;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,YAAY,uCAAQ,eAAR,YAAsB,8BAA8B;AAAA,EAAA;AAE9E;AAEA,MAAM,UAAU;AAChB,MAAM,MAAM;AAEZ,MAAM,QAAQ,qBAAqB;AACnC,MAAM,SAAS,qBAAqB;AACpC,MAAM,UAAU,qBAAqB;AACrC,MAAM,SAAS,qBAAqB;AACpC,MAAM,eAAe,qBAAqB;AAC1C,MAAM,YAAY,qBAAqB;;"}
@@ -95,12 +95,75 @@ export declare type BorderRadiusPropertyData = {
95
95
  borderBottomRightRadius: LengthPercentageData | null | undefined;
96
96
  borderBottomLeftRadius: LengthPercentageData | null | undefined;
97
97
  };
98
+ /**
99
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
100
+ *
101
+ * @todos
102
+ * - Remove `null` from possible values of longhand properties
103
+ * - Remove `undefined` from possible values and make fields optional
104
+ */
105
+ export declare type FontFamilyPropertyData = string | null | undefined;
106
+ /**
107
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing
108
+ *
109
+ * @todos
110
+ * - Remove `null` from possible values of longhand properties
111
+ * - Remove `undefined` from possible values and make fields optional
112
+ */
113
+ export declare type LetterSpacingPropertyData = number | null | undefined;
114
+ /**
115
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
116
+ *
117
+ * @todos
118
+ * - Remove `null` from possible values of longhand properties
119
+ * - Remove `undefined` from possible values and make fields optional
120
+ */
121
+ export declare type FontSizePropertyData = {
122
+ value: number;
123
+ unit: 'px';
124
+ } | null | undefined;
125
+ /**
126
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
127
+ *
128
+ * @todos
129
+ * - Remove `null` from possible values of longhand properties
130
+ * - Remove `undefined` from possible values and make fields optional
131
+ */
132
+ export declare type FontWeightPropertyData = number | null | undefined;
133
+ /**
134
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform
135
+ *
136
+ * @todos
137
+ * - Match the type with specification
138
+ */
139
+ export declare type TextTransformPropertyData = 'uppercase'[];
140
+ /**
141
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
142
+ *
143
+ * @todos
144
+ * - Match the type with specification
145
+ */
146
+ export declare type FontStylePropertyData = 'italic'[];
147
+ /**
148
+ * @todos
149
+ * - Remove `null` from possible values of longhand properties
150
+ * - Remove `undefined` from possible values and make fields optional
151
+ */
152
+ export declare type TextStylePropertyData = {
153
+ fontFamily?: FontFamilyPropertyData | null | undefined;
154
+ letterSpacing: LetterSpacingPropertyData | null | undefined;
155
+ fontSize: FontSizePropertyData | null | undefined;
156
+ fontWeight: FontWeightPropertyData | null | undefined;
157
+ textTransform: TextTransformPropertyData;
158
+ fontStyle: FontStylePropertyData;
159
+ };
98
160
  export declare type StyleControlData = {
99
161
  width?: ResponsiveValue<WidthPropertyData>;
100
162
  margin?: ResponsiveValue<MarginPropertyData>;
101
163
  padding?: ResponsiveValue<PaddingPropertyData>;
102
164
  border?: ResponsiveValue<BorderPropertyData>;
103
165
  borderRadius?: ResponsiveValue<BorderRadiusPropertyData>;
166
+ textStyle?: ResponsiveValue<TextStylePropertyData>;
104
167
  };
105
168
  export declare const StyleControlType = "makeswift::controls::style";
106
169
  export declare const StyleControlProperty: {
@@ -109,6 +172,7 @@ export declare const StyleControlProperty: {
109
172
  readonly Padding: "makeswift::controls::style::property::padding";
110
173
  readonly Border: "makeswift::controls::style::property::border";
111
174
  readonly BorderRadius: "makeswift::controls::style::property::border-radius";
175
+ readonly TextStyle: "makeswift::controls::style::property::text-style";
112
176
  };
113
177
  export declare type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty];
114
178
  declare type StyleControlParams = {
@@ -136,6 +200,7 @@ export declare namespace Style {
136
200
  var Padding: "makeswift::controls::style::property::padding";
137
201
  var Border: "makeswift::controls::style::property::border";
138
202
  var BorderRadius: "makeswift::controls::style::property::border-radius";
203
+ var TextStyle: "makeswift::controls::style::property::text-style";
139
204
  }
140
205
  export {};
141
206
  //# sourceMappingURL=style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/controls/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEpD;;;;;;;GAOG;AACH,oBAAY,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAA;AAEtD,uEAAuE;AACvE,oBAAY,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,CAAA;AAEzD,8EAA8E;AAC9E,oBAAY,oBAAoB,GAAG,UAAU,GAAG,cAAc,CAAA;AAE9D,kEAAkE;AAClE,oBAAY,iBAAiB,GAAG,oBAAoB,CAAA;AAEpD,0FAA0F;AAC1F,oBAAY,0BAA0B,GAAG,UAAU,GAAG,MAAM,CAAA;AAE5D;;;;;;GAMG;AACH,oBAAY,kBAAkB,GAAG;IAC/B,SAAS,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,CAAA;IACxD,WAAW,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,CAAA;IAC1D,YAAY,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,CAAA;IAC3D,UAAU,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,CAAA;CAC1D,CAAA;AAED,2FAA2F;AAC3F,oBAAY,2BAA2B,GAAG,UAAU,CAAA;AAEpD;;;;;;GAMG;AACH,oBAAY,mBAAmB,GAAG;IAChC,UAAU,EAAE,2BAA2B,GAAG,IAAI,GAAG,SAAS,CAAA;IAC1D,YAAY,EAAE,2BAA2B,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5D,aAAa,EAAE,2BAA2B,GAAG,IAAI,GAAG,SAAS,CAAA;IAC7D,WA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AAA;IAC5C,OAAO,CAAC,EAAE,eAAe,CAAC,mBAAmB,CAAC,CAAA;IAC9C,MAAM,CAAC,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAA;IAC5C,YAAY,CAAC,EAAE,eAAe,CAAC,wBAAwB,CAAC,CAAA;IACxD,SAAS,CAAC,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAA;CACnD,CAAA;AAED,eAAO,MAAM,gBAAgB,+BAA+B,CAAA;AAE5D,eAAO,MAAM,oBAAoB;;;;;;;CAOvB,CAAA;AAEV,oBAAY,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAA;AAEjG,aAAK,kBAAkB,GAAG;IAAE,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAAA;AAEjE,oBAAY,kBAAkB,GAAG;IAAE,UAAU,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAAA;AAgBvE,oBAAY,sBAAsB,GAAG;IACnC,IAAI,EAAE,OAAO,gBAAgB,CAAA;IAC7B,MAAM,EAAE,kBAAkB,CAAA;CAC3B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,sBAAsB,CAKzE;yBALe,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../../src/runtimes/react/controls/style.ts"],"names":[],"mappings":"AASA,OAAO,EAIL,gBAAgB,EAChB,sBAAsB,EAGvB,MAAM,mBAAmB,CAAA;AAmG1B,oBAAY,0BAA0B,GAAG,MAAM,CAAA;AAE/C,wBAAgB,iBAAiB,CAC/B,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,EAC9C,iBAAiB,EAAE,sBAAsB,GACxC,0BAA0B,CAY5B"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../../src/runtimes/react/controls/style.ts"],"names":[],"mappings":"AASA,OAAO,EAKL,gBAAgB,EA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