@ecsplico/editor 1.0.0 → 2.1.0
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 +37 -0
- package/README.md +7 -7
- package/dist/adapters/anchors.d.ts +80 -0
- package/dist/adapters/anchors.js +270 -0
- package/dist/adapters/anchors.js.map +1 -0
- package/dist/adapters/comments/client.d.ts +64 -0
- package/dist/adapters/comments/client.js +536 -0
- package/dist/adapters/comments/client.js.map +1 -0
- package/dist/adapters/comments/drizzle.d.ts +430 -0
- package/dist/adapters/comments/drizzle.js +236 -0
- package/dist/adapters/comments/drizzle.js.map +1 -0
- package/dist/adapters/comments/errors.d.ts +9 -0
- package/dist/adapters/comments/errors.js +19 -0
- package/dist/adapters/comments/errors.js.map +1 -0
- package/dist/adapters/comments/json.d.ts +19 -0
- package/dist/adapters/comments/json.js +94 -0
- package/dist/adapters/comments/json.js.map +1 -0
- package/dist/adapters/comments/record.js +78 -0
- package/dist/adapters/comments/record.js.map +1 -0
- package/dist/adapters/comments/server.d.ts +23 -0
- package/dist/adapters/comments/server.js +102 -0
- package/dist/adapters/comments/server.js.map +1 -0
- package/dist/adapters/comments/types.d.ts +109 -0
- package/dist/adapters/documents.js +108 -0
- package/dist/adapters/documents.js.map +1 -0
- package/dist/adapters/drizzle.d.ts +293 -0
- package/dist/adapters/drizzle.js +157 -0
- package/dist/adapters/drizzle.js.map +1 -0
- package/dist/adapters/files.js +30 -0
- package/dist/adapters/files.js.map +1 -0
- package/dist/adapters/forge.d.ts +58 -0
- package/dist/adapters/forge.js +91 -0
- package/dist/adapters/forge.js.map +1 -0
- package/dist/adapters/index.d.ts +13 -0
- package/dist/adapters/index.js +0 -0
- package/dist/adapters/json.d.ts +24 -0
- package/dist/adapters/json.js +128 -0
- package/dist/adapters/json.js.map +1 -0
- package/dist/adapters/nitro.d.ts +61 -0
- package/dist/adapters/nitro.js +212 -0
- package/dist/adapters/nitro.js.map +1 -0
- package/dist/adapters/routes.js +16 -0
- package/dist/adapters/routes.js.map +1 -0
- package/dist/adapters/shared.d.ts +37 -0
- package/dist/adapters/shared.js +32 -0
- package/dist/adapters/shared.js.map +1 -0
- package/dist/adapters/vue.d.ts +67 -0
- package/dist/adapters/vue.js +187 -0
- package/dist/adapters/vue.js.map +1 -0
- package/dist/code/CodeSurface.vue.d.ts +3 -3
- package/dist/core/doc-anchors.d.ts +5 -0
- package/dist/core/doc-anchors.js +4 -3
- package/dist/core/doc-anchors.js.map +1 -1
- package/dist/core/editor-ui.js +57 -1
- package/dist/core/editor-ui.js.map +1 -1
- package/dist/core/notify.d.ts +1 -1
- package/dist/core/notify.js.map +1 -1
- package/dist/core/surface-session.js +139 -0
- package/dist/core/surface-session.js.map +1 -0
- package/dist/document/DocumentSurface.d.ts +1 -1
- package/dist/document/DocumentSurface.vue.d.ts +3 -3
- package/dist/features/ai/agent-op-review.d.ts +2 -2
- package/dist/features/ai/agent-op-review.js.map +1 -1
- package/dist/features/ai/agent-ops.d.ts +1 -1
- package/dist/features/ai/agent-ops.js +9 -6
- package/dist/features/ai/agent-ops.js.map +1 -1
- package/dist/features/ai/ai-apply.d.ts +1 -1
- package/dist/features/ai/ai-review.js +10 -1
- package/dist/features/ai/ai-review.js.map +1 -1
- package/dist/features/ai/components/AiSelectionMenu.js +78 -252
- package/dist/features/ai/components/AiSelectionMenu.js.map +1 -1
- package/dist/features/ai/components/AiSelectionMenu.vue.d.ts +2 -1
- package/dist/features/ai/components/AiSidebar.js +2 -2
- package/dist/features/ai/components/DocumentChatAnswer.js +1 -1
- package/dist/features/ai/components/DocumentChatOps.js +1 -0
- package/dist/features/ai/components/DocumentChatOps.js.map +1 -1
- package/dist/features/ai/components/ModelQuickSwitch.js +1 -1
- package/dist/features/ai/components/SettingsAiTab.js +1 -1
- package/dist/features/ai/components/SettingsModelProfiles.js +1 -1
- package/dist/features/ai/document-chat.d.ts +3 -2
- package/dist/features/ai/document-chat.js +16 -19
- package/dist/features/ai/document-chat.js.map +1 -1
- package/dist/features/ai/index.d.ts +5 -3
- package/dist/features/ai/index.js +4 -2
- package/dist/features/ai/protocol/agent-ops.d.ts +22 -17
- package/dist/features/ai/protocol/agent-ops.js +65 -39
- package/dist/features/ai/protocol/agent-ops.js.map +1 -1
- package/dist/features/ai/protocol/block-lines.d.ts +89 -0
- package/dist/features/ai/protocol/block-lines.js +177 -0
- package/dist/features/ai/protocol/block-lines.js.map +1 -0
- package/dist/features/ai/protocol/chat.js +10 -10
- package/dist/features/ai/protocol/chat.js.map +1 -1
- package/dist/features/ai/protocol/index.d.ts +3 -2
- package/dist/features/ai/protocol/index.js +3 -2
- package/dist/features/ai/react/AiSelectionMenu.d.ts +3 -2
- package/dist/features/ai/react/AiSelectionMenu.js +64 -255
- package/dist/features/ai/react/AiSelectionMenu.js.map +1 -1
- package/dist/features/ai/react/AiSidebar.js +2 -2
- package/dist/features/ai/react/DocumentChatAnswer.js +1 -1
- package/dist/features/ai/react/DocumentChatOps.js +1 -0
- package/dist/features/ai/react/DocumentChatOps.js.map +1 -1
- package/dist/features/ai/react/ModelQuickSwitch.js +1 -1
- package/dist/features/ai/react/SettingsAiTab.js +1 -1
- package/dist/features/ai/react/SettingsModelProfiles.js +1 -1
- package/dist/features/ai/react/use-ai-selection-flow.js +34 -0
- package/dist/features/ai/react/use-ai-selection-flow.js.map +1 -0
- package/dist/features/ai/selection-flow.d.ts +133 -0
- package/dist/features/ai/selection-flow.js +283 -0
- package/dist/features/ai/selection-flow.js.map +1 -0
- package/dist/features/ai/use-ai-assistant.d.ts +1 -1
- package/dist/features/ai/use-document-chat.d.ts +1 -1
- package/dist/features/authors/components/AuthorColorsPanel.js +1 -1
- package/dist/features/authors/feature.js +1 -1
- package/dist/features/authors/index.js +1 -1
- package/dist/features/authors/react/AuthorColorsPanel.js +1 -1
- package/dist/features/comments/components/CommentBubble.js +1 -1
- package/dist/features/comments/components/CommentComposer.js +1 -1
- package/dist/features/comments/components/CommentThreadView.js +5 -2
- package/dist/features/comments/components/CommentThreadView.js.map +1 -1
- package/dist/features/comments/components/CommentsMargin.js +108 -230
- package/dist/features/comments/components/CommentsMargin.js.map +1 -1
- package/dist/features/comments/components/CommentsOverlay.js +1 -1
- package/dist/features/comments/feature.js +1 -1
- package/dist/features/comments/index.d.ts +4 -2
- package/dist/features/comments/index.js +4 -2
- package/dist/features/comments/margin-controller.d.ts +44 -0
- package/dist/features/comments/margin-controller.js +132 -0
- package/dist/features/comments/margin-controller.js.map +1 -0
- package/dist/features/comments/margin-layout.d.ts +55 -0
- package/dist/features/comments/margin-layout.js +79 -0
- package/dist/features/comments/margin-layout.js.map +1 -0
- package/dist/features/comments/model.d.ts +8 -0
- package/dist/features/comments/model.js +60 -34
- package/dist/features/comments/model.js.map +1 -1
- package/dist/features/comments/react/CommentBubble.js +1 -1
- package/dist/features/comments/react/CommentComposer.js +1 -1
- package/dist/features/comments/react/CommentThreadView.js +2 -2
- package/dist/features/comments/react/CommentThreadView.js.map +1 -1
- package/dist/features/comments/react/CommentsMargin.d.ts +0 -5
- package/dist/features/comments/react/CommentsMargin.js +85 -251
- package/dist/features/comments/react/CommentsMargin.js.map +1 -1
- package/dist/features/comments/react/CommentsOverlay.js +1 -1
- package/dist/features/comments/react/use-comments.js +1 -1
- package/dist/features/comments/react/use-margin-layout.js +45 -0
- package/dist/features/comments/react/use-margin-layout.js.map +1 -0
- package/dist/features/comments/react.d.ts +1 -1
- package/dist/features/comments/schema.d.ts +23 -0
- package/dist/features/comments/schema.js.map +1 -1
- package/dist/features/comments/snapshot-equality.js +40 -0
- package/dist/features/comments/snapshot-equality.js.map +1 -0
- package/dist/features/comments/thread-anchor.js +33 -0
- package/dist/features/comments/thread-anchor.js.map +1 -0
- package/dist/features/comments/use-comments.d.ts +3 -1
- package/dist/features/comments/use-comments.js +1 -0
- package/dist/features/comments/use-comments.js.map +1 -1
- package/dist/features/comments/use-margin-layout.js +29 -0
- package/dist/features/comments/use-margin-layout.js.map +1 -0
- package/dist/features/comments/vue.d.ts +1 -1
- package/dist/features/composites/accepted-children.d.ts +21 -0
- package/dist/features/composites/accepted-children.js +126 -0
- package/dist/features/composites/accepted-children.js.map +1 -0
- package/dist/features/composites/components/CompositeDetails.js +1 -1
- package/dist/features/composites/components/CompositeInspector.js +38 -164
- package/dist/features/composites/components/CompositeInspector.js.map +1 -1
- package/dist/features/composites/feature.d.ts +2 -1
- package/dist/features/composites/feature.js +8 -2
- package/dist/features/composites/feature.js.map +1 -1
- package/dist/features/composites/index.d.ts +5 -3
- package/dist/features/composites/index.js +8 -6
- package/dist/features/composites/inspector-model.d.ts +97 -0
- package/dist/features/composites/inspector-model.js +255 -0
- package/dist/features/composites/inspector-model.js.map +1 -0
- package/dist/features/composites/kinds.d.ts +11 -0
- package/dist/features/composites/kinds.js +17 -2
- package/dist/features/composites/kinds.js.map +1 -1
- package/dist/features/composites/outline.d.ts +18 -5
- package/dist/features/composites/outline.js +44 -12
- package/dist/features/composites/outline.js.map +1 -1
- package/dist/features/composites/react/CompositeDetails.js +1 -1
- package/dist/features/composites/react/CompositeInspector.d.ts +1 -1
- package/dist/features/composites/react/CompositeInspector.js +21 -180
- package/dist/features/composites/react/CompositeInspector.js.map +1 -1
- package/dist/features/composites/react/CompositeStatusMenu.d.ts +1 -1
- package/dist/features/composites/react/CompositeView.js +1 -1
- package/dist/features/composites/react/use-composite-inspector.js +29 -0
- package/dist/features/composites/react/use-composite-inspector.js.map +1 -0
- package/dist/features/composites/schema.d.ts +2 -2
- package/dist/features/composites/schema.js +2 -2
- package/dist/features/composites/schema.js.map +1 -1
- package/dist/features/composites/use-composite-anchors.d.ts +1 -1
- package/dist/features/composites/use-composite-inspector.js +41 -0
- package/dist/features/composites/use-composite-inspector.js.map +1 -0
- package/dist/features/composites/use-composite-rows.d.ts +1 -1
- package/dist/features/media/index.d.ts +1 -1
- package/dist/features/media/vue.d.ts +1 -1
- package/dist/features/mentions/index.d.ts +3 -3
- package/dist/features/mentions/index.js +3 -3
- package/dist/features/mentions/schema.d.ts +1 -1
- package/dist/features/mentions/schema.js +1 -1
- package/dist/features/themes/index.d.ts +1 -1
- package/dist/features/themes/index.js +1 -1
- package/dist/features/transcript/feature.js +1 -1
- package/dist/features/transcript/index.js +2 -2
- package/dist/i18n/de/ai.js +2 -0
- package/dist/i18n/de/ai.js.map +1 -1
- package/dist/i18n/de/common.js +1 -2
- package/dist/i18n/de/common.js.map +1 -1
- package/dist/i18n/de/composites.js +8 -1
- package/dist/i18n/de/composites.js.map +1 -1
- package/dist/i18n/de/tree.js +14 -1
- package/dist/i18n/de/tree.js.map +1 -1
- package/dist/i18n/de.d.ts +22 -1
- package/dist/i18n/en/ai.js +2 -0
- package/dist/i18n/en/ai.js.map +1 -1
- package/dist/i18n/en/common.js +1 -2
- package/dist/i18n/en/common.js.map +1 -1
- package/dist/i18n/en/composites.js +8 -1
- package/dist/i18n/en/composites.js.map +1 -1
- package/dist/i18n/en/tree.js +14 -1
- package/dist/i18n/en/tree.js.map +1 -1
- package/dist/integrations/composite-ai/composite-fill.js +2 -2
- package/dist/integrations/composite-ai/composite-summary.js +2 -2
- package/dist/integrations/composite-ai/index.js +2 -2
- package/dist/integrations/transcript-ai/transcript-cleanup.js +1 -1
- package/dist/markdown/MarkdownSurface.d.ts +1 -1
- package/dist/markdown/MarkdownSurface.js +2 -2
- package/dist/markdown/MarkdownSurface.vue.d.ts +7 -7
- package/dist/markdown/index.d.ts +2 -2
- package/dist/nuxt/module.d.ts +0 -6
- package/dist/nuxt/module.js +3 -5
- package/dist/nuxt/module.js.map +1 -1
- package/dist/nuxt/runtime/install-context.d.ts +2 -3
- package/dist/nuxt/runtime/install-context.js +2 -3
- package/dist/nuxt/runtime/install-context.js.map +1 -1
- package/dist/nuxt/runtime/plugins/editor-context-nuxt-ui.client.ts +1 -1
- package/dist/nuxt/runtime/server/routes/collab/[id].js +1 -1
- package/dist/react/EditorSurface.d.ts +1 -1
- package/dist/react/EditorSurface.js +43 -149
- package/dist/react/EditorSurface.js.map +1 -1
- package/dist/react/EditorToolbar.js +3 -40
- package/dist/react/EditorToolbar.js.map +1 -1
- package/dist/react/styles/ui-vars.css +2 -2
- package/dist/schema/advanced.js +2 -2
- package/dist/server/adapter.d.ts +2 -2
- package/dist/server/collab.js +1 -1
- package/dist/server/handlers/ai.d.ts +4 -2
- package/dist/server/handlers/ai.js +11 -9
- package/dist/server/handlers/ai.js.map +1 -1
- package/dist/server/handlers/context.d.ts +1 -1
- package/dist/server/handlers/editor.d.ts +1 -1
- package/dist/server/handlers/editor.js +2 -2
- package/dist/server/host.d.ts +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/settings/index.d.ts +1 -1
- package/dist/styles/ai.css +1 -1
- package/dist/styles/authors.css +1 -1
- package/dist/styles/block-ui.css +1 -1
- package/dist/styles/collab.css +1 -1
- package/dist/styles/comments.css +1 -1
- package/dist/styles/core.css +2 -2
- package/dist/styles/media.css +1 -1
- package/dist/styles/mentions.css +1 -1
- package/dist/styles/themes.css +1 -1
- package/dist/styles/tokens.css +1 -1
- package/dist/styles/transcript.css +1 -1
- package/dist/tree/DocumentTree.js +159 -387
- package/dist/tree/DocumentTree.js.map +1 -1
- package/dist/tree/drop-rules.js +37 -0
- package/dist/tree/drop-rules.js.map +1 -0
- package/dist/tree/react/DocumentTree.d.ts +2 -2
- package/dist/tree/react/DocumentTree.js +135 -397
- package/dist/tree/react/DocumentTree.js.map +1 -1
- package/dist/tree/react/use-tree-model.js +129 -0
- package/dist/tree/react/use-tree-model.js.map +1 -0
- package/dist/tree/react.js +1 -1
- package/dist/tree/tree-host.js +100 -0
- package/dist/tree/tree-host.js.map +1 -0
- package/dist/tree/tree-items.js +22 -43
- package/dist/tree/tree-items.js.map +1 -1
- package/dist/tree/tree-model.js +580 -0
- package/dist/tree/tree-model.js.map +1 -0
- package/dist/tree/tree-rows.js +77 -0
- package/dist/tree/tree-rows.js.map +1 -0
- package/dist/tree/use-tree-model.js +94 -0
- package/dist/tree/use-tree-model.js.map +1 -0
- package/dist/tree/vue.js +1 -1
- package/dist/vue/AdvancedEditor.vue.d.ts +4 -4
- package/dist/vue/SimpleEditor.vue.d.ts +2 -2
- package/dist/vue/components/EditorSurface.js +27 -87
- package/dist/vue/components/EditorSurface.js.map +1 -1
- package/dist/vue/components/EditorSurface.vue.d.ts +4 -4
- package/dist/vue/components/EditorToolbar.js +7 -44
- package/dist/vue/components/EditorToolbar.js.map +1 -1
- package/dist/vue/context.d.ts +4 -4
- package/dist/vue/context.js +3 -2
- package/dist/vue/context.js.map +1 -1
- package/dist/vue/kit/types.d.ts +1 -1
- package/dist/vue/kit/use-ui-kit.d.ts +2 -2
- package/dist/vue/kit/use-ui-kit.js +3 -3
- package/dist/vue/kit/use-ui-kit.js.map +1 -1
- package/dist/vue/use-editor-ui.d.ts +1 -1
- package/dist/vue/use-notifier.d.ts +1 -1
- package/docs/integration.md +98 -5
- package/docs/llms.md +10 -2
- package/docs/usage.md +10 -5
- package/package.json +70 -23
- package/dist/nuxt/runtime/plugins/editor-context-primevue.client.ts +0 -8
- package/dist/vue/kit/primevue/Alert.js +0 -49
- package/dist/vue/kit/primevue/Alert.js.map +0 -1
- package/dist/vue/kit/primevue/Avatar.js +0 -54
- package/dist/vue/kit/primevue/Avatar.js.map +0 -1
- package/dist/vue/kit/primevue/Badge.js +0 -41
- package/dist/vue/kit/primevue/Badge.js.map +0 -1
- package/dist/vue/kit/primevue/Button.js +0 -112
- package/dist/vue/kit/primevue/Button.js.map +0 -1
- package/dist/vue/kit/primevue/Chip.js +0 -38
- package/dist/vue/kit/primevue/Chip.js.map +0 -1
- package/dist/vue/kit/primevue/DropdownMenu.js +0 -98
- package/dist/vue/kit/primevue/DropdownMenu.js.map +0 -1
- package/dist/vue/kit/primevue/FieldGroup.js +0 -22
- package/dist/vue/kit/primevue/FieldGroup.js.map +0 -1
- package/dist/vue/kit/primevue/FormField.js +0 -56
- package/dist/vue/kit/primevue/FormField.js.map +0 -1
- package/dist/vue/kit/primevue/Icon.js +0 -23
- package/dist/vue/kit/primevue/Icon.js.map +0 -1
- package/dist/vue/kit/primevue/Input.js +0 -96
- package/dist/vue/kit/primevue/Input.js.map +0 -1
- package/dist/vue/kit/primevue/InputMenu.js +0 -122
- package/dist/vue/kit/primevue/InputMenu.js.map +0 -1
- package/dist/vue/kit/primevue/Modal.js +0 -59
- package/dist/vue/kit/primevue/Modal.js.map +0 -1
- package/dist/vue/kit/primevue/Popover.js +0 -135
- package/dist/vue/kit/primevue/Popover.js.map +0 -1
- package/dist/vue/kit/primevue/RadioGroup.js +0 -58
- package/dist/vue/kit/primevue/RadioGroup.js.map +0 -1
- package/dist/vue/kit/primevue/Select.js +0 -68
- package/dist/vue/kit/primevue/Select.js.map +0 -1
- package/dist/vue/kit/primevue/SelectMenu.js +0 -94
- package/dist/vue/kit/primevue/SelectMenu.js.map +0 -1
- package/dist/vue/kit/primevue/Separator.js +0 -16
- package/dist/vue/kit/primevue/Separator.js.map +0 -1
- package/dist/vue/kit/primevue/Switch.js +0 -46
- package/dist/vue/kit/primevue/Switch.js.map +0 -1
- package/dist/vue/kit/primevue/Table.js +0 -54
- package/dist/vue/kit/primevue/Table.js.map +0 -1
- package/dist/vue/kit/primevue/Tabs.js +0 -49
- package/dist/vue/kit/primevue/Tabs.js.map +0 -1
- package/dist/vue/kit/primevue/Textarea.js +0 -55
- package/dist/vue/kit/primevue/Textarea.js.map +0 -1
- package/dist/vue/kit/primevue/Tooltip.js +0 -43
- package/dist/vue/kit/primevue/Tooltip.js.map +0 -1
- package/dist/vue/kit/primevue/Tree.js +0 -75
- package/dist/vue/kit/primevue/Tree.js.map +0 -1
- package/dist/vue/kit/primevue/select-options.js +0 -55
- package/dist/vue/kit/primevue/select-options.js.map +0 -1
- package/dist/vue/kit/primevue/shared.js +0 -49
- package/dist/vue/kit/primevue/shared.js.map +0 -1
- package/dist/vue/kit/primevue/trigger.js +0 -25
- package/dist/vue/kit/primevue/trigger.js.map +0 -1
- package/dist/vue/kit/primevue.css +0 -86
- package/dist/vue/kit/primevue.d.ts +0 -33
- package/dist/vue/kit/primevue.js +0 -96
- package/dist/vue/kit/primevue.js.map +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
//#region src/vue/kit/primevue/shared.ts
|
|
2
|
-
function severityOf(color) {
|
|
3
|
-
switch (color) {
|
|
4
|
-
case "success": return "success";
|
|
5
|
-
case "info": return "info";
|
|
6
|
-
case "warning": return "warn";
|
|
7
|
-
case "error": return "danger";
|
|
8
|
-
case "secondary":
|
|
9
|
-
case "neutral": return "secondary";
|
|
10
|
-
default: return;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
/** PrimeVue has three sizes: the dense kit sizes fold into `small`, the roomy ones into `large`. */
|
|
14
|
-
function sizeOf(size) {
|
|
15
|
-
switch (size) {
|
|
16
|
-
case "3xs":
|
|
17
|
-
case "2xs":
|
|
18
|
-
case "xs":
|
|
19
|
-
case "sm": return "small";
|
|
20
|
-
case "lg":
|
|
21
|
-
case "xl":
|
|
22
|
-
case "2xl":
|
|
23
|
-
case "3xl": return "large";
|
|
24
|
-
default: return;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/** `i-lucide-x` (the editor's icon spelling) as an Iconify id (`lucide:x`); `lucide:x` stays as it is. */
|
|
28
|
-
function iconifyName(name) {
|
|
29
|
-
if (!name.startsWith("i-")) return name;
|
|
30
|
-
const rest = name.slice(2);
|
|
31
|
-
const dash = rest.indexOf("-");
|
|
32
|
-
return dash < 0 ? rest : `${rest.slice(0, dash)}:${rest.slice(dash + 1)}`;
|
|
33
|
-
}
|
|
34
|
-
const KEYS = {
|
|
35
|
-
meta: "⌘",
|
|
36
|
-
ctrl: "Ctrl",
|
|
37
|
-
shift: "⇧",
|
|
38
|
-
alt: "⌥",
|
|
39
|
-
enter: "↵",
|
|
40
|
-
escape: "Esc"
|
|
41
|
-
};
|
|
42
|
-
/** `['meta', 'b']` as `⌘B`: how a shortcut is written in a tooltip or a menu row. */
|
|
43
|
-
function kbdText(kbds) {
|
|
44
|
-
return kbds.map((key) => KEYS[key.toLowerCase()] ?? key.toUpperCase()).join("");
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
export { iconifyName, kbdText, severityOf, sizeOf };
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=shared.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","names":[],"sources":["../../../../src/vue/kit/primevue/shared.ts"],"sourcesContent":["import type { KitColor, KitSize } from '../types'\n\n/** PrimeVue severity of a kit colour (`undefined` is the primary colour). */\nexport type Severity = 'secondary' | 'success' | 'info' | 'warn' | 'danger' | 'contrast' | undefined\n\nexport function severityOf(color: KitColor | undefined): Severity {\n switch (color) {\n case 'success': return 'success'\n case 'info': return 'info'\n case 'warning': return 'warn'\n case 'error': return 'danger'\n case 'secondary':\n case 'neutral': return 'secondary'\n default: return undefined\n }\n}\n\n/** PrimeVue has three sizes: the dense kit sizes fold into `small`, the roomy ones into `large`. */\nexport function sizeOf(size: KitSize | undefined): 'small' | 'large' | undefined {\n switch (size) {\n case '3xs': case '2xs': case 'xs': case 'sm': return 'small'\n case 'lg': case 'xl': case '2xl': case '3xl': return 'large'\n default: return undefined\n }\n}\n\n/** `i-lucide-x` (the editor's icon spelling) as an Iconify id (`lucide:x`); `lucide:x` stays as it is. */\nexport function iconifyName(name: string): string {\n if (!name.startsWith('i-')) return name\n const rest = name.slice(2)\n const dash = rest.indexOf('-')\n return dash < 0 ? rest : `${rest.slice(0, dash)}:${rest.slice(dash + 1)}`\n}\n\nconst KEYS: Record<string, string> = { meta: '⌘', ctrl: 'Ctrl', shift: '⇧', alt: '⌥', enter: '↵', escape: 'Esc' }\n\n/** `['meta', 'b']` as `⌘B`: how a shortcut is written in a tooltip or a menu row. */\nexport function kbdText(kbds: string[]): string {\n return kbds.map(key => KEYS[key.toLowerCase()] ?? key.toUpperCase()).join('')\n}\n"],"mappings":";AAKA,SAAgB,WAAW,OAAuC;CAChE,QAAQ,OAAR;EACE,KAAK,WAAW,OAAO;EACvB,KAAK,QAAQ,OAAO;EACpB,KAAK,WAAW,OAAO;EACvB,KAAK,SAAS,OAAO;EACrB,KAAK;EACL,KAAK,WAAW,OAAO;EACvB,SAAS;CACX;AACF;;AAGA,SAAgB,OAAO,MAA0D;CAC/E,QAAQ,MAAR;EACE,KAAK;EAAO,KAAK;EAAO,KAAK;EAAM,KAAK,MAAM,OAAO;EACrD,KAAK;EAAM,KAAK;EAAM,KAAK;EAAO,KAAK,OAAO,OAAO;EACrD,SAAS;CACX;AACF;;AAGA,SAAgB,YAAY,MAAsB;CAChD,IAAI,CAAC,KAAK,WAAW,IAAI,GAAG,OAAO;CACnC,MAAM,OAAO,KAAK,MAAM,CAAC;CACzB,MAAM,OAAO,KAAK,QAAQ,GAAG;CAC7B,OAAO,OAAO,IAAI,OAAO,GAAG,KAAK,MAAM,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,OAAO,CAAC;AACxE;AAEA,MAAM,OAA+B;CAAE,MAAM;CAAK,MAAM;CAAQ,OAAO;CAAK,KAAK;CAAK,OAAO;CAAK,QAAQ;AAAM;;AAGhH,SAAgB,QAAQ,MAAwB;CAC9C,OAAO,KAAK,KAAI,QAAO,KAAK,IAAI,YAAY,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,EAAE;AAC9E"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Comment, Fragment, cloneVNode, h } from "vue";
|
|
2
|
-
//#region src/vue/kit/primevue/trigger.ts
|
|
3
|
-
/**
|
|
4
|
-
* The element-like vnodes of a slot: comments and empty fragments are dropped, fragments (a `v-for`, a `<template>`)
|
|
5
|
-
* are unwrapped. Overlay widgets decorate the first one (the trigger).
|
|
6
|
-
*/
|
|
7
|
-
function triggerNodes(nodes) {
|
|
8
|
-
const out = [];
|
|
9
|
-
for (const node of nodes ?? []) {
|
|
10
|
-
if (node.type === Comment) continue;
|
|
11
|
-
if (node.type === Fragment) out.push(...triggerNodes(node.children));
|
|
12
|
-
else out.push(node);
|
|
13
|
-
}
|
|
14
|
-
return out;
|
|
15
|
-
}
|
|
16
|
-
/** Merges `props` into the trigger (one vnode; several are wrapped in a span). Handlers of the trigger itself are kept. */
|
|
17
|
-
function decorate(nodes, props) {
|
|
18
|
-
if (!nodes.length) return void 0;
|
|
19
|
-
const first = nodes.length === 1 ? nodes[0] : h("span", { style: { display: "contents" } }, nodes);
|
|
20
|
-
return cloneVNode(first, props, true);
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
export { decorate, triggerNodes };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=trigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.js","names":[],"sources":["../../../../src/vue/kit/primevue/trigger.ts"],"sourcesContent":["import { type VNode, cloneVNode, Comment, Fragment, h } from 'vue'\n\n/**\n * The element-like vnodes of a slot: comments and empty fragments are dropped, fragments (a `v-for`, a `<template>`)\n * are unwrapped. Overlay widgets decorate the first one (the trigger).\n */\nexport function triggerNodes(nodes: VNode[] | undefined): VNode[] {\n const out: VNode[] = []\n for (const node of nodes ?? []) {\n if (node.type === Comment) continue\n if (node.type === Fragment) out.push(...triggerNodes(node.children as VNode[]))\n else out.push(node)\n }\n return out\n}\n\n/** Merges `props` into the trigger (one vnode; several are wrapped in a span). Handlers of the trigger itself are kept. */\nexport function decorate(nodes: VNode[], props: Record<string, unknown>): VNode | undefined {\n if (!nodes.length) return undefined\n const first = nodes.length === 1 ? nodes[0]! : h('span', { style: { display: 'contents' } }, nodes)\n return cloneVNode(first, props, true)\n}\n"],"mappings":";;;;;;AAMA,SAAgB,aAAa,OAAqC;CAChE,MAAM,MAAe,CAAC;CACtB,KAAK,MAAM,QAAQ,SAAS,CAAC,GAAG;EAC9B,IAAI,KAAK,SAAS,SAAS;EAC3B,IAAI,KAAK,SAAS,UAAU,IAAI,KAAK,GAAG,aAAa,KAAK,QAAmB,CAAC;OACzE,IAAI,KAAK,IAAI;CACpB;CACA,OAAO;AACT;;AAGA,SAAgB,SAAS,OAAgB,OAAmD;CAC1F,IAAI,CAAC,MAAM,QAAQ,OAAO,KAAA;CAC1B,MAAM,QAAQ,MAAM,WAAW,IAAI,MAAM,KAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,KAAK;CAClG,OAAO,WAAW,OAAO,OAAO,IAAI;AACtC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/* The PrimeVue kit's token map: the shared `--sk-*` tokens (`styles/tokens.css`) resolve to PrimeVue's `--p-*` variables
|
|
2
|
-
(the semantic tokens of the active preset, `light-dark()` aware, so `.dark` flips them), plus the layout of the kit's
|
|
3
|
-
wrapper components (`.sk-*`). Import it with the editor's sheets; the Nuxt module does it for `kit: 'primevue'`.
|
|
4
|
-
Plain `:root` (not `:where`) so it wins over the defaults in `tokens.css`. */
|
|
5
|
-
:root {
|
|
6
|
-
--sk-bg: var(--p-content-background);
|
|
7
|
-
--sk-fg: var(--p-text-color);
|
|
8
|
-
--sk-fg-highlighted: var(--p-text-hover-color, var(--p-text-color));
|
|
9
|
-
--sk-fg-toned: var(--p-text-muted-color);
|
|
10
|
-
--sk-fg-dimmed: color-mix(in oklab, var(--p-text-muted-color) 65%, var(--p-content-background));
|
|
11
|
-
--sk-muted: var(--p-text-muted-color);
|
|
12
|
-
--sk-border: var(--p-content-border-color);
|
|
13
|
-
--sk-border-accented: var(--p-form-field-border-color, var(--p-content-border-color));
|
|
14
|
-
--sk-primary: var(--p-primary-color);
|
|
15
|
-
--sk-primary-fg: var(--p-primary-contrast-color);
|
|
16
|
-
--sk-success: var(--p-green-500);
|
|
17
|
-
--sk-warning: var(--p-orange-500);
|
|
18
|
-
--sk-danger: var(--p-red-500);
|
|
19
|
-
--sk-info: var(--p-sky-500);
|
|
20
|
-
--sk-radius: var(--p-content-border-radius, 6px);
|
|
21
|
-
--sk-bg-elevated: var(--p-content-hover-background);
|
|
22
|
-
--sk-bg-accented: color-mix(in oklab, var(--p-text-color) 12%, var(--p-content-background));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* --- Buttons ------------------------------------------------------------------------------------------------------ */
|
|
26
|
-
.p-button.sk-icon-only { padding-inline: 0.5rem; aspect-ratio: 1; justify-content: center; }
|
|
27
|
-
.p-button.sk-icon-only.p-button-sm { padding-inline: 0.375rem; }
|
|
28
|
-
.p-button.sk-tinted:not(.p-button-outlined) { background: color-mix(in oklab, var(--p-button-text-primary-color, var(--sk-primary)) 12%, transparent); }
|
|
29
|
-
.p-button.p-button-secondary.sk-tinted:not(.p-button-outlined) { background: var(--sk-bg-accented); }
|
|
30
|
-
.p-button.sk-active.p-button-text { background: var(--sk-bg-accented); }
|
|
31
|
-
.p-tag.sk-tinted { background: color-mix(in oklab, var(--sk-primary) 14%, transparent); color: var(--sk-primary); }
|
|
32
|
-
.p-tag.sk-tinted.p-tag-success { background: color-mix(in oklab, var(--sk-success) 14%, transparent); color: var(--sk-success); }
|
|
33
|
-
.p-tag.sk-tinted.p-tag-warn { background: color-mix(in oklab, var(--sk-warning) 14%, transparent); color: var(--sk-warning); }
|
|
34
|
-
.p-tag.sk-tinted.p-tag-danger { background: color-mix(in oklab, var(--sk-danger) 14%, transparent); color: var(--sk-danger); }
|
|
35
|
-
.p-tag.sk-tinted.p-tag-secondary { background: var(--sk-bg-accented); color: var(--sk-fg); }
|
|
36
|
-
.p-tag.sk-outline { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
|
|
37
|
-
.p-tag.sk-dense { font-size: 0.65rem; padding: 0.1rem 0.35rem; }
|
|
38
|
-
.sk-chip-large .p-badge { font-size: 0.65rem; min-width: 1.1rem; height: 1.1rem; line-height: 1.1rem; }
|
|
39
|
-
|
|
40
|
-
/* --- Menus and tabs ----------------------------------------------------------------------------------------------- */
|
|
41
|
-
.sk-menu-row { display: flex; align-items: center; gap: 0.5rem; width: 100%; }
|
|
42
|
-
.sk-menu-row > svg { width: 1rem; height: 1rem; flex: none; }
|
|
43
|
-
.sk-menu-text { display: flex; flex: 1; min-width: 0; flex-direction: column; }
|
|
44
|
-
.sk-menu-description { font-size: 0.75rem; color: var(--sk-muted); }
|
|
45
|
-
.sk-menu-kbds { margin-left: 1rem; font-size: 0.75rem; color: var(--sk-muted); letter-spacing: 0.05em; }
|
|
46
|
-
.sk-menu-check { display: inline-flex; width: 1rem; height: 1rem; flex: none; }
|
|
47
|
-
.sk-menu-danger { color: var(--sk-danger); }
|
|
48
|
-
.sk-menu-label { padding: 0.5rem 0.75rem 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--sk-muted); }
|
|
49
|
-
.sk-tabs-vertical .p-tablist-tab-list { flex-direction: column; }
|
|
50
|
-
.sk-tabs-vertical .p-tablist-active-bar { display: none; }
|
|
51
|
-
|
|
52
|
-
/* --- Form pieces -------------------------------------------------------------------------------------------------- */
|
|
53
|
-
.sk-field-group.p-inputgroup { display: inline-flex; width: auto; }
|
|
54
|
-
.sk-field-group .p-button { border-radius: var(--sk-radius); }
|
|
55
|
-
.sk-form-field { display: flex; flex-direction: column; gap: 0.375rem; }
|
|
56
|
-
.sk-form-field-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
|
|
57
|
-
.sk-form-field-head { display: flex; flex-direction: column; }
|
|
58
|
-
.sk-form-field-label { font-size: 0.875rem; font-weight: 500; color: var(--sk-fg-highlighted); }
|
|
59
|
-
.sk-form-field-required { color: var(--sk-danger); }
|
|
60
|
-
.sk-form-field-description, .sk-form-field-help { font-size: 0.75rem; color: var(--sk-muted); }
|
|
61
|
-
.sk-input { position: relative; display: inline-flex; align-items: center; width: 100%; }
|
|
62
|
-
.sk-input .p-inputtext { width: 100%; }
|
|
63
|
-
.sk-input-icon .p-inputtext { padding-left: 2rem; }
|
|
64
|
-
.sk-input-leading { position: absolute; left: 0.625rem; color: var(--sk-muted); pointer-events: none; }
|
|
65
|
-
.sk-input-trailing { position: absolute; right: 0.375rem; display: inline-flex; align-items: center; }
|
|
66
|
-
.sk-switch { display: flex; align-items: flex-start; gap: 0.625rem; }
|
|
67
|
-
.sk-switch-text, .sk-radio-text { display: flex; flex-direction: column; cursor: pointer; }
|
|
68
|
-
.sk-switch-label, .sk-radio-label { font-size: 0.875rem; color: var(--sk-fg-highlighted); }
|
|
69
|
-
.sk-switch-description, .sk-radio-description, .sk-select-option-description { font-size: 0.75rem; color: var(--sk-muted); }
|
|
70
|
-
.sk-radio-group { border: 0; margin: 0; padding: 0; min-width: 0; }
|
|
71
|
-
.sk-radio-legend { padding: 0; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--sk-fg-highlighted); }
|
|
72
|
-
.sk-radio-items { display: flex; flex-direction: column; gap: 0.5rem; }
|
|
73
|
-
.sk-radio-group-row .sk-radio-items { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
|
|
74
|
-
.sk-radio-item { display: flex; align-items: flex-start; gap: 0.5rem; }
|
|
75
|
-
.sk-select-option { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
|
|
76
|
-
.sk-select-option-text { display: flex; flex-direction: column; min-width: 0; }
|
|
77
|
-
.sk-modal-description { margin: 0 0 1rem; color: var(--sk-muted); }
|
|
78
|
-
|
|
79
|
-
/* --- Tree and table ----------------------------------------------------------------------------------------------- */
|
|
80
|
-
/* The row slot draws its own chevron, selection and hover state: Prime's toggler and padding step aside. */
|
|
81
|
-
.sk-tree { padding: 0; background: transparent; border: 0; }
|
|
82
|
-
.sk-tree .p-tree-toggler { display: none; }
|
|
83
|
-
.sk-tree .p-tree-node-content { padding: 0; background: transparent; }
|
|
84
|
-
.sk-tree .p-tree-node-content.p-tree-node-selected { background: transparent; color: inherit; }
|
|
85
|
-
.sk-tree .p-tree-node-children { padding-left: 0.75rem; }
|
|
86
|
-
.sk-table .p-datatable-tbody > tr { cursor: pointer; }
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Notifier } from "../../core/notify.js";
|
|
2
|
-
import { VueUiKit } from "./types.js";
|
|
3
|
-
//#region src/vue/kit/primevue.d.ts
|
|
4
|
-
/** The part of PrimeVue's `useToast()` that notices need (PrimeVue identifies a toast by `id`). */
|
|
5
|
-
export interface NoticeToaster {
|
|
6
|
-
add(message: {
|
|
7
|
-
id?: string | number;
|
|
8
|
-
severity: 'info' | 'success' | 'warn' | 'error';
|
|
9
|
-
summary: string;
|
|
10
|
-
detail?: string;
|
|
11
|
-
life?: number;
|
|
12
|
-
closable?: boolean;
|
|
13
|
-
data?: unknown;
|
|
14
|
-
}): void;
|
|
15
|
-
remove(message: {
|
|
16
|
-
id: string | number;
|
|
17
|
-
}): void;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Shows notices as PrimeVue toasts (needs `ToastService` installed and a `<Toast />` mounted by the host). `kind` is the
|
|
21
|
-
* severity; `id` replaces a visible toast of the same id; `duration: 0` keeps it until replaced or dismissed. PrimeVue
|
|
22
|
-
* toasts have no icon or action slot of their own: `icon` and `action` ride along in `data` for a host `<Toast>` template.
|
|
23
|
-
*/
|
|
24
|
-
export declare function primeVueNotifier(toast: NoticeToaster): Notifier;
|
|
25
|
-
/**
|
|
26
|
-
* The PrimeVue kit. The host installs PrimeVue (`app.use(PrimeVue, { theme })`, `ToastService`) and mounts `<Toast />`
|
|
27
|
-
* once, loads `@ecsplico/editor/vue/kit/primevue.css` (it maps the `--sk-*` tokens onto PrimeVue's `--p-*` variables) and
|
|
28
|
-
* has `@iconify/vue` (editor icons are Iconify names; register the `lucide` collection to work offline). The PrimeVue
|
|
29
|
-
* widgets follow the kit contract (`./types`); where PrimeVue has no equivalent of a prop the wrapper's comment says what is ignored.
|
|
30
|
-
*/
|
|
31
|
-
export declare function primeVueKit(): VueUiKit;
|
|
32
|
-
//#endregion
|
|
33
|
-
//# sourceMappingURL=primevue.d.ts.map
|
package/dist/vue/kit/primevue.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./primevue/Icon.js";
|
|
2
|
-
import _sfc_main$1 from "./primevue/Alert.js";
|
|
3
|
-
import _sfc_main$2 from "./primevue/Avatar.js";
|
|
4
|
-
import _sfc_main$3 from "./primevue/Badge.js";
|
|
5
|
-
import _sfc_main$4 from "./primevue/Button.js";
|
|
6
|
-
import _sfc_main$5 from "./primevue/Chip.js";
|
|
7
|
-
import DropdownMenu_default from "./primevue/DropdownMenu.js";
|
|
8
|
-
import _sfc_main$6 from "./primevue/FieldGroup.js";
|
|
9
|
-
import _sfc_main$7 from "./primevue/FormField.js";
|
|
10
|
-
import _sfc_main$8 from "./primevue/Input.js";
|
|
11
|
-
import _sfc_main$9 from "./primevue/InputMenu.js";
|
|
12
|
-
import _sfc_main$10 from "./primevue/Modal.js";
|
|
13
|
-
import Popover_default from "./primevue/Popover.js";
|
|
14
|
-
import _sfc_main$11 from "./primevue/RadioGroup.js";
|
|
15
|
-
import _sfc_main$12 from "./primevue/Select.js";
|
|
16
|
-
import _sfc_main$13 from "./primevue/SelectMenu.js";
|
|
17
|
-
import _sfc_main$14 from "./primevue/Separator.js";
|
|
18
|
-
import _sfc_main$15 from "./primevue/Switch.js";
|
|
19
|
-
import _sfc_main$16 from "./primevue/Table.js";
|
|
20
|
-
import _sfc_main$17 from "./primevue/Tabs.js";
|
|
21
|
-
import _sfc_main$18 from "./primevue/Textarea.js";
|
|
22
|
-
import Tooltip_default from "./primevue/Tooltip.js";
|
|
23
|
-
import _sfc_main$19 from "./primevue/Tree.js";
|
|
24
|
-
import { useToast } from "primevue/usetoast";
|
|
25
|
-
//#region src/vue/kit/primevue.ts
|
|
26
|
-
const SEVERITIES = {
|
|
27
|
-
info: "info",
|
|
28
|
-
success: "success",
|
|
29
|
-
warning: "warn",
|
|
30
|
-
error: "error"
|
|
31
|
-
};
|
|
32
|
-
let nextId = 0;
|
|
33
|
-
/**
|
|
34
|
-
* Shows notices as PrimeVue toasts (needs `ToastService` installed and a `<Toast />` mounted by the host). `kind` is the
|
|
35
|
-
* severity; `id` replaces a visible toast of the same id; `duration: 0` keeps it until replaced or dismissed. PrimeVue
|
|
36
|
-
* toasts have no icon or action slot of their own: `icon` and `action` ride along in `data` for a host `<Toast>` template.
|
|
37
|
-
*/
|
|
38
|
-
function primeVueNotifier(toast) {
|
|
39
|
-
const notify = ({ id, title, description, kind, icon, duration, action }) => {
|
|
40
|
-
if (id !== void 0) toast.remove({ id });
|
|
41
|
-
toast.add({
|
|
42
|
-
id: id ?? `sk-notice-${nextId++}`,
|
|
43
|
-
severity: SEVERITIES[kind ?? "info"],
|
|
44
|
-
summary: title,
|
|
45
|
-
...description !== void 0 && { detail: description },
|
|
46
|
-
...duration !== 0 && { life: duration ?? 5e3 },
|
|
47
|
-
closable: true,
|
|
48
|
-
data: {
|
|
49
|
-
...icon !== void 0 && { icon },
|
|
50
|
-
...action && { action }
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
notify.dismiss = (id) => {
|
|
55
|
-
toast.remove({ id });
|
|
56
|
-
};
|
|
57
|
-
return notify;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* The PrimeVue kit. The host installs PrimeVue (`app.use(PrimeVue, { theme })`, `ToastService`) and mounts `<Toast />`
|
|
61
|
-
* once, loads `@ecsplico/editor/vue/kit/primevue.css` (it maps the `--sk-*` tokens onto PrimeVue's `--p-*` variables) and
|
|
62
|
-
* has `@iconify/vue` (editor icons are Iconify names; register the `lucide` collection to work offline). The PrimeVue
|
|
63
|
-
* widgets follow the kit contract (`./types`); where PrimeVue has no equivalent of a prop the wrapper's comment says what is ignored.
|
|
64
|
-
*/
|
|
65
|
-
function primeVueKit() {
|
|
66
|
-
return {
|
|
67
|
-
Alert: _sfc_main$1,
|
|
68
|
-
Avatar: _sfc_main$2,
|
|
69
|
-
Badge: _sfc_main$3,
|
|
70
|
-
Button: _sfc_main$4,
|
|
71
|
-
Chip: _sfc_main$5,
|
|
72
|
-
DropdownMenu: DropdownMenu_default,
|
|
73
|
-
FieldGroup: _sfc_main$6,
|
|
74
|
-
FormField: _sfc_main$7,
|
|
75
|
-
Icon: _sfc_main,
|
|
76
|
-
Input: _sfc_main$8,
|
|
77
|
-
InputMenu: _sfc_main$9,
|
|
78
|
-
Modal: _sfc_main$10,
|
|
79
|
-
Popover: Popover_default,
|
|
80
|
-
RadioGroup: _sfc_main$11,
|
|
81
|
-
Select: _sfc_main$12,
|
|
82
|
-
SelectMenu: _sfc_main$13,
|
|
83
|
-
Separator: _sfc_main$14,
|
|
84
|
-
Switch: _sfc_main$15,
|
|
85
|
-
Table: _sfc_main$16,
|
|
86
|
-
Tabs: _sfc_main$17,
|
|
87
|
-
Textarea: _sfc_main$18,
|
|
88
|
-
Tooltip: Tooltip_default,
|
|
89
|
-
Tree: _sfc_main$19,
|
|
90
|
-
notifier: () => primeVueNotifier(useToast())
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
//#endregion
|
|
94
|
-
export { primeVueKit, primeVueNotifier };
|
|
95
|
-
|
|
96
|
-
//# sourceMappingURL=primevue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primevue.js","names":[],"sources":["../../../src/vue/kit/primevue.ts"],"sourcesContent":["import { useToast } from 'primevue/usetoast'\nimport type { Notice, Notifier } from '../../core/notify'\nimport type { VueUiKit } from './types'\nimport Alert from './primevue/Alert.vue'\nimport Avatar from './primevue/Avatar.vue'\nimport Badge from './primevue/Badge.vue'\nimport Button from './primevue/Button.vue'\nimport Chip from './primevue/Chip.vue'\nimport DropdownMenu from './primevue/DropdownMenu'\nimport FieldGroup from './primevue/FieldGroup.vue'\nimport FormField from './primevue/FormField.vue'\nimport Icon from './primevue/Icon.vue'\nimport Input from './primevue/Input.vue'\nimport InputMenu from './primevue/InputMenu.vue'\nimport Modal from './primevue/Modal.vue'\nimport Popover from './primevue/Popover'\nimport RadioGroup from './primevue/RadioGroup.vue'\nimport Select from './primevue/Select.vue'\nimport SelectMenu from './primevue/SelectMenu.vue'\nimport Separator from './primevue/Separator.vue'\nimport Switch from './primevue/Switch.vue'\nimport Table from './primevue/Table.vue'\nimport Tabs from './primevue/Tabs.vue'\nimport Textarea from './primevue/Textarea.vue'\nimport Tooltip from './primevue/Tooltip'\nimport Tree from './primevue/Tree.vue'\n\n/** The part of PrimeVue's `useToast()` that notices need (PrimeVue identifies a toast by `id`). */\nexport interface NoticeToaster {\n add(message: { id?: string | number, severity: 'info' | 'success' | 'warn' | 'error', summary: string, detail?: string, life?: number, closable?: boolean, data?: unknown }): void\n remove(message: { id: string | number }): void\n}\n\n// i18n-ignore: toast severity names, not text\nconst SEVERITIES = { info: 'info', success: 'success', warning: 'warn', error: 'error' } as const\n\nlet nextId = 0\n\n/**\n * Shows notices as PrimeVue toasts (needs `ToastService` installed and a `<Toast />` mounted by the host). `kind` is the\n * severity; `id` replaces a visible toast of the same id; `duration: 0` keeps it until replaced or dismissed. PrimeVue\n * toasts have no icon or action slot of their own: `icon` and `action` ride along in `data` for a host `<Toast>` template.\n */\nexport function primeVueNotifier(toast: NoticeToaster): Notifier {\n const notify: Notifier = ({ id, title, description, kind, icon, duration, action }: Notice) => {\n if (id !== undefined) toast.remove({ id })\n toast.add({\n id: id ?? `sk-notice-${nextId++}`,\n severity: SEVERITIES[kind ?? 'info'],\n summary: title,\n ...(description !== undefined && { detail: description }),\n // PrimeVue closes a toast after `life` ms; without `life` it stays until closed.\n ...(duration !== 0 && { life: duration ?? 5000 }),\n closable: true,\n data: { ...(icon !== undefined && { icon }), ...(action && { action }) },\n })\n }\n notify.dismiss = (id) => { toast.remove({ id }) }\n return notify\n}\n\n/**\n * The PrimeVue kit. The host installs PrimeVue (`app.use(PrimeVue, { theme })`, `ToastService`) and mounts `<Toast />`\n * once, loads `@ecsplico/editor/vue/kit/primevue.css` (it maps the `--sk-*` tokens onto PrimeVue's `--p-*` variables) and\n * has `@iconify/vue` (editor icons are Iconify names; register the `lucide` collection to work offline). The PrimeVue\n * widgets follow the kit contract (`./types`); where PrimeVue has no equivalent of a prop the wrapper's comment says what is ignored.\n */\nexport function primeVueKit(): VueUiKit {\n return {\n Alert,\n Avatar,\n Badge,\n Button,\n Chip,\n DropdownMenu,\n FieldGroup,\n FormField,\n Icon,\n Input,\n InputMenu,\n Modal,\n Popover,\n RadioGroup,\n Select,\n SelectMenu,\n Separator,\n Switch,\n Table,\n Tabs,\n Textarea,\n Tooltip,\n Tree,\n notifier: () => primeVueNotifier(useToast() as unknown as NoticeToaster),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAM,aAAa;CAAE,MAAM;CAAQ,SAAS;CAAW,SAAS;CAAQ,OAAO;AAAQ;AAEvF,IAAI,SAAS;;;;;;AAOb,SAAgB,iBAAiB,OAAgC;CAC/D,MAAM,UAAoB,EAAE,IAAI,OAAO,aAAa,MAAM,MAAM,UAAU,aAAqB;EAC7F,IAAI,OAAO,KAAA,GAAW,MAAM,OAAO,EAAE,GAAG,CAAC;EACzC,MAAM,IAAI;GACR,IAAI,MAAM,aAAa;GACvB,UAAU,WAAW,QAAQ;GAC7B,SAAS;GACT,GAAI,gBAAgB,KAAA,KAAa,EAAE,QAAQ,YAAY;GAEvD,GAAI,aAAa,KAAK,EAAE,MAAM,YAAY,IAAK;GAC/C,UAAU;GACV,MAAM;IAAE,GAAI,SAAS,KAAA,KAAa,EAAE,KAAK;IAAI,GAAI,UAAU,EAAE,OAAO;GAAG;EACzE,CAAC;CACH;CACA,OAAO,WAAW,OAAO;EAAE,MAAM,OAAO,EAAE,GAAG,CAAC;CAAE;CAChD,OAAO;AACT;;;;;;;AAQA,SAAgB,cAAwB;CACtC,OAAO;EACL,OAAA;EACA,QAAA;EACA,OAAA;EACA,QAAA;EACA,MAAA;EACA,cAAA;EACA,YAAA;EACA,WAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,OAAA;EACA,SAAA;EACA,YAAA;EACA,QAAA;EACA,YAAA;EACA,WAAA;EACA,QAAA;EACA,OAAA;EACA,MAAA;EACA,UAAA;EACA,SAAA;EACA,MAAA;EACA,gBAAgB,iBAAiB,SAAS,CAA6B;CACzE;AACF"}
|