uncial 3.0.0 → 5.0.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/README.md +6 -1
- package/dist/core/defineBlock.js +5 -2
- package/dist/core/types.d.ts +5 -1
- package/dist/editor/AttributeFieldControl.svelte +156 -3
- package/dist/editor/AttributeFieldControl.svelte.d.ts +4 -0
- package/dist/editor/BlockAttributesPanel.svelte +12 -3
- package/dist/editor/BlockAttributesPanel.svelte.d.ts +5 -0
- package/dist/editor/BlockNodeView.svelte +2 -1
- package/dist/editor/DocumentMetaPanel.svelte +12 -2
- package/dist/editor/DocumentMetaPanel.svelte.d.ts +4 -0
- package/dist/editor/Editor.svelte +26 -9
- package/dist/editor/Editor.svelte.d.ts +3 -0
- package/dist/editor/ImagePicker.svelte +85 -0
- package/dist/editor/ImagePicker.svelte.d.ts +13 -0
- package/dist/editor/bindEditor.d.ts +3 -0
- package/dist/editor/bindEditor.js +1 -1
- package/dist/editor/imageSource.d.ts +14 -0
- package/dist/editor/imageSource.js +1 -0
- package/dist/editor/index.d.ts +1 -0
- package/dist/editor/metaController.js +0 -5
- package/dist/editor/zonedDateTime.d.ts +4 -0
- package/dist/editor/zonedDateTime.js +38 -0
- package/dist/render/SuperscriptMarkFixture.svelte +1 -1
- package/dist/render/SuperscriptMarkFixture.svelte.d.ts +1 -1
- package/dist/render/Tabs.svelte +1 -1
- package/dist/render/index.d.ts +1 -0
- package/dist/render/index.js +1 -0
- package/dist/render/resolveImageSrc.d.ts +6 -0
- package/dist/render/resolveImageSrc.js +10 -0
- package/dist/render/tabSelection.svelte.js +2 -0
- package/dist/shared/ImageBlockFixture.svelte +29 -0
- package/dist/shared/ImageBlockFixture.svelte.d.ts +11 -0
- package/dist/shared/imagePreviews.d.ts +24 -0
- package/dist/shared/imagePreviews.js +78 -0
- package/dist/shared/tiptap.d.ts +2 -1
- package/dist/shared/tiptap.js +16 -13
- package/dist/styles/base.css +89 -9
- package/dist/styles/controls.css +6 -1
- package/dist/ui/ThemeSwitcher.svelte +1 -1
- package/dist/ui/theme.svelte.js +1 -1
- package/dist/web-components/UncialEditor.svelte +4 -0
- package/dist/web-components/UncialEditor.svelte.d.ts +2 -1
- package/dist/web-components/index.d.ts +4 -1
- package/dist/web-components/index.js +6 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnyExtension, JSONContent } from '@tiptap/core';
|
|
2
|
-
import type { BlockAttributesController, ToolbarFeature, ToolbarFeatureSelection } from '../editor/index.js';
|
|
2
|
+
import type { BlockAttributesController, ImageSource, ToolbarFeature, ToolbarFeatureSelection } from '../editor/index.js';
|
|
3
3
|
import type { AttributeSpec, BlockDefinition, BlockRegistry, ContentSchema, DocumentMetaSchema, ValidationIssue } from '../core/types.js';
|
|
4
4
|
interface Props {
|
|
5
5
|
blocks?: BlockRegistry | BlockDefinition[];
|
|
@@ -13,6 +13,7 @@ interface Props {
|
|
|
13
13
|
attributesController?: BlockAttributesController | null;
|
|
14
14
|
attributesPanel?: boolean | 'docked' | 'overlay' | 'off';
|
|
15
15
|
presentation?: 'card' | 'bare';
|
|
16
|
+
imageSource?: ImageSource;
|
|
16
17
|
onIssue?: (issue: ValidationIssue) => void;
|
|
17
18
|
onChange?: (document: JSONContent) => void;
|
|
18
19
|
onMetaChange?: (meta: Record<string, unknown>) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import UncialEditor from './UncialEditor.svelte';
|
|
2
2
|
import UncialRenderer from './UncialRenderer.svelte';
|
|
3
3
|
import type { AnyExtension, JSONContent } from '@tiptap/core';
|
|
4
|
-
import type { BlockAttributesController, ToolbarFeature, ToolbarFeatureSelection } from '../editor/index.js';
|
|
4
|
+
import type { BlockAttributesController, ImageSource, ToolbarFeature, ToolbarFeatureSelection } from '../editor/index.js';
|
|
5
5
|
import type { AttributeSpec, BlockDefinition, BlockRegistry, ContentSchema, DocumentMetaSchema, ValidationIssue } from '../core/types.js';
|
|
6
6
|
type EditorProps = {
|
|
7
7
|
blocks?: BlockRegistry | BlockDefinition[];
|
|
@@ -15,6 +15,7 @@ type EditorProps = {
|
|
|
15
15
|
attributesController?: BlockAttributesController | null;
|
|
16
16
|
attributesPanel?: boolean | 'docked' | 'overlay' | 'off';
|
|
17
17
|
presentation?: 'card' | 'bare';
|
|
18
|
+
imageSource?: ImageSource;
|
|
18
19
|
};
|
|
19
20
|
type EditorHostProps = EditorProps & {
|
|
20
21
|
onIssue?: (issue: ValidationIssue) => void;
|
|
@@ -82,6 +83,8 @@ declare class UncialEditorElement extends UncialElement<EditorHostProps> {
|
|
|
82
83
|
set attributesPanel(value: EditorProps['attributesPanel']);
|
|
83
84
|
get presentation(): EditorProps['presentation'];
|
|
84
85
|
set presentation(value: EditorProps['presentation']);
|
|
86
|
+
get imageSource(): EditorProps['imageSource'];
|
|
87
|
+
set imageSource(value: EditorProps['imageSource']);
|
|
85
88
|
protected mountComponent(target: ShadowRoot): Record<string, unknown>;
|
|
86
89
|
}
|
|
87
90
|
declare class UncialRendererElement extends UncialElement<RendererHostProps> {
|
|
@@ -149,6 +149,12 @@ class UncialEditorElement extends UncialElement {
|
|
|
149
149
|
set presentation(value) {
|
|
150
150
|
this.setProp('presentation', value);
|
|
151
151
|
}
|
|
152
|
+
get imageSource() {
|
|
153
|
+
return this.props.imageSource;
|
|
154
|
+
}
|
|
155
|
+
set imageSource(value) {
|
|
156
|
+
this.setProp('imageSource', value);
|
|
157
|
+
}
|
|
152
158
|
mountComponent(target) {
|
|
153
159
|
return mount(UncialEditor, { target, props: this.props });
|
|
154
160
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uncial",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
"release": "pnpm run prepack && changeset publish",
|
|
127
127
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
128
128
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
129
|
-
"lint": "prettier --check . && eslint .",
|
|
130
|
-
"format": "prettier --write .",
|
|
129
|
+
"lint": "prettier --check . --ignore-path ../../.gitignore --ignore-path ../../.prettierignore && eslint .",
|
|
130
|
+
"format": "prettier --write . --ignore-path ../../.gitignore --ignore-path ../../.prettierignore",
|
|
131
131
|
"test:unit": "vitest --project server",
|
|
132
132
|
"test:browser": "vitest --project client",
|
|
133
133
|
"test": "pnpm run test:unit -- --run && pnpm run test:browser -- --run && pnpm run test:e2e",
|