diff --git a/packages/editor-sample/package-lock.json b/packages/editor-sample/package-lock.json index bca2d04..2e86aed 100644 --- a/packages/editor-sample/package-lock.json +++ b/packages/editor-sample/package-lock.json @@ -12,18 +12,18 @@ "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.15.10", "@mui/material": "^5.15.10", - "@usewaypoint/block-avatar": "^0.0.1", - "@usewaypoint/block-button": "^0.0.2", - "@usewaypoint/block-columns-container": "^0.0.2", - "@usewaypoint/block-container": "^0.0.1", - "@usewaypoint/block-divider": "^0.0.3", - "@usewaypoint/block-heading": "^0.0.2", - "@usewaypoint/block-html": "^0.0.2", - "@usewaypoint/block-image": "^0.0.4", - "@usewaypoint/block-spacer": "^0.0.2", - "@usewaypoint/block-text": "^0.0.2", - "@usewaypoint/document-core": "^0.0.4", - "@usewaypoint/email-builder": "^0.0.3", + "@usewaypoint/block-avatar": "^0.0.3", + "@usewaypoint/block-button": "^0.0.3", + "@usewaypoint/block-columns-container": "^0.0.3", + "@usewaypoint/block-container": "^0.0.2", + "@usewaypoint/block-divider": "^0.0.4", + "@usewaypoint/block-heading": "^0.0.3", + "@usewaypoint/block-html": "^0.0.3", + "@usewaypoint/block-image": "^0.0.5", + "@usewaypoint/block-spacer": "^0.0.3", + "@usewaypoint/block-text": "^0.0.4", + "@usewaypoint/document-core": "^0.0.6", + "@usewaypoint/email-builder": "^0.0.5", "highlight.js": "^11.9.0", "prettier": "^3.2.5", "react": "^18.2.0", @@ -1878,121 +1878,134 @@ "dev": true }, "node_modules/@usewaypoint/block-avatar": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-avatar/-/block-avatar-0.0.1.tgz", - "integrity": "sha512-RHpynXK6iLbejoZN8k+OXIaJGU22LZWHWcW9nEdsHwPaHxSbwh7UPcBrTntC5zRqMYDZlF7u3iYpSg02O4bxRQ==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-avatar/-/block-avatar-0.0.3.tgz", + "integrity": "sha512-3BM6P4ztMmqDbSijtVQqI1canRkcENOEHZ2X9BYNv8BZGJbmitTrzANvwmmYXfFEuWPCAyABvujdZds15Zg8Qg==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-button": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-button/-/block-button-0.0.2.tgz", - "integrity": "sha512-WzWlJoJBiVfI3Iak9JPey7u/hJIkxXuhuAI6Y10ef795Panyr1GxQbdH2//fZtajjGJ1SjJStXpz6nPEd8wArg==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-button/-/block-button-0.0.3.tgz", + "integrity": "sha512-LXSI3FmCTv13voYX4wdHY7iJdsfyRfpDJZCFKSun5EF1j9FXrqMDGScpk/yokopkQWvWkYXQNAne7W0yWhRQlg==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-columns-container": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-columns-container/-/block-columns-container-0.0.2.tgz", - "integrity": "sha512-W5rstBOb/uLJ0L43zilUbQEoc+H+2jA8L8RVlCt4unvZsaqYGdcyaqZ6bs6qpeHjB2LtzLvFEcaqSuevhg3uRQ==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-columns-container/-/block-columns-container-0.0.3.tgz", + "integrity": "sha512-r5jaojU1Fr6Svtl0a9dDlBHgslJQ04M+XaXaEO+GZ12+35fdAirpLkrEhuyBIA1FFXzRTG740wkbkr++iv1kuA==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-container": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-container/-/block-container-0.0.1.tgz", - "integrity": "sha512-DsxXVVKLWv86CbQhCAbnvRDe/wJ0sj5XNma5hb0l1p7YqK42NVxKCRPF1Bw6m2WhEcXZFbz+8CIxHqjo6p1QIw==", + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-container/-/block-container-0.0.2.tgz", + "integrity": "sha512-li9GVdiahVpJ+MNRdkoCkP6/hBTdcpaLRGpaFBSQRkVt+cYAeB7qPNIo+242hUvVTm5Qky8ceGLDVblGYSZb7A==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-divider": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-divider/-/block-divider-0.0.3.tgz", - "integrity": "sha512-ZtjBWVakxUg+YbI0yWIX/TO0mmj8pjSUqK/o6Je5bx+rfETXaWlxRTwhZGWMNnYeY1sTjIlcbg2zGgdmmgxvXg==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-divider/-/block-divider-0.0.4.tgz", + "integrity": "sha512-q54ydWvKdg7Zwc4hzIwE6i/mC8dFYxfPRACEEEyu2dvSNa9cbKFIsPD9ipVSntK+Ib3Ml84uT4aHQmOlzP6hZA==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-heading": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-heading/-/block-heading-0.0.2.tgz", - "integrity": "sha512-l5tCcyfYAp+sta93ZXs1pmz+F/3W6XP2aiyAr/6uVpV2mwL7MloWUlpHRzwZEEyIW/jIJwYkNexabRLrxK181A==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-heading/-/block-heading-0.0.3.tgz", + "integrity": "sha512-1dMrf1U34nq2FuwTUfsq+hBOdLQz1H+lVMEH9xvyCq5I7nSXCzpeo7QgumZ3zZEHtu3QgSEGafJaZyrj2paC0w==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-html": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-html/-/block-html-0.0.2.tgz", - "integrity": "sha512-QEaMF1DRk+MgJiC8s4TfQe4eBpJghzriIPyS/+hxRVAiDwbOmRencaPRZ4JpDBi34sVNwLvRJZa5KvUFN4w6hg==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-html/-/block-html-0.0.3.tgz", + "integrity": "sha512-ZI9oYDibMzs5y/YzfvUwuUBzHDKHOIjiStiVCvlmIA+VtJTycqT8X/ECjn+KmwesLTg5DhG07CC4WY2SL3AnJw==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-image": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-image/-/block-image-0.0.4.tgz", - "integrity": "sha512-QNslGaV4zrgXj+VtbAktT7QBUxoelIyDMOgQtF8HsZzkfl66S28MtwwofodQpzKRtUrtegQ9o9hpL5zgjQUv0w==", + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-image/-/block-image-0.0.5.tgz", + "integrity": "sha512-b66jAXF79idsrIRc2QoBlZctIXdqg/qOAL7/QvKvENZH2KmuXoZhEUx+Z7sACvEQD/VI0u7TK5msDsA5S0/oVQ==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-spacer": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-spacer/-/block-spacer-0.0.2.tgz", - "integrity": "sha512-pH+QFmE2e0ULZeEGwh70qOtSKBdvmq/yue3IVPzx05fHymjr3fV/os1eSgEN2SRCcOC02wu3MvFX5LbV+vz4sQ==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-spacer/-/block-spacer-0.0.3.tgz", + "integrity": "sha512-CCcMtwcpeC2rHvawQdh5f0Hez7o4xA/edWl/6I3RuA6Yb6STyyrGjmPFs2ZxHQsLOGUK+0OvBenuHlSTCZwuuA==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/block-text": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@usewaypoint/block-text/-/block-text-0.0.2.tgz", - "integrity": "sha512-iX4hxq/Rql5syTuXQYB3BGm6vZDKns83FUHH66y06pQuSLPR7i0YvokOLm2Ez96S+i6NOh3XVTg/wcx2Hg2FgA==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-text/-/block-text-0.0.4.tgz", + "integrity": "sha512-c+CiTkwFSrclPxRx9Gt+nE6KkAmY5tWDumBa3qQnVrxdCjCmGK0qOj9avm9vqf9hd5JxaX4tgWhG/oi2u/zMxA==", + "dependencies": { + "markdown-parser-react": "^1.1.2" + }, "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/document-core": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@usewaypoint/document-core/-/document-core-0.0.4.tgz", - "integrity": "sha512-xlPM5zexUhuRDsSwPVZ8cvemmsffLDb4wxlaAVMXi4ayO7ZHHrc9SiLiBkR8cnfQ3OvnHlZaO8YDsGmnckGqYw==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@usewaypoint/document-core/-/document-core-0.0.6.tgz", + "integrity": "sha512-Hg10gszVCZRJhA4nIWwAi2rTXuoxPL+ATMe0hU243PFBIUZOwDIQus4XZSeoHsenMCq1uBFCRiFW4hl2+tVwgA==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" } }, "node_modules/@usewaypoint/email-builder": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@usewaypoint/email-builder/-/email-builder-0.0.3.tgz", - "integrity": "sha512-WqUzWOcR9DTuEOFupjEzbgx2exxC0rZibf/9oJgPTYE7IPm3hEkTBQql6ttwzPjb3gwxP6nCUIGKF3ltMcQwuA==", - "dependencies": { - "@usewaypoint/block-avatar": "^0.0.1", - "@usewaypoint/block-button": "^0.0.2", - "@usewaypoint/block-columns-container": "^0.0.2", - "@usewaypoint/block-container": "^0.0.1", - "@usewaypoint/block-divider": "^0.0.3", - "@usewaypoint/block-heading": "^0.0.2", - "@usewaypoint/block-html": "^0.0.2", - "@usewaypoint/block-image": "^0.0.4", - "@usewaypoint/block-spacer": "^0.0.2", - "@usewaypoint/block-text": "^0.0.2", - "@usewaypoint/document-core": "^0.0.4" + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@usewaypoint/email-builder/-/email-builder-0.0.5.tgz", + "integrity": "sha512-D6Df5NXhsDlHi2WUx7sIgMOYXFmrtHmsd+IBwwuwmGY+1v+1UgnmdLql6GRQRnNPKFw8t6Vv5i5z+DhB4FfZYg==", + "dependencies": { + "@usewaypoint/block-avatar": "^0.0.3", + "@usewaypoint/block-button": "^0.0.3", + "@usewaypoint/block-columns-container": "^0.0.3", + "@usewaypoint/block-container": "^0.0.2", + "@usewaypoint/block-divider": "^0.0.4", + "@usewaypoint/block-heading": "^0.0.3", + "@usewaypoint/block-html": "^0.0.3", + "@usewaypoint/block-image": "^0.0.5", + "@usewaypoint/block-spacer": "^0.0.3", + "@usewaypoint/block-text": "^0.0.3", + "@usewaypoint/document-core": "^0.0.6" }, + "peerDependencies": { + "react": "^16 || ^17 || ^18", + "react-dom": "^16 || ^17 || ^18", + "zod": "^1 || ^2 || ^3" + } + }, + "node_modules/@usewaypoint/email-builder/node_modules/@usewaypoint/block-text": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@usewaypoint/block-text/-/block-text-0.0.3.tgz", + "integrity": "sha512-EcZ1q1rwCZgKlYBqXX8Clq7tNTQLGQ8lePvaI4+X8+t6tYXR/gDgH4glUVDDUraG7QQyZ1QRdSKMIi1DPfqc3w==", "peerDependencies": { "react": "^16 || ^17 || ^18", "zod": "^1 || ^2 || ^3" @@ -3034,6 +3047,14 @@ "node": ">=10" } }, + "node_modules/markdown-parser-react": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/markdown-parser-react/-/markdown-parser-react-1.1.2.tgz", + "integrity": "sha512-MNLHekU1xOwKZLJK4NMWJDL9pNnJdKx2jdsHfAF4+Y5rF4tD/S/OuNehd4X46/KcJzBfas19pePVcwQoibpeNg==", + "dependencies": { + "react": "^18.2.0" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", diff --git a/packages/editor-sample/package.json b/packages/editor-sample/package.json index 9440e73..bd40769 100644 --- a/packages/editor-sample/package.json +++ b/packages/editor-sample/package.json @@ -12,18 +12,18 @@ "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.15.10", "@mui/material": "^5.15.10", - "@usewaypoint/block-avatar": "^0.0.1", - "@usewaypoint/block-button": "^0.0.2", - "@usewaypoint/block-columns-container": "^0.0.2", - "@usewaypoint/block-container": "^0.0.1", - "@usewaypoint/block-divider": "^0.0.3", - "@usewaypoint/block-heading": "^0.0.2", - "@usewaypoint/block-html": "^0.0.2", - "@usewaypoint/block-image": "^0.0.4", - "@usewaypoint/block-spacer": "^0.0.2", - "@usewaypoint/block-text": "^0.0.2", - "@usewaypoint/document-core": "^0.0.4", - "@usewaypoint/email-builder": "^0.0.3", + "@usewaypoint/block-avatar": "^0.0.3", + "@usewaypoint/block-button": "^0.0.3", + "@usewaypoint/block-columns-container": "^0.0.3", + "@usewaypoint/block-container": "^0.0.2", + "@usewaypoint/block-divider": "^0.0.4", + "@usewaypoint/block-heading": "^0.0.3", + "@usewaypoint/block-html": "^0.0.3", + "@usewaypoint/block-image": "^0.0.5", + "@usewaypoint/block-spacer": "^0.0.3", + "@usewaypoint/block-text": "^0.0.4", + "@usewaypoint/document-core": "^0.0.6", + "@usewaypoint/email-builder": "^0.0.5", "highlight.js": "^11.9.0", "prettier": "^3.2.5", "react": "^18.2.0", diff --git a/packages/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.tsx b/packages/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.tsx index 126b60d..ca61a04 100644 --- a/packages/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.tsx +++ b/packages/editor-sample/src/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.tsx @@ -3,6 +3,7 @@ import React, { useState } from 'react'; import { TextProps, TextPropsSchema } from '@usewaypoint/block-text'; import BaseSidebarPanel from './helpers/BaseSidebarPanel'; +import BooleanInput from './helpers/inputs/BooleanInput'; import TextInput from './helpers/inputs/TextInput'; import MultiStylePropertyPanel from './helpers/style-inputs/MultiStylePropertyPanel'; @@ -31,6 +32,11 @@ export default function TextSidebarPanel({ data, setData }: TextSidebarPanelProp defaultValue={data.props?.text ?? ''} onChange={(text) => updateData({ ...data, props: { ...data.props, text } })} /> + updateData({ ...data, props: { ...data.props, markdown } })} + />