@frontify/guideline-blocks-settings 0.28.2 → 0.28.3
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 +6 -0
- package/dist/components/Attachments/AttachmentItem.es.js +67 -67
- package/dist/components/Attachments/AttachmentItem.es.js.map +1 -1
- package/dist/components/Attachments/Attachments.es.js +80 -80
- package/dist/components/Attachments/Attachments.es.js.map +1 -1
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js +67 -67
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +28 -28
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar.es.js +33 -33
- package/dist/components/BlockItemWrapper/Toolbar.es.js.map +1 -1
- package/dist/components/DownloadButton/DownloadButton.es.js +12 -12
- package/dist/components/DownloadButton/DownloadButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.es.js +12 -12
- package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -1
- package/dist/components/RichTextEditor/SerializedText.es.js +4 -4
- package/dist/components/RichTextEditor/SerializedText.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +9 -9
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +8 -8
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +6 -6
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js +10 -10
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js +13 -13
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js +18 -18
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +11 -11
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js +15 -15
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js +3 -3
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +40 -40
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +10 -10
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +4 -4
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +14 -14
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +14 -14
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +14 -14
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +20 -20
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +17 -17
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +17 -17
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +17 -17
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +18 -18
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +16 -16
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +19 -19
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +15 -15
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js +32 -32
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js +15 -15
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js +30 -30
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js +27 -27
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js +12 -12
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js +14 -14
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/styles.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/button.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/checkItemNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/default.es.js +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/default.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/nodes/link.es.js +5 -5
- package/dist/components/RichTextEditor/serializer/nodes/link.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.es.js.map +1 -1
- package/dist/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.es.js.map +1 -1
- package/dist/index.cjs.js +9 -35
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.umd.js +10 -36
- package/dist/index.umd.js.map +1 -1
- package/dist/utilities/react/getBackgroundColorStyles.es.js.map +1 -1
- package/dist/utilities/react/getBorderStyles.es.js.map +1 -1
- package/dist/utilities/react/getRadiusStyles.es.js.map +1 -1
- package/package.json +3 -2
- package/src/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.ts +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.tsx +2 -2
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.tsx +1 -1
- package/src/components/RichTextEditor/plugins/LinkPlugin/index.ts +2 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.tsx +1 -1
- package/src/components/RichTextEditor/plugins/styles.ts +1 -1
- package/src/components/RichTextEditor/serializer/nodes/button.ts +2 -1
- package/src/components/RichTextEditor/serializer/nodes/checkItemNode.ts +2 -1
- package/src/components/RichTextEditor/serializer/nodes/default.ts +3 -2
- package/src/components/RichTextEditor/serializer/nodes/link.ts +3 -2
- package/src/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.ts +1 -1
- package/src/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.ts +1 -1
- package/src/utilities/react/getBackgroundColorStyles.ts +2 -3
- package/src/utilities/react/getBorderStyles.ts +2 -3
- package/src/utilities/react/getRadiusStyles.ts +1 -1
- package/vite.config.ts +4 -2
- package/dist/_virtual/jsx-runtime.es.js +0 -5
- package/dist/_virtual/jsx-runtime.es.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.development.es.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.production.min.es.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBackgroundColorStyles.es.js","sources":["../../../src/utilities/react/getBackgroundColorStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { CSSProperties } from 'react';\
|
|
1
|
+
{"version":3,"file":"getBackgroundColorStyles.es.js","sources":["../../../src/utilities/react/getBackgroundColorStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSProperties } from 'react';\nimport type { Color } from '@frontify/fondue';\n\nimport { toRgbaString } from '../color';\n\nexport const getBackgroundColorStyles = (backgroundColor: Color): CSSProperties => ({\n backgroundColor: toRgbaString(backgroundColor),\n});\n"],"names":["getBackgroundColorStyles","backgroundColor","toRgbaString"],"mappings":";AAOa,MAAAA,IAA2B,CAACC,OAA2C;AAAA,EAChF,iBAAiBC,EAAaD,CAAe;AACjD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBorderStyles.es.js","sources":["../../../src/utilities/react/getBorderStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { CSSProperties } from 'react';\
|
|
1
|
+
{"version":3,"file":"getBorderStyles.es.js","sources":["../../../src/utilities/react/getBorderStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSProperties } from 'react';\nimport type { Color } from '@frontify/fondue';\n\nimport { BorderStyle, borderStyleMap } from '../../settings/types';\nimport { BORDER_COLOR_DEFAULT_VALUE } from '../../settings/defaultValues';\nimport { toRgbaString } from '../color';\n\nexport const getBorderStyles = (\n style = BorderStyle.Solid,\n borderWidth = '1px',\n color = BORDER_COLOR_DEFAULT_VALUE as Color,\n): CSSProperties => {\n return {\n borderStyle: borderStyleMap[style],\n borderWidth,\n borderColor: toRgbaString(color),\n };\n};\n"],"names":["getBorderStyles","style","BorderStyle","borderWidth","color","BORDER_COLOR_DEFAULT_VALUE","borderStyleMap","toRgbaString"],"mappings":";;;AASa,MAAAA,IAAkB,CAC3BC,IAAQC,EAAY,OACpBC,IAAc,OACdC,IAAQC,OAED;AAAA,EACH,aAAaC,EAAeL,CAAK;AAAA,EACjC,aAAAE;AAAA,EACA,aAAaI,EAAaH,CAAK;AAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRadiusStyles.es.js","sources":["../../../src/utilities/react/getRadiusStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { CSSProperties } from 'react';\nimport { Radius, radiusStyleMap } from '../../settings/types';\n\nexport const getRadiusStyles = (radiusChoice: Radius, hasRadius = false, radiusValue?: number): CSSProperties => ({\n borderRadius: hasRadius ? radiusValue : radiusStyleMap[radiusChoice],\n});\n"],"names":["getRadiusStyles","radiusChoice","hasRadius","radiusValue","radiusStyleMap"],"mappings":";AAKO,MAAMA,IAAkB,CAACC,GAAsBC,IAAY,IAAOC,OAAyC;AAAA,EAC9G,cAAcD,IAAYC,IAAcC,EAAeH,CAAY;AACvE;"}
|
|
1
|
+
{"version":3,"file":"getRadiusStyles.es.js","sources":["../../../src/utilities/react/getRadiusStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSProperties } from 'react';\nimport { Radius, radiusStyleMap } from '../../settings/types';\n\nexport const getRadiusStyles = (radiusChoice: Radius, hasRadius = false, radiusValue?: number): CSSProperties => ({\n borderRadius: hasRadius ? radiusValue : radiusStyleMap[radiusChoice],\n});\n"],"names":["getRadiusStyles","radiusChoice","hasRadius","radiusValue","radiusStyleMap"],"mappings":";AAKO,MAAMA,IAAkB,CAACC,GAAsBC,IAAY,IAAOC,OAAyC;AAAA,EAC9G,cAAcD,IAAYC,IAAcC,EAAeH,CAAY;AACvE;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontify/guideline-blocks-settings",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "Provides types and helpers for the guideline block development",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"typescript": "^5.1.6",
|
|
50
50
|
"vite": "^4.4.8",
|
|
51
51
|
"vite-plugin-dts": "^3.5.0",
|
|
52
|
+
"vite-plugin-externals": "^0.6.2",
|
|
52
53
|
"vitest": "^0.34.1"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"@dnd-kit/core": "^6.0.8",
|
|
57
58
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
58
59
|
"@dnd-kit/sortable": "^7.0.2",
|
|
59
|
-
"@frontify/fondue": "
|
|
60
|
+
"@frontify/fondue": "12.0.0-beta.296",
|
|
60
61
|
"@react-aria/focus": "^3.13.0",
|
|
61
62
|
"@react-stately/overlays": "^3.6.0",
|
|
62
63
|
"@udecode/plate": "^21",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { AppBridgeBlock } from '@frontify/app-bridge';
|
|
4
4
|
import { Plugin, PluginProps } from '@frontify/fondue';
|
|
5
5
|
import { RangeBeforeOptions, createPluginFactory } from '@udecode/plate';
|
|
6
|
-
import { CSSProperties } from 'react';
|
|
6
|
+
import type { CSSProperties } from 'react';
|
|
7
7
|
import { isValidUrl } from '../LinkPlugin/utils/url';
|
|
8
8
|
import { ButtonMarkupElement } from './ButtonMarkupElement';
|
|
9
9
|
import { ButtonButton } from './components/ButtonButton';
|
|
@@ -15,7 +15,7 @@ import { FC, ReactNode } from 'react';
|
|
|
15
15
|
import { LinkSelector } from '../../../shared/LinkSelector';
|
|
16
16
|
import { InsertModalStateProps } from './types';
|
|
17
17
|
|
|
18
|
-
type
|
|
18
|
+
type InsertModalProps = {
|
|
19
19
|
state: InsertModalStateProps;
|
|
20
20
|
onTextChange: (value: string) => void;
|
|
21
21
|
onUrlChange: (value: string) => void;
|
|
@@ -29,7 +29,7 @@ type Props = {
|
|
|
29
29
|
appBridge: AppBridgeBlock;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export const InsertModal: FC<
|
|
32
|
+
export const InsertModal: FC<InsertModalProps> = ({
|
|
33
33
|
state,
|
|
34
34
|
onTextChange,
|
|
35
35
|
onUrlChange,
|
package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { HTMLPropsAs, LinkRootProps, useElementProps } from '@udecode/plate';
|
|
4
|
-
import { MouseEvent } from 'react';
|
|
4
|
+
import type { MouseEvent } from 'react';
|
|
5
5
|
import { TLinkElement } from '../types';
|
|
6
6
|
import { BlockStyles } from '../../styles';
|
|
7
7
|
import { LINK_PLUGIN } from '../id';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
3
4
|
import { AppBridgeBlock } from '@frontify/app-bridge';
|
|
4
5
|
import { Plugin, PluginProps } from '@frontify/fondue';
|
|
5
6
|
import { createLinkPlugin as createPlateLinkPlugin, createPluginFactory } from '@udecode/plate';
|
|
7
|
+
|
|
6
8
|
import { CustomFloatingLink } from './FloatingLink/CustomFloatingLink';
|
|
7
9
|
import { LINK_PLUGIN } from './id';
|
|
8
10
|
import { LinkButton } from './LinkButton';
|
|
9
11
|
import { LinkMarkupElement } from './LinkMarkupElement';
|
|
10
12
|
import { isValidUrl } from './utils/url';
|
|
11
|
-
import { CSSProperties } from 'react';
|
|
12
13
|
import { BlockStyles } from '../styles';
|
|
13
14
|
|
|
14
15
|
export const createLinkPlugin = (appBridge: AppBridgeBlock) =>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { createParagraphPlugin as createPlateParagraphPlugin, createPluginFactory } from '@udecode/plate';
|
|
4
|
-
import { CSSProperties } from 'react';
|
|
4
|
+
import type { CSSProperties } from 'react';
|
|
5
5
|
import {
|
|
6
6
|
MarkupElement,
|
|
7
7
|
Plugin,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
3
4
|
import { TElement } from '@udecode/plate';
|
|
5
|
+
|
|
4
6
|
import { reactCssPropsToCss } from '../utlis/reactCssPropsToCss';
|
|
5
|
-
import { CSSProperties } from 'react';
|
|
6
7
|
import { BUTTON_PLUGIN } from '../../plugins';
|
|
7
8
|
|
|
8
9
|
export type ButtonStylesType = Record<string, Record<string, CSSProperties & { hover?: CSSProperties }>>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
3
4
|
import { merge } from '@frontify/fondue';
|
|
4
5
|
import { TElement } from '@udecode/plate';
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
import { reactCssPropsToCss } from '../utlis/reactCssPropsToCss';
|
|
7
8
|
|
|
8
9
|
export const checkItemNode = (
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
|
+
import { merge } from '@frontify/fondue';
|
|
3
5
|
import { TElement } from '@udecode/plate';
|
|
4
|
-
|
|
6
|
+
|
|
5
7
|
import { TextStyles } from '../../plugins';
|
|
6
8
|
import { reactCssPropsToCss } from '../utlis/reactCssPropsToCss';
|
|
7
|
-
import { merge } from '@frontify/fondue';
|
|
8
9
|
|
|
9
10
|
export const defaultNode = (node: TElement, children: string, styles: CSSProperties, defaultClassNames: string) => {
|
|
10
11
|
const defaultStyles = reactCssPropsToCss(styles);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
|
+
import escapeHtml from 'escape-html';
|
|
3
5
|
import { TElement } from '@udecode/plate';
|
|
6
|
+
|
|
4
7
|
import { LINK_PLUGIN } from '../../plugins/LinkPlugin/id';
|
|
5
8
|
import { TLinkElement } from '../../plugins/LinkPlugin/types';
|
|
6
9
|
import { reactCssPropsToCss } from '../utlis/reactCssPropsToCss';
|
|
7
|
-
import escapeHtml from 'escape-html';
|
|
8
|
-
import { CSSProperties } from 'react';
|
|
9
10
|
|
|
10
11
|
export const linkNode = (
|
|
11
12
|
node: TElement,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from '@udecode/plate';
|
|
26
26
|
import { serializeLeafToHtml } from './utlis/serializeLeafToHtml';
|
|
27
27
|
import { reactCssPropsToCss } from './utlis/reactCssPropsToCss';
|
|
28
|
-
import { CSSProperties } from 'react';
|
|
28
|
+
import type { CSSProperties } from 'react';
|
|
29
29
|
import { ButtonStylesType, buttonNode } from './nodes/button';
|
|
30
30
|
import { linkNode } from './nodes/link';
|
|
31
31
|
import { defaultNode } from './nodes/default';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { CSSProperties } from 'react';
|
|
4
|
-
|
|
5
|
-
import { Color } from '@frontify/fondue';
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
|
+
import type { Color } from '@frontify/fondue';
|
|
6
5
|
|
|
7
6
|
import { toRgbaString } from '../color';
|
|
8
7
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { CSSProperties } from 'react';
|
|
4
|
-
|
|
5
|
-
import { Color } from '@frontify/fondue';
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
|
+
import type { Color } from '@frontify/fondue';
|
|
6
5
|
|
|
7
6
|
import { BorderStyle, borderStyleMap } from '../../settings/types';
|
|
8
7
|
import { BORDER_COLOR_DEFAULT_VALUE } from '../../settings/defaultValues';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { CSSProperties } from 'react';
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
4
|
import { Radius, radiusStyleMap } from '../../settings/types';
|
|
5
5
|
|
|
6
6
|
export const getRadiusStyles = (radiusChoice: Radius, hasRadius = false, radiusValue?: number): CSSProperties => ({
|
package/vite.config.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* (c) Copyright Frontify Ltd., all rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { defineConfig } from 'vitest/config';
|
|
4
|
+
import react from '@vitejs/plugin-react';
|
|
4
5
|
import { PreRenderedAsset } from 'rollup';
|
|
5
6
|
import { dependencies as dependenciesMap, peerDependencies as peerDependenciesMap } from './package.json';
|
|
6
7
|
import { resolve } from 'path';
|
|
@@ -12,6 +13,7 @@ const peerDependencies = Object.keys(peerDependenciesMap);
|
|
|
12
13
|
export const globals = {
|
|
13
14
|
react: 'React',
|
|
14
15
|
'react-dom': 'ReactDOM',
|
|
16
|
+
'react-dom/client': 'ReactDOM',
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
const assetFileNames = (chunkInfo: PreRenderedAsset): string => {
|
|
@@ -22,7 +24,7 @@ const assetFileNames = (chunkInfo: PreRenderedAsset): string => {
|
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
export default defineConfig({
|
|
25
|
-
plugins: [dts({ insertTypesEntry: true, rollupTypes: true })],
|
|
27
|
+
plugins: [dts({ insertTypesEntry: true, rollupTypes: true }), react()],
|
|
26
28
|
resolve: {
|
|
27
29
|
mainFields: ['module', 'main'],
|
|
28
30
|
},
|
|
@@ -41,7 +43,7 @@ export default defineConfig({
|
|
|
41
43
|
sourcemap: true,
|
|
42
44
|
minify: true,
|
|
43
45
|
rollupOptions: {
|
|
44
|
-
external: [...dependencies, ...peerDependencies],
|
|
46
|
+
external: [...dependencies, ...peerDependencies, 'react-dom/client', 'react/jsx-runtime'],
|
|
45
47
|
output: [
|
|
46
48
|
{
|
|
47
49
|
name: 'GuidelineBlocksSettings',
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-runtime.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-jsx-runtime.development.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-jsx-runtime.production.min.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|