@lupinum/ginko-editor 0.1.0 → 0.18.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 +7 -73
- package/LICENSE +1 -1
- package/README.md +15 -340
- package/dist/assets.d.ts +70 -0
- package/dist/assets.js +31 -0
- package/dist/core/component-props.d.ts +87 -0
- package/dist/core/component-props.js +134 -0
- package/dist/core/convert.d.ts +24 -0
- package/dist/core/convert.js +278 -0
- package/dist/core/editor.d.ts +60 -0
- package/dist/core/editor.js +85 -0
- package/dist/core/extensions.d.ts +38 -0
- package/dist/core/extensions.js +444 -0
- package/dist/core/file-images.d.ts +9 -0
- package/dist/core/file-images.js +54 -0
- package/dist/core/image-frame.d.ts +23 -0
- package/dist/core/image-frame.js +24 -0
- package/dist/core/index.d.ts +17 -0
- package/dist/core/index.js +17 -0
- package/dist/core/link-card.d.ts +20 -0
- package/dist/core/link-card.js +70 -0
- package/dist/core/link.d.ts +3 -0
- package/dist/core/link.js +8 -0
- package/dist/core/move.d.ts +11 -0
- package/dist/core/move.js +37 -0
- package/dist/core/paste-html.d.ts +6 -0
- package/dist/core/paste-html.js +384 -0
- package/dist/core/paste.d.ts +21 -0
- package/dist/core/paste.js +108 -0
- package/dist/core/problems.d.ts +31 -0
- package/dist/core/problems.js +54 -0
- package/dist/core/search.d.ts +47 -0
- package/dist/core/search.js +148 -0
- package/dist/core/slash.d.ts +93 -0
- package/dist/core/slash.js +215 -0
- package/dist/core/table.d.ts +34 -0
- package/dist/core/table.js +141 -0
- package/dist/core/uploads.d.ts +23 -0
- package/dist/core/uploads.js +71 -0
- package/dist/core/use-editor.d.ts +19 -0
- package/dist/core/use-editor.js +53 -0
- package/dist/index.d.ts +6 -15
- package/dist/index.js +6 -5668
- package/dist/issues.d.ts +49 -0
- package/dist/issues.js +9 -0
- package/dist/today.d.ts +6 -0
- package/dist/today.js +19 -0
- package/dist/useUpload.d.ts +48 -0
- package/dist/useUpload.js +59 -0
- package/dist/values.d.ts +14 -0
- package/dist/values.js +36 -0
- package/package.json +35 -95
- package/dist/GinkoEditor.vue.d.ts +0 -96
- package/dist/GinkoImagePicker.vue.d.ts +0 -36
- package/dist/agent/AGENTS.md +0 -13
- package/dist/agent/pages/docs/getting-started/collaboration.md +0 -435
- package/dist/agent/pages/docs/getting-started/component-coverage.md +0 -107
- package/dist/agent/pages/docs/getting-started/customize.md +0 -384
- package/dist/agent/pages/docs/getting-started/images.md +0 -188
- package/dist/agent/pages/docs/getting-started/in-place-editing.md +0 -110
- package/dist/agent/pages/docs/getting-started/layout-blocks.md +0 -148
- package/dist/agent/pages/docs/getting-started/runtime.md +0 -111
- package/dist/agent/pages/docs/getting-started.md +0 -128
- package/dist/authoring-D7MJezVG.js +0 -1780
- package/dist/authoring-D7MJezVG.js.map +0 -1
- package/dist/authoring.d.ts +0 -122
- package/dist/authoring.js +0 -2
- package/dist/collaboration.d.ts +0 -14
- package/dist/collaboration.js +0 -907
- package/dist/collaboration.js.map +0 -1
- package/dist/composables/useAssetRequests.d.ts +0 -44
- package/dist/composables/useCollaborationBinding.d.ts +0 -59
- package/dist/composables/useDevice.d.ts +0 -10
- package/dist/composables/useInsertMenu.d.ts +0 -67
- package/dist/composables/useMarkdownSync.d.ts +0 -96
- package/dist/composables/useStableAuthoringKit.d.ts +0 -16
- package/dist/documentConfig-Z6LdrWZj.js +0 -2360
- package/dist/documentConfig-Z6LdrWZj.js.map +0 -1
- package/dist/editorProps.d.ts +0 -124
- package/dist/index.js.map +0 -1
- package/dist/layout-kit.d.ts +0 -922
- package/dist/lib/collaboration/presence-record.d.ts +0 -18
- package/dist/lib/collaboration/presence.d.ts +0 -103
- package/dist/lib/collaboration/protocol.d.ts +0 -133
- package/dist/lib/collaboration/recovery.d.ts +0 -45
- package/dist/lib/collaboration/session.d.ts +0 -163
- package/dist/lib/collaboration/validation.d.ts +0 -42
- package/dist/lib/component-converters.d.ts +0 -119
- package/dist/lib/config/documentConfig.d.ts +0 -19
- package/dist/lib/config/editorConfig.d.ts +0 -38
- package/dist/lib/container-items.d.ts +0 -55
- package/dist/lib/conversionInvariants.d.ts +0 -3
- package/dist/lib/conversionLogger.d.ts +0 -10
- package/dist/lib/conversionPipeline.d.ts +0 -17
- package/dist/lib/conversionState.d.ts +0 -10
- package/dist/lib/conversionTypes.d.ts +0 -50
- package/dist/lib/editor-operations.d.ts +0 -39
- package/dist/lib/environment.d.ts +0 -6
- package/dist/lib/extensions/code-block.d.ts +0 -18
- package/dist/lib/extensions/component-boundary.d.ts +0 -9
- package/dist/lib/extensions/container-items.d.ts +0 -29
- package/dist/lib/extensions/element.d.ts +0 -19
- package/dist/lib/extensions/file.d.ts +0 -24
- package/dist/lib/extensions/heading.d.ts +0 -5
- package/dist/lib/extensions/image-upload.d.ts +0 -39
- package/dist/lib/extensions/image.d.ts +0 -39
- package/dist/lib/extensions/index.d.ts +0 -10
- package/dist/lib/extensions/inline-element.d.ts +0 -13
- package/dist/lib/extensions/markdown-clipboard.d.ts +0 -21
- package/dist/lib/extensions/profile.d.ts +0 -11
- package/dist/lib/extensions/slot.d.ts +0 -16
- package/dist/lib/extensions/span-style.d.ts +0 -15
- package/dist/lib/extensions/video.d.ts +0 -15
- package/dist/lib/image-properties.d.ts +0 -20
- package/dist/lib/input-rules.d.ts +0 -7
- package/dist/lib/markdown.d.ts +0 -11
- package/dist/lib/marks.d.ts +0 -7
- package/dist/lib/mdcToTiptap.d.ts +0 -20
- package/dist/lib/mdcTypes.d.ts +0 -20
- package/dist/lib/nodes.d.ts +0 -57
- package/dist/lib/nodeviews/block-actions.d.ts +0 -7
- package/dist/lib/nodeviews/code.d.ts +0 -4
- package/dist/lib/nodeviews/columns.d.ts +0 -17
- package/dist/lib/nodeviews/component.d.ts +0 -6
- package/dist/lib/nodeviews/icons.d.ts +0 -26
- package/dist/lib/nodeviews/image.d.ts +0 -9
- package/dist/lib/nodeviews/items.d.ts +0 -15
- package/dist/lib/nodeviews/lifecycle.d.ts +0 -45
- package/dist/lib/nodeviews/popover.d.ts +0 -15
- package/dist/lib/nodeviews/settings.d.ts +0 -11
- package/dist/lib/nodeviews/table-operations.d.ts +0 -50
- package/dist/lib/nodeviews/table.d.ts +0 -4
- package/dist/lib/profiles.d.ts +0 -62
- package/dist/lib/property-input.d.ts +0 -10
- package/dist/lib/property-step.d.ts +0 -77
- package/dist/lib/props.d.ts +0 -13
- package/dist/lib/stripStyleNodes.d.ts +0 -2
- package/dist/lib/tiptapToMdc.d.ts +0 -18
- package/dist/presence-record-CLdPZWKC.js +0 -291
- package/dist/presence-record-CLdPZWKC.js.map +0 -1
- package/dist/runtime.d.ts +0 -13
- package/dist/runtime.js +0 -3
- package/dist/style.css +0 -2
- package/dist/types.d.ts +0 -126
- package/dist/ui/GinkoActionButton.vue.d.ts +0 -8
- package/dist/ui/GinkoInsertMenu.vue.d.ts +0 -49
- package/dist/ui/GinkoKeyboardDock.vue.d.ts +0 -15
- package/dist/ui/GinkoNodePopover.vue.d.ts +0 -21
- package/dist/ui/GinkoRecipeIcon.vue.d.ts +0 -6
- package/dist/ui/GinkoSelectionToolbar.vue.d.ts +0 -10
- package/dist/ui/GinkoToolbar.vue.d.ts +0 -26
- package/dist/ui/GinkoToolbarIcon.vue.d.ts +0 -6
- package/dist/ui/block-shortcuts.d.ts +0 -6
- package/dist/ui/commands.d.ts +0 -78
- package/dist/ui/context.d.ts +0 -23
- package/dist/ui/editor-keyboard.d.ts +0 -15
- package/dist/ui/messages.d.ts +0 -214
- package/dist/ui/messages.de.d.ts +0 -6
- package/dist/ui/recipe-command.d.ts +0 -14
- package/dist/ui/recipe-search.d.ts +0 -47
- package/dist/ui/slash-command.d.ts +0 -17
- package/dist/ui/writingRecipes.d.ts +0 -13
- package/skills/ginko-editor/SKILL.md +0 -40
- package/skills/ginko-editor/agents/openai.yaml +0 -4
- package/skills/ginko-editor/references/in-place-editing.md +0 -50
- package/skills/ginko-editor/references/quickstart.md +0 -55
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# In-place editing
|
|
2
|
-
|
|
3
|
-
Use `variant="inline"` to edit text where it appears on the page. It has no
|
|
4
|
-
frame, header, or source switch and uses the host's typography.
|
|
5
|
-
|
|
6
|
-
```vue
|
|
7
|
-
<GinkoEditor v-model="lead" variant="inline" profile="inline"
|
|
8
|
-
:messages="germanMessages" aria-label="Einleitung" />
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Profiles
|
|
12
|
-
|
|
13
|
-
| Profile | Allowed |
|
|
14
|
-
| --- | --- |
|
|
15
|
-
| `plain` | Paragraphs, line breaks |
|
|
16
|
-
| `inline` | `plain` + bold, italic, link |
|
|
17
|
-
| `article` | `inline` + headings 2–4, lists, quotes, dividers, images |
|
|
18
|
-
| `full` | Everything (default) |
|
|
19
|
-
|
|
20
|
-
The profile limits the toolbar, shortcuts, slash menu, Markdown input rules,
|
|
21
|
-
and paste. Paste keeps the text and removes structure and formatting that the
|
|
22
|
-
profile does not allow. Loaded content is not changed.
|
|
23
|
-
|
|
24
|
-
Enforce the profile on save as well:
|
|
25
|
-
|
|
26
|
-
```ts
|
|
27
|
-
import { findProfileViolations } from '@lupinum/ginko-editor/runtime'
|
|
28
|
-
|
|
29
|
-
const violations = findProfileViolations(tiptapJson, 'article')
|
|
30
|
-
if (violations.length) throw new Error('This text contains formatting that is not allowed here.')
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Toolbars
|
|
34
|
-
|
|
35
|
-
| Prop | Values | Default |
|
|
36
|
-
| --- | --- | --- |
|
|
37
|
-
| `toolbarPlacement` | `top`, `keyboard`, `auto`, `false` | `top` (default variant), `auto` (inline) |
|
|
38
|
-
| `selectionToolbar` | `auto`, `always`, `false` | `auto` (off on touch devices) |
|
|
39
|
-
| `selectionToolbarItems` | Toolbar groups | bold, italic, strike, code, link |
|
|
40
|
-
| `header`, `sourceToggle` | booleans | `true` for default, `false` for inline |
|
|
41
|
-
|
|
42
|
-
`keyboard` docks the formatting row above the on-screen keyboard while the
|
|
43
|
-
editor has focus. `auto` uses it on touch devices.
|
|
44
|
-
|
|
45
|
-
## Styling
|
|
46
|
-
|
|
47
|
-
Style the element around the editor like the published page. Focus outline:
|
|
48
|
-
`--ginko-inline-focus-outline`, `--ginko-inline-focus-offset`,
|
|
49
|
-
`--ginko-inline-focus-radius`. Avoid `transform` on ancestors, because the
|
|
50
|
-
floating toolbars use fixed positioning.
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Quickstart
|
|
2
|
-
|
|
3
|
-
## Install
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
pnpm add @lupinum/ginko-editor @lupinum/ginko-content @tiptap/core @tiptap/pm @tiptap/vue-3 vue
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Mount and save
|
|
10
|
-
|
|
11
|
-
```vue
|
|
12
|
-
<script setup lang="ts">
|
|
13
|
-
import { ref } from 'vue'
|
|
14
|
-
import { GinkoEditor, type GinkoEditorHandle } from '@lupinum/ginko-editor'
|
|
15
|
-
import '@lupinum/ginko-editor/style.css'
|
|
16
|
-
|
|
17
|
-
const source = ref('# Hello\n')
|
|
18
|
-
const editor = ref<GinkoEditorHandle>()
|
|
19
|
-
|
|
20
|
-
async function save() {
|
|
21
|
-
const result = await editor.value?.flush()
|
|
22
|
-
if (!result?.ok) return // keep the editor open; show result.error.message
|
|
23
|
-
await persist(source.value)
|
|
24
|
-
}
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<template>
|
|
28
|
-
<GinkoEditor ref="editor" v-model="source" @conversion-error="console.warn" />
|
|
29
|
-
<button type="button" @click="save">Save</button>
|
|
30
|
-
</template>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Nuxt
|
|
34
|
-
|
|
35
|
-
```ts
|
|
36
|
-
export default defineNuxtConfig({
|
|
37
|
-
css: ['@lupinum/ginko-editor/style.css'],
|
|
38
|
-
vite: { resolve: { dedupe: ['@lupinum/ginko-content'] } },
|
|
39
|
-
})
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Render the editor only where the page is interactive. It renders its content
|
|
43
|
-
after it mounts, so wrap it in `<ClientOnly>` when server markup matters.
|
|
44
|
-
|
|
45
|
-
## Common props
|
|
46
|
-
|
|
47
|
-
| Prop | Use |
|
|
48
|
-
| --- | --- |
|
|
49
|
-
| `toolbarItems` | Groups of commands for the top row |
|
|
50
|
-
| `messages` | Interface text; `germanMessages` for German |
|
|
51
|
-
| `shortcuts` | Change or turn off shortcuts (`false`) |
|
|
52
|
-
| `enableImages`, `enableFiles`, `enableVideo` | Show or hide media insertion |
|
|
53
|
-
| `imageUpload`, `imagePicker`, `assetProvider` | Host-owned media |
|
|
54
|
-
| `authoringKit` | Components and recipes for the insert menu |
|
|
55
|
-
| `disabled` | Read-only |
|