@supernova-studio/client 1.96.5 → 1.96.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +101428 -143199
- package/dist/index.d.ts +101428 -143199
- package/dist/index.js +489 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5607 -5217
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -9
- package/src/api/client.ts +62 -0
- package/src/api/conversion/analytics/index.ts +3 -0
- package/src/api/conversion/analytics/page-visits-to-comparison-dto.ts +65 -0
- package/src/api/conversion/analytics/page-visits-to-dto.ts +68 -0
- package/src/api/conversion/analytics/page-visits-to-heatmap-dto.ts +49 -0
- package/src/api/conversion/documentation/documentation-group-v1-to-dto.ts +114 -0
- package/src/api/conversion/documentation/documentation-group-v2-to-dto.ts +91 -0
- package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +52 -0
- package/src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts +34 -0
- package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +134 -0
- package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +69 -0
- package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +84 -0
- package/src/api/conversion/documentation/documentation-settings-to-dto.ts +14 -0
- package/src/api/conversion/documentation/index.ts +8 -0
- package/src/api/conversion/export/index.ts +1 -0
- package/src/api/conversion/export/pipeline.ts +27 -0
- package/src/api/conversion/index.ts +4 -0
- package/src/api/conversion/integrations/git.ts +37 -0
- package/src/api/conversion/integrations/index.ts +2 -0
- package/src/api/conversion/integrations/integration.ts +37 -0
- package/src/api/dto/access-tokens/access-token.ts +45 -0
- package/src/api/dto/access-tokens/index.ts +1 -0
- package/src/api/dto/aux/color.ts +7 -0
- package/src/api/dto/aux/index.ts +4 -0
- package/src/api/dto/aux/meta.ts +8 -0
- package/src/api/dto/aux/object-metadata.ts +29 -0
- package/src/api/dto/aux/pagination.ts +8 -0
- package/src/api/dto/bff/app-bootstrap-data.ts +20 -0
- package/src/api/dto/bff/index.ts +1 -0
- package/src/api/dto/collections/index.ts +1 -0
- package/src/api/dto/collections/token-collection.ts +32 -0
- package/src/api/dto/design-systems/brand.ts +44 -0
- package/src/api/dto/design-systems/code-component-usage.ts +52 -0
- package/src/api/dto/design-systems/code-component.ts +101 -0
- package/src/api/dto/design-systems/code-history.ts +43 -0
- package/src/api/dto/design-systems/code-scan.ts +29 -0
- package/src/api/dto/design-systems/code-snapshots.ts +46 -0
- package/src/api/dto/design-systems/component.ts +40 -0
- package/src/api/dto/design-systems/contact.ts +11 -0
- package/src/api/dto/design-systems/data-source.ts +216 -0
- package/src/api/dto/design-systems/design-system.ts +75 -0
- package/src/api/dto/design-systems/documentation-search.ts +31 -0
- package/src/api/dto/design-systems/elements-diff.ts +14 -0
- package/src/api/dto/design-systems/figma-variables.ts +122 -0
- package/src/api/dto/design-systems/file.ts +71 -0
- package/src/api/dto/design-systems/import-job.ts +62 -0
- package/src/api/dto/design-systems/index.ts +24 -0
- package/src/api/dto/design-systems/members.ts +52 -0
- package/src/api/dto/design-systems/redirects.ts +33 -0
- package/src/api/dto/design-systems/role.ts +11 -0
- package/src/api/dto/design-systems/stats.ts +20 -0
- package/src/api/dto/design-systems/storybook.ts +45 -0
- package/src/api/dto/design-systems/user-design-systems.ts +10 -0
- package/src/api/dto/design-systems/version-room.ts +12 -0
- package/src/api/dto/design-systems/version.ts +56 -0
- package/src/api/dto/design-systems/view.ts +45 -0
- package/src/api/dto/design-tokens/design-token.ts +78 -0
- package/src/api/dto/design-tokens/index.ts +1 -0
- package/src/api/dto/documentation/analytics-v2.ts +80 -0
- package/src/api/dto/documentation/analytics.ts +32 -0
- package/src/api/dto/documentation/anchor.ts +15 -0
- package/src/api/dto/documentation/approvals.ts +21 -0
- package/src/api/dto/documentation/block-definition.ts +28 -0
- package/src/api/dto/documentation/block.ts +6 -0
- package/src/api/dto/documentation/documentation-page-snapshot.ts +18 -0
- package/src/api/dto/documentation/documentation.ts +34 -0
- package/src/api/dto/documentation/index.ts +11 -0
- package/src/api/dto/documentation/link-preview.ts +23 -0
- package/src/api/dto/documentation/publish.ts +23 -0
- package/src/api/dto/documentation/room.ts +12 -0
- package/src/api/dto/elements/components/figma-component-group.ts +19 -0
- package/src/api/dto/elements/components/figma-component.ts +56 -0
- package/src/api/dto/elements/components/index.ts +2 -0
- package/src/api/dto/elements/documentation/configuration.ts +20 -0
- package/src/api/dto/elements/documentation/draft-state.ts +37 -0
- package/src/api/dto/elements/documentation/group-action.ts +108 -0
- package/src/api/dto/elements/documentation/group-v1.ts +35 -0
- package/src/api/dto/elements/documentation/group-v2.ts +117 -0
- package/src/api/dto/elements/documentation/hierarchy.ts +25 -0
- package/src/api/dto/elements/documentation/index.ts +16 -0
- package/src/api/dto/elements/documentation/item-configuration-v1.ts +24 -0
- package/src/api/dto/elements/documentation/item-configuration-v2.ts +14 -0
- package/src/api/dto/elements/documentation/metadata.ts +8 -0
- package/src/api/dto/elements/documentation/page-actions-v2.ts +138 -0
- package/src/api/dto/elements/documentation/page-content.ts +15 -0
- package/src/api/dto/elements/documentation/page-dependencies.ts +30 -0
- package/src/api/dto/elements/documentation/page-v1.ts +21 -0
- package/src/api/dto/elements/documentation/page-v2.ts +132 -0
- package/src/api/dto/elements/documentation/settings.ts +9 -0
- package/src/api/dto/elements/documentation/structure.ts +37 -0
- package/src/api/dto/elements/elements-action-v2.ts +125 -0
- package/src/api/dto/elements/figma-nodes/figma-node-structure.ts +27 -0
- package/src/api/dto/elements/figma-nodes/figma-node-v1.ts +32 -0
- package/src/api/dto/elements/figma-nodes/figma-node-v2.ts +32 -0
- package/src/api/dto/elements/figma-nodes/figma-node.ts +103 -0
- package/src/api/dto/elements/figma-nodes/index.ts +5 -0
- package/src/api/dto/elements/figma-nodes/node-actions-v2.ts +25 -0
- package/src/api/dto/elements/frame-node-structures/frame-node-structure.ts +17 -0
- package/src/api/dto/elements/frame-node-structures/index.ts +1 -0
- package/src/api/dto/elements/get-elements-v2.ts +27 -0
- package/src/api/dto/elements/index.ts +7 -0
- package/src/api/dto/elements/properties/index.ts +2 -0
- package/src/api/dto/elements/properties/property-definitions.ts +75 -0
- package/src/api/dto/elements/properties/property-values.ts +50 -0
- package/src/api/dto/events/forge-project.ts +51 -0
- package/src/api/dto/events/index.ts +2 -0
- package/src/api/dto/events/workspace.ts +81 -0
- package/src/api/dto/export/exporter-property.ts +114 -0
- package/src/api/dto/export/exporter.ts +115 -0
- package/src/api/dto/export/filter.ts +20 -0
- package/src/api/dto/export/index.ts +5 -0
- package/src/api/dto/export/job.ts +114 -0
- package/src/api/dto/export/pipeline.ts +60 -0
- package/src/api/dto/figma-components/assets/download.ts +30 -0
- package/src/api/dto/figma-components/assets/index.ts +1 -0
- package/src/api/dto/figma-components/index.ts +1 -0
- package/src/api/dto/figma-exporter/figma-node.ts +11 -0
- package/src/api/dto/figma-exporter/index.ts +1 -0
- package/src/api/dto/files/files.ts +94 -0
- package/src/api/dto/files/index.ts +1 -0
- package/src/api/dto/forge/agent.ts +38 -0
- package/src/api/dto/forge/artifact.ts +94 -0
- package/src/api/dto/forge/feature-messages.ts +551 -0
- package/src/api/dto/forge/feature-room.ts +12 -0
- package/src/api/dto/forge/figma-node.ts +117 -0
- package/src/api/dto/forge/index.ts +28 -0
- package/src/api/dto/forge/iteration-message-old.ts +43 -0
- package/src/api/dto/forge/knowledge-item.ts +67 -0
- package/src/api/dto/forge/memory.ts +67 -0
- package/src/api/dto/forge/participant.ts +44 -0
- package/src/api/dto/forge/project-action.ts +123 -0
- package/src/api/dto/forge/project-artifact-room.ts +12 -0
- package/src/api/dto/forge/project-artifact.ts +85 -0
- package/src/api/dto/forge/project-context-feedback.ts +141 -0
- package/src/api/dto/forge/project-context-override.ts +41 -0
- package/src/api/dto/forge/project-context-scope.ts +23 -0
- package/src/api/dto/forge/project-context-v2.ts +228 -0
- package/src/api/dto/forge/project-context.ts +72 -0
- package/src/api/dto/forge/project-feature.ts +86 -0
- package/src/api/dto/forge/project-figma-node.ts +9 -0
- package/src/api/dto/forge/project-file.ts +48 -0
- package/src/api/dto/forge/project-invitation.ts +46 -0
- package/src/api/dto/forge/project-iteration-old.ts +54 -0
- package/src/api/dto/forge/project-member.ts +67 -0
- package/src/api/dto/forge/project-room.ts +12 -0
- package/src/api/dto/forge/project-section.ts +37 -0
- package/src/api/dto/forge/project.ts +105 -0
- package/src/api/dto/forge/relation.ts +34 -0
- package/src/api/dto/forge/threads.ts +153 -0
- package/src/api/dto/index.ts +25 -0
- package/src/api/dto/liveblocks/auth-response.ts +7 -0
- package/src/api/dto/liveblocks/index.ts +1 -0
- package/src/api/dto/mcp/index.ts +1 -0
- package/src/api/dto/mcp/stream.ts +17 -0
- package/src/api/dto/notifications/index.ts +2 -0
- package/src/api/dto/notifications/notifications.ts +65 -0
- package/src/api/dto/notifications/settings.ts +10 -0
- package/src/api/dto/portal/index.ts +1 -0
- package/src/api/dto/portal/portal-settings.ts +45 -0
- package/src/api/dto/sandboxes/index.ts +1 -0
- package/src/api/dto/sandboxes/template.ts +143 -0
- package/src/api/dto/storybook-sites/index.ts +1 -0
- package/src/api/dto/storybook-sites/storybook-sites.ts +60 -0
- package/src/api/dto/themes/index.ts +2 -0
- package/src/api/dto/themes/override.ts +27 -0
- package/src/api/dto/themes/theme.ts +53 -0
- package/src/api/dto/threads/index.ts +1 -0
- package/src/api/dto/threads/threads.ts +280 -0
- package/src/api/dto/trail-events/index.ts +1 -0
- package/src/api/dto/trail-events/trail-events.ts +172 -0
- package/src/api/dto/users/authenticated-user.ts +92 -0
- package/src/api/dto/users/index.ts +2 -0
- package/src/api/dto/users/user.ts +27 -0
- package/src/api/dto/workspaces/billing.ts +156 -0
- package/src/api/dto/workspaces/enums.ts +13 -0
- package/src/api/dto/workspaces/git.ts +32 -0
- package/src/api/dto/workspaces/index.ts +15 -0
- package/src/api/dto/workspaces/integrations.ts +34 -0
- package/src/api/dto/workspaces/invitations.ts +47 -0
- package/src/api/dto/workspaces/ip-whitelist.ts +33 -0
- package/src/api/dto/workspaces/knowledge-items-search.ts +37 -0
- package/src/api/dto/workspaces/login-screen.ts +42 -0
- package/src/api/dto/workspaces/membership.ts +55 -0
- package/src/api/dto/workspaces/npm-registry.ts +62 -0
- package/src/api/dto/workspaces/products.ts +45 -0
- package/src/api/dto/workspaces/subscription.ts +170 -0
- package/src/api/dto/workspaces/transfer-ownership.ts +7 -0
- package/src/api/dto/workspaces/untyped-data.ts +35 -0
- package/src/api/dto/workspaces/workspace.ts +49 -0
- package/src/api/endpoints/auth-tokens.ts +28 -0
- package/src/api/endpoints/codegen/codegen.ts +16 -0
- package/src/api/endpoints/codegen/ds-pipelines.ts +37 -0
- package/src/api/endpoints/codegen/exporters.ts +54 -0
- package/src/api/endpoints/codegen/index.ts +5 -0
- package/src/api/endpoints/codegen/jobs.ts +15 -0
- package/src/api/endpoints/codegen/pipelines.ts +55 -0
- package/src/api/endpoints/design-system/analytics.ts +14 -0
- package/src/api/endpoints/design-system/bff.ts +13 -0
- package/src/api/endpoints/design-system/code-snapshots.ts +47 -0
- package/src/api/endpoints/design-system/contact.ts +12 -0
- package/src/api/endpoints/design-system/design-systems.ts +90 -0
- package/src/api/endpoints/design-system/figma-node-structures.ts +20 -0
- package/src/api/endpoints/design-system/index.ts +11 -0
- package/src/api/endpoints/design-system/members.ts +24 -0
- package/src/api/endpoints/design-system/redirects.ts +46 -0
- package/src/api/endpoints/design-system/sources.ts +80 -0
- package/src/api/endpoints/design-system/storybook.ts +28 -0
- package/src/api/endpoints/design-system/versions/brands.ts +45 -0
- package/src/api/endpoints/design-system/versions/documentation.ts +107 -0
- package/src/api/endpoints/design-system/versions/ds-components.ts +30 -0
- package/src/api/endpoints/design-system/versions/elements-action.ts +65 -0
- package/src/api/endpoints/design-system/versions/elements.ts +27 -0
- package/src/api/endpoints/design-system/versions/figma-component-groups.ts +13 -0
- package/src/api/endpoints/design-system/versions/figma-components.ts +15 -0
- package/src/api/endpoints/design-system/versions/figma-frame-structures.ts +13 -0
- package/src/api/endpoints/design-system/versions/files.ts +43 -0
- package/src/api/endpoints/design-system/versions/import-jobs.ts +13 -0
- package/src/api/endpoints/design-system/versions/index.ts +19 -0
- package/src/api/endpoints/design-system/versions/overrides.ts +17 -0
- package/src/api/endpoints/design-system/versions/property-definitions.ts +43 -0
- package/src/api/endpoints/design-system/versions/property-values.ts +25 -0
- package/src/api/endpoints/design-system/versions/stats.ts +12 -0
- package/src/api/endpoints/design-system/versions/themes.ts +35 -0
- package/src/api/endpoints/design-system/versions/token-collections.ts +13 -0
- package/src/api/endpoints/design-system/versions/token-groups.ts +30 -0
- package/src/api/endpoints/design-system/versions/tokens.ts +29 -0
- package/src/api/endpoints/design-system/versions/versions.ts +90 -0
- package/src/api/endpoints/feedback.ts +60 -0
- package/src/api/endpoints/files.ts +25 -0
- package/src/api/endpoints/forge/agents.ts +54 -0
- package/src/api/endpoints/forge/artifacts.ts +54 -0
- package/src/api/endpoints/forge/documents.ts +18 -0
- package/src/api/endpoints/forge/feature-artifacts.ts +39 -0
- package/src/api/endpoints/forge/feature-iterations.ts +49 -0
- package/src/api/endpoints/forge/feature-messages.ts +68 -0
- package/src/api/endpoints/forge/features.ts +63 -0
- package/src/api/endpoints/forge/forge.ts +38 -0
- package/src/api/endpoints/forge/index.ts +16 -0
- package/src/api/endpoints/forge/iteration-tags.ts +13 -0
- package/src/api/endpoints/forge/memory.ts +41 -0
- package/src/api/endpoints/forge/project-contexts.ts +49 -0
- package/src/api/endpoints/forge/project-files.ts +41 -0
- package/src/api/endpoints/forge/project-invitations.ts +39 -0
- package/src/api/endpoints/forge/project-iterations.ts +65 -0
- package/src/api/endpoints/forge/project-members.ts +55 -0
- package/src/api/endpoints/forge/projects.ts +56 -0
- package/src/api/endpoints/index.ts +13 -0
- package/src/api/endpoints/liveblocks.ts +14 -0
- package/src/api/endpoints/mcp/index.ts +1 -0
- package/src/api/endpoints/mcp/streams.ts +21 -0
- package/src/api/endpoints/sandboxes/builds.ts +30 -0
- package/src/api/endpoints/sandboxes/index.ts +3 -0
- package/src/api/endpoints/sandboxes/sandboxes.ts +13 -0
- package/src/api/endpoints/sandboxes/templates.ts +16 -0
- package/src/api/endpoints/storybook-sites.ts +42 -0
- package/src/api/endpoints/threads.ts +38 -0
- package/src/api/endpoints/users.ts +26 -0
- package/src/api/endpoints/workspaces/billing.ts +24 -0
- package/src/api/endpoints/workspaces/chat-threads.ts +95 -0
- package/src/api/endpoints/workspaces/index.ts +9 -0
- package/src/api/endpoints/workspaces/integrations.ts +15 -0
- package/src/api/endpoints/workspaces/invites.ts +34 -0
- package/src/api/endpoints/workspaces/knowledge-items.ts +59 -0
- package/src/api/endpoints/workspaces/members.ts +31 -0
- package/src/api/endpoints/workspaces/npm-register.ts +20 -0
- package/src/api/endpoints/workspaces/subscription.ts +31 -0
- package/src/api/endpoints/workspaces/workspaces.ts +84 -0
- package/src/api/index.ts +6 -0
- package/src/api/payloads/design-systems/code-snapshots.ts +27 -0
- package/src/api/payloads/design-systems/index.ts +3 -0
- package/src/api/payloads/design-systems/update-design-system.ts +42 -0
- package/src/api/payloads/design-systems/version.ts +29 -0
- package/src/api/payloads/documentation/analytics.ts +36 -0
- package/src/api/payloads/documentation/block-definitions.ts +18 -0
- package/src/api/payloads/documentation/design-data-doc-diff.ts +7 -0
- package/src/api/payloads/documentation/index.ts +3 -0
- package/src/api/payloads/export/index.ts +1 -0
- package/src/api/payloads/export/pipeline.ts +111 -0
- package/src/api/payloads/index.ts +6 -0
- package/src/api/payloads/liveblocks/auth.ts +7 -0
- package/src/api/payloads/liveblocks/index.ts +1 -0
- package/src/api/payloads/users/index.ts +1 -0
- package/src/api/payloads/users/notifications/index.ts +1 -0
- package/src/api/payloads/users/notifications/notification-settings.ts +17 -0
- package/src/api/payloads/workspaces/index.ts +2 -0
- package/src/api/payloads/workspaces/workspace-configuration.ts +62 -0
- package/src/api/payloads/workspaces/workspace-integrations.ts +35 -0
- package/src/api/transport/index.ts +2 -0
- package/src/api/transport/request-executor-error.ts +60 -0
- package/src/api/transport/request-executor.ts +94 -0
- package/src/events/design-system.ts +21 -0
- package/src/events/event.ts +6 -0
- package/src/events/index.ts +2 -0
- package/src/index.ts +5 -0
- package/src/sync/docs-local-action-executor.ts +412 -0
- package/src/sync/docs-structure-repo.ts +283 -0
- package/src/sync/index.ts +5 -0
- package/src/sync/project-content-repo.ts +215 -0
- package/src/sync/project-local-action-executor.ts +415 -0
- package/src/sync/types.ts +37 -0
- package/src/utils/figma.ts +72 -0
- package/src/utils/hash.ts +62 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/query.ts +41 -0
- package/src/utils/redirect-validation.ts +76 -0
- package/src/yjs/design-system-content/documentation-hierarchy.ts +35 -0
- package/src/yjs/design-system-content/index.ts +2 -0
- package/src/yjs/design-system-content/item-configuration.ts +62 -0
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +764 -0
- package/src/yjs/docs-editor/index.ts +7 -0
- package/src/yjs/docs-editor/list-tree-builder.ts +127 -0
- package/src/yjs/docs-editor/mock.ts +2271 -0
- package/src/yjs/docs-editor/model/block.ts +8 -0
- package/src/yjs/docs-editor/model/index.ts +2 -0
- package/src/yjs/docs-editor/model/page.ts +8 -0
- package/src/yjs/docs-editor/prosemirror/index.ts +3 -0
- package/src/yjs/docs-editor/prosemirror/inner-editor-schema.ts +145 -0
- package/src/yjs/docs-editor/prosemirror/main-editor-schema.ts +577 -0
- package/src/yjs/docs-editor/prosemirror/types.ts +19 -0
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +986 -0
- package/src/yjs/docs-editor/utils.ts +115 -0
- package/src/yjs/feature-room/backend.ts +36 -0
- package/src/yjs/feature-room/base.ts +109 -0
- package/src/yjs/feature-room/frontend.ts +53 -0
- package/src/yjs/feature-room/index.ts +3 -0
- package/src/yjs/forge-project-room/backend.ts +59 -0
- package/src/yjs/forge-project-room/base.ts +190 -0
- package/src/yjs/forge-project-room/index.ts +2 -0
- package/src/yjs/index.ts +7 -0
- package/src/yjs/thread-room/backend.ts +32 -0
- package/src/yjs/thread-room/base.ts +71 -0
- package/src/yjs/thread-room/frontend.ts +39 -0
- package/src/yjs/thread-room/index.ts +3 -0
- package/src/yjs/utils/index.ts +1 -0
- package/src/yjs/utils/key-value-storage.ts +57 -0
- package/src/yjs/version-room/backend.ts +101 -0
- package/src/yjs/version-room/base.ts +323 -0
- package/src/yjs/version-room/compute-dto.ts +387 -0
- package/src/yjs/version-room/frontend.ts +76 -0
- package/src/yjs/version-room/index.ts +6 -0
- package/src/yjs/version-room/types.ts +31 -0
- package/src/yjs/version-room/utils.ts +109 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import { Schema } from "prosemirror-model";
|
|
2
|
+
|
|
3
|
+
const pmSchemaJson = {
|
|
4
|
+
topNode: "doc",
|
|
5
|
+
nodes: {
|
|
6
|
+
paragraph: {
|
|
7
|
+
content: "inline*",
|
|
8
|
+
group: "block",
|
|
9
|
+
attrs: {
|
|
10
|
+
id: {
|
|
11
|
+
default: null,
|
|
12
|
+
},
|
|
13
|
+
definitionId: {
|
|
14
|
+
default: "io.supernova.block.rich-text",
|
|
15
|
+
},
|
|
16
|
+
variantId: {
|
|
17
|
+
default: "default",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
parseDOM: [
|
|
21
|
+
{
|
|
22
|
+
tag: "p",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
reactComponent: {
|
|
27
|
+
group: "block",
|
|
28
|
+
atom: true,
|
|
29
|
+
draggable: true,
|
|
30
|
+
attrs: {
|
|
31
|
+
count: {
|
|
32
|
+
default: 0,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
parseDOM: [
|
|
36
|
+
{
|
|
37
|
+
tag: "react-component",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
tableRow: {
|
|
42
|
+
tableRole: "row",
|
|
43
|
+
content: "(tableCell | tableHeader)*",
|
|
44
|
+
parseDOM: [
|
|
45
|
+
{
|
|
46
|
+
tag: "tr",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
table: {
|
|
51
|
+
tableRole: "table",
|
|
52
|
+
content: "tableRow+",
|
|
53
|
+
group: "defaultTable",
|
|
54
|
+
isolating: true,
|
|
55
|
+
parseDOM: [
|
|
56
|
+
{
|
|
57
|
+
tag: "table",
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
tableCell: {
|
|
62
|
+
tableRole: "cell",
|
|
63
|
+
content: "(paragraph|image)+",
|
|
64
|
+
isolating: true,
|
|
65
|
+
attrs: {
|
|
66
|
+
id: {
|
|
67
|
+
default: null,
|
|
68
|
+
},
|
|
69
|
+
textAlign: {
|
|
70
|
+
default: "left",
|
|
71
|
+
},
|
|
72
|
+
colspan: {
|
|
73
|
+
default: 1,
|
|
74
|
+
},
|
|
75
|
+
rowspan: {
|
|
76
|
+
default: 1,
|
|
77
|
+
},
|
|
78
|
+
colwidth: {
|
|
79
|
+
default: null,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
parseDOM: [
|
|
83
|
+
{
|
|
84
|
+
tag: "td",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
tableHeader: {
|
|
89
|
+
tableRole: "header_cell",
|
|
90
|
+
content: "(paragraph|image)+",
|
|
91
|
+
isolating: true,
|
|
92
|
+
attrs: {
|
|
93
|
+
id: {
|
|
94
|
+
default: null,
|
|
95
|
+
},
|
|
96
|
+
textAlign: {
|
|
97
|
+
default: "left",
|
|
98
|
+
},
|
|
99
|
+
colspan: {
|
|
100
|
+
default: 1,
|
|
101
|
+
},
|
|
102
|
+
rowspan: {
|
|
103
|
+
default: 1,
|
|
104
|
+
},
|
|
105
|
+
colwidth: {
|
|
106
|
+
default: null,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
parseDOM: [
|
|
110
|
+
{
|
|
111
|
+
tag: "th",
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
tableContainer: {
|
|
116
|
+
content: "table",
|
|
117
|
+
group: "block",
|
|
118
|
+
atom: true,
|
|
119
|
+
draggable: false,
|
|
120
|
+
defining: true,
|
|
121
|
+
attrs: {
|
|
122
|
+
id: {
|
|
123
|
+
default: null,
|
|
124
|
+
},
|
|
125
|
+
definitionId: {
|
|
126
|
+
default: "io.supernova.block.table",
|
|
127
|
+
},
|
|
128
|
+
variantId: {
|
|
129
|
+
default: "default",
|
|
130
|
+
},
|
|
131
|
+
hasBorder: {
|
|
132
|
+
default: true,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
parseDOM: [
|
|
136
|
+
{
|
|
137
|
+
tag: "tableContainer",
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
hardBreak: {
|
|
142
|
+
group: "inline",
|
|
143
|
+
inline: true,
|
|
144
|
+
selectable: false,
|
|
145
|
+
parseDOM: [
|
|
146
|
+
{
|
|
147
|
+
tag: "br",
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
text: {
|
|
152
|
+
group: "inline",
|
|
153
|
+
},
|
|
154
|
+
heading: {
|
|
155
|
+
content: "inline*",
|
|
156
|
+
group: "block",
|
|
157
|
+
defining: true,
|
|
158
|
+
attrs: {
|
|
159
|
+
id: {
|
|
160
|
+
default: null,
|
|
161
|
+
},
|
|
162
|
+
level: {
|
|
163
|
+
default: 1,
|
|
164
|
+
},
|
|
165
|
+
definitionId: {
|
|
166
|
+
default: null,
|
|
167
|
+
},
|
|
168
|
+
variantId: {
|
|
169
|
+
default: null,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
parseDOM: [
|
|
173
|
+
{
|
|
174
|
+
tag: "h1",
|
|
175
|
+
attrs: {
|
|
176
|
+
level: 1,
|
|
177
|
+
definitionId: "io.supernova.block.title1",
|
|
178
|
+
variantId: "default",
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
tag: "h2",
|
|
183
|
+
attrs: {
|
|
184
|
+
level: 2,
|
|
185
|
+
definitionId: "io.supernova.block.title2",
|
|
186
|
+
variantId: "default",
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
tag: "h3",
|
|
191
|
+
attrs: {
|
|
192
|
+
level: 3,
|
|
193
|
+
definitionId: "io.supernova.block.title3",
|
|
194
|
+
variantId: "default",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
tag: "h4",
|
|
199
|
+
attrs: {
|
|
200
|
+
level: 4,
|
|
201
|
+
definitionId: "io.supernova.block.title4",
|
|
202
|
+
variantId: "default",
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
tag: "h5",
|
|
207
|
+
attrs: {
|
|
208
|
+
level: 5,
|
|
209
|
+
definitionId: "io.supernova.block.title5",
|
|
210
|
+
variantId: "default",
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
listItem: {
|
|
216
|
+
content: "paragraph list{0,1}",
|
|
217
|
+
defining: true,
|
|
218
|
+
attrs: {
|
|
219
|
+
id: {
|
|
220
|
+
default: null,
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
parseDOM: [
|
|
224
|
+
{
|
|
225
|
+
tag: "li",
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
orderedList: {
|
|
230
|
+
content: "listItem+",
|
|
231
|
+
group: "block list",
|
|
232
|
+
attrs: {
|
|
233
|
+
id: {
|
|
234
|
+
default: null,
|
|
235
|
+
},
|
|
236
|
+
definitionId: {
|
|
237
|
+
default: "io.supernova.block.ordered-list",
|
|
238
|
+
},
|
|
239
|
+
variantId: {
|
|
240
|
+
default: "default",
|
|
241
|
+
},
|
|
242
|
+
start: {
|
|
243
|
+
default: 1,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
parseDOM: [
|
|
247
|
+
{
|
|
248
|
+
tag: "ol",
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
bulletList: {
|
|
253
|
+
content: "listItem+",
|
|
254
|
+
group: "block list",
|
|
255
|
+
attrs: {
|
|
256
|
+
id: {
|
|
257
|
+
default: null,
|
|
258
|
+
},
|
|
259
|
+
definitionId: {
|
|
260
|
+
default: "io.supernova.block.unordered-list",
|
|
261
|
+
},
|
|
262
|
+
variantId: {
|
|
263
|
+
default: "default",
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
parseDOM: [
|
|
267
|
+
{
|
|
268
|
+
tag: "ul",
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
|
+
horizontalRule: {
|
|
273
|
+
group: "block",
|
|
274
|
+
attrs: {
|
|
275
|
+
id: {
|
|
276
|
+
default: null,
|
|
277
|
+
},
|
|
278
|
+
definitionId: {
|
|
279
|
+
default: "io.supernova.block.divider",
|
|
280
|
+
},
|
|
281
|
+
variantId: {
|
|
282
|
+
default: "default",
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
parseDOM: [
|
|
286
|
+
{
|
|
287
|
+
tag: "div.node-horizontalRule",
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
tag: "hr",
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
},
|
|
294
|
+
blockquote: {
|
|
295
|
+
content: "inline*",
|
|
296
|
+
group: "block",
|
|
297
|
+
draggable: true,
|
|
298
|
+
defining: true,
|
|
299
|
+
attrs: {
|
|
300
|
+
id: {
|
|
301
|
+
default: null,
|
|
302
|
+
},
|
|
303
|
+
definitionId: {
|
|
304
|
+
default: "io.supernova.block.blockquote",
|
|
305
|
+
},
|
|
306
|
+
variantId: {
|
|
307
|
+
default: "default",
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
parseDOM: [
|
|
311
|
+
{
|
|
312
|
+
tag: "blockquote",
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
},
|
|
316
|
+
plainSection: {
|
|
317
|
+
content: "sectionItem",
|
|
318
|
+
group: "section",
|
|
319
|
+
atom: true,
|
|
320
|
+
draggable: false,
|
|
321
|
+
isolating: true,
|
|
322
|
+
attrs: {
|
|
323
|
+
id: {
|
|
324
|
+
default: null,
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
parseDOM: [
|
|
328
|
+
{
|
|
329
|
+
tag: "section",
|
|
330
|
+
attrs: {
|
|
331
|
+
"data-section-type": "plain",
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
},
|
|
336
|
+
tabsSection: {
|
|
337
|
+
content: "sectionItem+",
|
|
338
|
+
group: "section",
|
|
339
|
+
atom: true,
|
|
340
|
+
draggable: false,
|
|
341
|
+
isolating: true,
|
|
342
|
+
attrs: {
|
|
343
|
+
id: {
|
|
344
|
+
default: null,
|
|
345
|
+
},
|
|
346
|
+
variantId: {
|
|
347
|
+
default: "Tabs",
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
parseDOM: [
|
|
351
|
+
{
|
|
352
|
+
tag: "div",
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
sectionItem: {
|
|
357
|
+
content: "sectionItemColumn{1, 3}",
|
|
358
|
+
group: "sectionItem",
|
|
359
|
+
atom: true,
|
|
360
|
+
selectable: false,
|
|
361
|
+
draggable: false,
|
|
362
|
+
isolating: true,
|
|
363
|
+
attrs: {
|
|
364
|
+
id: {
|
|
365
|
+
default: null,
|
|
366
|
+
},
|
|
367
|
+
title: {
|
|
368
|
+
default: "",
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
parseDOM: [
|
|
372
|
+
{
|
|
373
|
+
tag: "section-item",
|
|
374
|
+
},
|
|
375
|
+
],
|
|
376
|
+
},
|
|
377
|
+
sectionItemColumn: {
|
|
378
|
+
content: "block+",
|
|
379
|
+
group: "sectionItemColumn",
|
|
380
|
+
atom: true,
|
|
381
|
+
selectable: false,
|
|
382
|
+
draggable: false,
|
|
383
|
+
isolating: true,
|
|
384
|
+
attrs: {
|
|
385
|
+
id: {
|
|
386
|
+
default: null,
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
parseDOM: [
|
|
390
|
+
{
|
|
391
|
+
tag: "section-item-column",
|
|
392
|
+
},
|
|
393
|
+
],
|
|
394
|
+
},
|
|
395
|
+
doc: {
|
|
396
|
+
content: "(block|section)+",
|
|
397
|
+
},
|
|
398
|
+
callout: {
|
|
399
|
+
content: "inline*",
|
|
400
|
+
group: "block",
|
|
401
|
+
draggable: true,
|
|
402
|
+
defining: true,
|
|
403
|
+
attrs: {
|
|
404
|
+
id: {
|
|
405
|
+
default: null,
|
|
406
|
+
},
|
|
407
|
+
definitionId: {
|
|
408
|
+
default: "io.supernova.block.callout",
|
|
409
|
+
},
|
|
410
|
+
variantId: {
|
|
411
|
+
default: "default",
|
|
412
|
+
},
|
|
413
|
+
type: {
|
|
414
|
+
default: "neutral",
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
parseDOM: [
|
|
418
|
+
{
|
|
419
|
+
tag: "callout",
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
},
|
|
423
|
+
image: {
|
|
424
|
+
group: "block customBlock",
|
|
425
|
+
atom: true,
|
|
426
|
+
draggable: false,
|
|
427
|
+
attrs: {
|
|
428
|
+
id: {
|
|
429
|
+
default: null,
|
|
430
|
+
},
|
|
431
|
+
definitionId: {
|
|
432
|
+
default: null,
|
|
433
|
+
},
|
|
434
|
+
variantId: {
|
|
435
|
+
default: null,
|
|
436
|
+
},
|
|
437
|
+
appearance: {
|
|
438
|
+
default: "{}",
|
|
439
|
+
},
|
|
440
|
+
columns: {
|
|
441
|
+
default: 1,
|
|
442
|
+
},
|
|
443
|
+
items: {
|
|
444
|
+
default: "[]",
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
parseDOM: [
|
|
448
|
+
{
|
|
449
|
+
tag: "block-node",
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
},
|
|
453
|
+
blockNode: {
|
|
454
|
+
group: "block customBlock",
|
|
455
|
+
atom: true,
|
|
456
|
+
draggable: false,
|
|
457
|
+
attrs: {
|
|
458
|
+
id: {
|
|
459
|
+
default: null,
|
|
460
|
+
},
|
|
461
|
+
definitionId: {
|
|
462
|
+
default: null,
|
|
463
|
+
},
|
|
464
|
+
variantId: {
|
|
465
|
+
default: null,
|
|
466
|
+
},
|
|
467
|
+
appearance: {
|
|
468
|
+
default: "{}",
|
|
469
|
+
},
|
|
470
|
+
columns: {
|
|
471
|
+
default: 1,
|
|
472
|
+
},
|
|
473
|
+
items: {
|
|
474
|
+
default: "[]",
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
parseDOM: [
|
|
478
|
+
{
|
|
479
|
+
tag: "block-node",
|
|
480
|
+
},
|
|
481
|
+
],
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
marks: {
|
|
485
|
+
link: {
|
|
486
|
+
inclusive: false,
|
|
487
|
+
attrs: {
|
|
488
|
+
href: {
|
|
489
|
+
default: null,
|
|
490
|
+
},
|
|
491
|
+
target: {
|
|
492
|
+
default: "_blank",
|
|
493
|
+
},
|
|
494
|
+
rel: {
|
|
495
|
+
default: "noopener noreferrer nofollow",
|
|
496
|
+
},
|
|
497
|
+
class: {
|
|
498
|
+
default: "tiptap-link",
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
parseDOM: [
|
|
502
|
+
{
|
|
503
|
+
tag: 'a[href]:not([href *= "javascript:" i])',
|
|
504
|
+
},
|
|
505
|
+
],
|
|
506
|
+
},
|
|
507
|
+
commentHighlight: {
|
|
508
|
+
attrs: {
|
|
509
|
+
highlightId: {
|
|
510
|
+
default: null,
|
|
511
|
+
},
|
|
512
|
+
resolved: {
|
|
513
|
+
default: false,
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
parseDOM: [
|
|
517
|
+
{
|
|
518
|
+
tag: "commenthighlight",
|
|
519
|
+
},
|
|
520
|
+
],
|
|
521
|
+
},
|
|
522
|
+
bold: {
|
|
523
|
+
parseDOM: [
|
|
524
|
+
{
|
|
525
|
+
tag: "strong",
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
tag: "b",
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
style: "font-weight",
|
|
532
|
+
},
|
|
533
|
+
],
|
|
534
|
+
},
|
|
535
|
+
italic: {
|
|
536
|
+
parseDOM: [
|
|
537
|
+
{
|
|
538
|
+
tag: "em",
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
tag: "i",
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
style: "font-style=italic",
|
|
545
|
+
},
|
|
546
|
+
],
|
|
547
|
+
},
|
|
548
|
+
strike: {
|
|
549
|
+
parseDOM: [
|
|
550
|
+
{
|
|
551
|
+
tag: "s",
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
tag: "del",
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
tag: "strike",
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
style: "text-decoration",
|
|
561
|
+
consuming: false,
|
|
562
|
+
},
|
|
563
|
+
],
|
|
564
|
+
},
|
|
565
|
+
code: {
|
|
566
|
+
excludes: "bold code italic strike link",
|
|
567
|
+
code: true,
|
|
568
|
+
parseDOM: [
|
|
569
|
+
{
|
|
570
|
+
tag: "code",
|
|
571
|
+
},
|
|
572
|
+
],
|
|
573
|
+
},
|
|
574
|
+
},
|
|
575
|
+
} as const;
|
|
576
|
+
|
|
577
|
+
export const mainEditorProsemirrorSchema = new Schema(pmSchemaJson);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PageBlockItemUntypedValue } from "@supernova-studio/model";
|
|
2
|
+
|
|
3
|
+
export type ProsemirrorNode = {
|
|
4
|
+
type: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
attrs?: Record<string, any>;
|
|
7
|
+
marks?: ProsemirrorMark[];
|
|
8
|
+
content?: ProsemirrorNode[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type ProsemirrorMark = {
|
|
12
|
+
type: string;
|
|
13
|
+
attrs?: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type ProsemirrorBlockItem = {
|
|
17
|
+
id: string;
|
|
18
|
+
props: Record<string, PageBlockItemUntypedValue>;
|
|
19
|
+
};
|