@nuxt-atelier/editor 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/module.d.mts +14 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +27 -0
- package/dist/runtime/CommandPalette.d.vue.ts +17 -0
- package/dist/runtime/CommandPalette.vue +98 -0
- package/dist/runtime/CommandPalette.vue.d.ts +17 -0
- package/dist/runtime/StructureList.d.vue.ts +21 -0
- package/dist/runtime/StructureList.vue +98 -0
- package/dist/runtime/StructureList.vue.d.ts +21 -0
- package/dist/runtime/VisualEditor.d.vue.ts +3 -0
- package/dist/runtime/VisualEditor.vue +885 -0
- package/dist/runtime/VisualEditor.vue.d.ts +3 -0
- package/dist/runtime/commands.d.ts +39 -0
- package/dist/runtime/commands.js +10 -0
- package/dist/runtime/dnd.d.ts +24 -0
- package/dist/runtime/dnd.js +1 -0
- package/dist/runtime/editor.css +1 -0
- package/dist/runtime/history.d.ts +12 -0
- package/dist/runtime/history.js +37 -0
- package/dist/runtime/inline-rich.d.ts +2 -0
- package/dist/runtime/inline-rich.js +12 -0
- package/dist/runtime/tree.d.ts +56 -0
- package/dist/runtime/tree.js +74 -0
- package/dist/types.d.mts +3 -0
- package/package.json +45 -4
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** What a command can do in the editor. */
|
|
2
|
+
export interface EditorContext {
|
|
3
|
+
/** The selected block's id, if any. */
|
|
4
|
+
selected: string | null;
|
|
5
|
+
select: (id: string | null) => void;
|
|
6
|
+
/** Inserts a new block of `type` after the selected one (or at the end of the first list); false if it can't go there. */
|
|
7
|
+
insert: (type: string) => boolean;
|
|
8
|
+
/** The entry's data as edited, and a way to replace it (one undoable step). */
|
|
9
|
+
data: () => Record<string, unknown>;
|
|
10
|
+
setData: (data: Record<string, unknown>) => void;
|
|
11
|
+
undo: () => void;
|
|
12
|
+
redo: () => void;
|
|
13
|
+
save: () => Promise<void>;
|
|
14
|
+
/** Replaces a block's props (one undoable step). */
|
|
15
|
+
setProps: (blockId: string, props: Record<string, unknown>) => void;
|
|
16
|
+
}
|
|
17
|
+
/** A block, as a block action is given it (a copy). */
|
|
18
|
+
export interface EditorBlock {
|
|
19
|
+
id: string;
|
|
20
|
+
type: string;
|
|
21
|
+
props: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export interface EditorCommand {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
/** Shown beside the label: what kind of command it is. */
|
|
27
|
+
group?: string;
|
|
28
|
+
run: (context: EditorContext) => void | Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
/** Gives the commands that apply now (asked each time the palette opens and as the user types). */
|
|
31
|
+
export type EditorCommands = (context: EditorContext) => EditorCommand[];
|
|
32
|
+
/** Adds commands to the editor's palette. */
|
|
33
|
+
export declare function addEditorCommands(commands: EditorCommands): void;
|
|
34
|
+
export declare const addedCommands: (context: EditorContext) => EditorCommand[];
|
|
35
|
+
/** Gives the actions a block has (asked when it's selected). */
|
|
36
|
+
export type BlockActions = (block: EditorBlock, context: EditorContext) => EditorCommand[];
|
|
37
|
+
/** Adds actions to blocks: "Translate block", say. Return none for blocks they don't apply to. */
|
|
38
|
+
export declare function addBlockActions(actions: BlockActions): void;
|
|
39
|
+
export declare const addedBlockActions: (block: EditorBlock, context: EditorContext) => EditorCommand[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const added = [];
|
|
2
|
+
export function addEditorCommands(commands) {
|
|
3
|
+
added.push(commands);
|
|
4
|
+
}
|
|
5
|
+
export const addedCommands = (context) => added.flatMap((c) => c(context));
|
|
6
|
+
const blockActions = [];
|
|
7
|
+
export function addBlockActions(actions) {
|
|
8
|
+
blockActions.push(actions);
|
|
9
|
+
}
|
|
10
|
+
export const addedBlockActions = (block, context) => blockActions.flatMap((a) => a(block, context));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { InjectionKey, Ref } from 'vue';
|
|
2
|
+
/** What's being dragged: a block already in the entry, or a new one from the palette. */
|
|
3
|
+
export type Dragged = {
|
|
4
|
+
kind: 'block';
|
|
5
|
+
id: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'new';
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
/** Where it would go: index `index` of the list at `list`. */
|
|
11
|
+
export interface DropAt {
|
|
12
|
+
list: string;
|
|
13
|
+
index: number;
|
|
14
|
+
}
|
|
15
|
+
export interface Dnd {
|
|
16
|
+
dragging: Ref<Dragged | null>;
|
|
17
|
+
dropAt: Ref<DropAt | null>;
|
|
18
|
+
start: (event: DragEvent, dragged: Dragged) => void;
|
|
19
|
+
/** Over a spot: whether it may go there (and the spot shown) or not (none shown). Call on dragover. */
|
|
20
|
+
over: (event: DragEvent, at: DropAt) => void;
|
|
21
|
+
drop: (event: DragEvent) => void;
|
|
22
|
+
end: () => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const dndKey: InjectionKey<Dnd>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const dndKey = Symbol("atelier-editor-dnd");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ate-editor{--ate-scale:1;display:grid;gap:var(--space-3);grid-template-rows:auto auto 1fr;min-block-size:80vh}.ate-editor__bar{align-items:end;display:flex;flex-wrap:wrap;gap:var(--space-2)}.ate-editor__width input{inline-size:6rem}.ate-editor__body{display:grid;gap:var(--space-3);grid-template-columns:minmax(12rem,16rem) 1fr minmax(16rem,22rem);min-block-size:0}.ate-editor__panel,.ate-editor__structure{max-block-size:80vh;overflow:auto}.ate-editor__stage{background:var(--surface-sunken,transparent);border-radius:var(--radius-md);overflow:hidden}.ate-editor__viewport{block-size:calc(80vh/var(--ate-scale));margin-block-end:calc(80vh - 80vh/var(--ate-scale));margin-inline:auto;max-inline-size:none;position:relative;transform:scale(var(--ate-scale));transform-origin:0 0}.ate-editor__frame{background:#fff;block-size:100%;border:0;display:block;inline-size:100%}.ate-editor__overlay{inset:0;overflow:hidden;pointer-events:none;position:absolute}.ate-editor__box{border-radius:2px;box-sizing:border-box;position:absolute}.ate-editor__box--hover{--ate-line:calc(2px/var(--ate-scale));outline:var(--ate-line) dashed var(--accent-primary-base);outline-offset:calc(var(--ate-line)*-1)}.ate-editor__box--selected{--ate-line:calc(2px/var(--ate-scale));outline:var(--ate-line) solid var(--accent-primary-strong);outline-offset:calc(var(--ate-line)*-1)}.ate-editor__tag{background:var(--accent-primary-strong);color:var(--content-on-accent);cursor:grab;font-size:.75rem;inset-block-end:100%;inset-inline-start:-2px;line-height:1.5;padding:0 .4em;position:absolute;transform:scale(calc(1/var(--ate-scale)));transform-origin:0 100%}.ate-editor__overlay--dropping,.ate-editor__tag{pointer-events:auto}.ate-editor__drop{background:var(--accent-primary-strong);block-size:calc(3px/var(--ate-scale));border-radius:2px;margin-block-start:calc(-1px/var(--ate-scale));position:absolute}.ate-editor__box--top .ate-editor__tag{inset-block:0 auto;inset-inline-start:0;transform-origin:0 0}.ate-editor__tabs [aria-pressed=true]{background:var(--accent-primary-soft);color:var(--content-primary)}.ate-editor__markers{inset:0;overflow:hidden;pointer-events:none;position:absolute}.ate-editor__marker{background:var(--accent-secondary-strong);block-size:1.5rem;border:0;border-radius:.75rem .75rem .75rem .15rem;color:var(--content-on-accent);cursor:pointer;font:inherit;font-size:.75rem;font-weight:600;margin:2px;min-inline-size:1.5rem;padding:0 .35em;pointer-events:auto;position:absolute;transform:scale(calc(1/var(--ate-scale))) translate(-.25rem,-.25rem);transform-origin:0 0}.ate-editor__marker:focus-visible{outline:2px solid var(--accent-primary-strong);outline-offset:2px}.ate-editor__panel [data-highlighted]{outline:2px solid var(--accent-primary-strong)}.ate-editor__reuse{display:grid;gap:var(--space-2);margin-block:var(--space-2)}.ate-editor__reuse>summary{color:var(--content-secondary);cursor:pointer}.ate-tree{list-style:none;margin:0;padding:0}.ate-tree__block{background:transparent;border:0;border-radius:var(--radius-sm);color:var(--content-primary);cursor:pointer;display:block;font:inherit;inline-size:100%;padding-block:var(--space-1);padding-inline-end:var(--space-2);text-align:start}.ate-tree__block[aria-pressed=true]{background:var(--accent-primary-soft)}.ate-tree__block:hover,.ate-tree__block[data-hovered]{background:var(--accent-primary-subtle)}.ate-tree__block:focus-visible{outline:2px solid var(--accent-primary-strong);outline-offset:-2px}.ate-tree__item[data-drop-before]>.ate-tree__block{box-shadow:inset 0 2px 0 var(--accent-primary-strong)}.ate-tree__item[data-drop-after]>.ate-tree__block{box-shadow:inset 0 -2px 0 var(--accent-primary-strong)}.ate-tree__empty{border:1px dashed var(--border-default,currentColor);border-radius:var(--radius-sm);color:var(--content-secondary);font-size:.85em;padding-block:var(--space-1)}.ate-tree__empty[data-drop-before]{border-color:var(--accent-primary-strong)}.ate-palette{display:flex;flex-wrap:wrap;gap:var(--space-1);list-style:none;margin:var(--space-1) 0 0;padding:0}.ate-palette__block{background:var(--surface-raised,transparent);border:1px solid var(--border-default,currentColor);border-radius:var(--radius-sm);color:var(--content-primary);cursor:grab;font:inherit;font-size:.85em;padding:var(--space-1) var(--space-2)}.ate-palette__block:disabled{cursor:not-allowed;opacity:.5}.ate-palette__block:focus-visible{outline:2px solid var(--accent-primary-strong);outline-offset:1px}.ate-tree__area{color:var(--content-secondary);font-size:.75rem;letter-spacing:.04em;margin:var(--space-1) 0 0;text-transform:uppercase}@media (max-width:64rem){.ate-editor__body{grid-template-columns:1fr}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function createHistory<T>(options?: {
|
|
2
|
+
coalesceMs?: number;
|
|
3
|
+
limit?: number;
|
|
4
|
+
}): {
|
|
5
|
+
/** Records the state before a change; `kind` 'typing' merges with the step before it, within the pause. */
|
|
6
|
+
record(before: T, kind: "typing" | "operation"): void;
|
|
7
|
+
/** The state to go back to (giving the current one to redo), or undefined. */
|
|
8
|
+
undo(current: T): T | undefined;
|
|
9
|
+
redo(current: T): T | undefined;
|
|
10
|
+
canUndo: () => boolean;
|
|
11
|
+
canRedo: () => boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function createHistory(options = {}) {
|
|
2
|
+
const coalesceMs = options.coalesceMs ?? 600;
|
|
3
|
+
const limit = options.limit ?? 200;
|
|
4
|
+
const past = [];
|
|
5
|
+
const future = [];
|
|
6
|
+
let last;
|
|
7
|
+
return {
|
|
8
|
+
/** Records the state before a change; `kind` 'typing' merges with the step before it, within the pause. */
|
|
9
|
+
record(before, kind) {
|
|
10
|
+
const now = Date.now();
|
|
11
|
+
if (!(kind === "typing" && last?.kind === "typing" && now - last.at < coalesceMs)) {
|
|
12
|
+
past.push(before);
|
|
13
|
+
if (past.length > limit)
|
|
14
|
+
past.shift();
|
|
15
|
+
}
|
|
16
|
+
last = { kind, at: now };
|
|
17
|
+
future.length = 0;
|
|
18
|
+
},
|
|
19
|
+
/** The state to go back to (giving the current one to redo), or undefined. */
|
|
20
|
+
undo(current) {
|
|
21
|
+
const previous = past.pop();
|
|
22
|
+
if (previous !== void 0)
|
|
23
|
+
future.push(current);
|
|
24
|
+
last = void 0;
|
|
25
|
+
return previous;
|
|
26
|
+
},
|
|
27
|
+
redo(current) {
|
|
28
|
+
const next = future.pop();
|
|
29
|
+
if (next !== void 0)
|
|
30
|
+
past.push(current);
|
|
31
|
+
last = void 0;
|
|
32
|
+
return next;
|
|
33
|
+
},
|
|
34
|
+
canUndo: () => past.length > 0,
|
|
35
|
+
canRedo: () => future.length > 0
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
3
|
+
export const inlineRich = (element, value, change) => {
|
|
4
|
+
const editor = new Editor({
|
|
5
|
+
element,
|
|
6
|
+
content: value ?? "",
|
|
7
|
+
extensions: [StarterKit.configure({ heading: { levels: [2, 3] }, link: { openOnClick: false, autolink: true, defaultProtocol: "https" } })],
|
|
8
|
+
onUpdate: ({ editor: e }) => change(e.isEmpty ? null : e.getJSON())
|
|
9
|
+
});
|
|
10
|
+
editor.commands.focus("end");
|
|
11
|
+
return () => editor.destroy();
|
|
12
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { AreaRules, BlockSchema } from '#atelier/shared/blocks';
|
|
2
|
+
export { newBlock } from '#atelier/shared/blocks';
|
|
3
|
+
export interface Block {
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
props: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
/** A list of blocks: an entry field (`content`) or a block's area (`content.0.props.items`), with its rules. */
|
|
9
|
+
export interface BlockList {
|
|
10
|
+
path: string;
|
|
11
|
+
label: string;
|
|
12
|
+
rules: AreaRules;
|
|
13
|
+
blocks: TreeBlock[];
|
|
14
|
+
}
|
|
15
|
+
export interface TreeBlock {
|
|
16
|
+
id: string;
|
|
17
|
+
type: string;
|
|
18
|
+
label: string;
|
|
19
|
+
path: string;
|
|
20
|
+
areas: BlockList[];
|
|
21
|
+
}
|
|
22
|
+
type Registry = Record<string, BlockSchema>;
|
|
23
|
+
type Fields = Record<string, {
|
|
24
|
+
type: string;
|
|
25
|
+
label?: string;
|
|
26
|
+
allow?: readonly string[];
|
|
27
|
+
minItems?: number;
|
|
28
|
+
maxItems?: number;
|
|
29
|
+
}>;
|
|
30
|
+
/** The block lists of an entry: one per blocks field, each block with its areas. */
|
|
31
|
+
export declare function blockTree(data: Record<string, unknown>, fields: Fields, registry: Registry): BlockList[];
|
|
32
|
+
/** Every list in the tree, depth first. */
|
|
33
|
+
export declare function allLists(lists: BlockList[]): BlockList[];
|
|
34
|
+
/** A block in the tree: itself, the list holding it, and its index there. */
|
|
35
|
+
export declare function locate(lists: BlockList[], id: string): {
|
|
36
|
+
block: TreeBlock;
|
|
37
|
+
list: BlockList;
|
|
38
|
+
index: number;
|
|
39
|
+
} | undefined;
|
|
40
|
+
export declare function get(data: unknown, path: string): unknown;
|
|
41
|
+
/** Whether a block of `type` may go in `target` (its rules, and its size limit unless it's moving within it). */
|
|
42
|
+
export declare function accepts(target: BlockList, type: string, registry: Registry, moving?: boolean): boolean;
|
|
43
|
+
/** Inserts `block` into the list at `path`, at `index`. */
|
|
44
|
+
export declare function insert<T>(data: T, path: string, index: number, block: Block): T;
|
|
45
|
+
/** Removes the block `id` (and what's in its areas). */
|
|
46
|
+
export declare function remove<T>(data: T, lists: BlockList[], id: string): T;
|
|
47
|
+
/**
|
|
48
|
+
* Moves block `id` to `index` in the list at `to` (its own list or another), or answers undefined when the
|
|
49
|
+
* target doesn't take it or it would go inside itself.
|
|
50
|
+
*/
|
|
51
|
+
export declare function move<T>(data: T, lists: BlockList[], registry: Registry, id: string, to: string, index: number): T | undefined;
|
|
52
|
+
/** A copy of block `id` (fresh ids, all the way down) right after it, when its list has room. */
|
|
53
|
+
export declare function duplicate<T>(data: T, lists: BlockList[], registry: Registry, id: string): {
|
|
54
|
+
data: T;
|
|
55
|
+
id: string;
|
|
56
|
+
} | undefined;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { copyBlocks } from "#atelier/shared/blocks";
|
|
2
|
+
import { placeable } from "#atelier/shared/fields";
|
|
3
|
+
export { newBlock } from "#atelier/shared/blocks";
|
|
4
|
+
const isBlock = (x) => !!x && typeof x === "object" && typeof x.id === "string" && typeof x.type === "string";
|
|
5
|
+
function list(path, label, rules, value, registry) {
|
|
6
|
+
const blocks = (Array.isArray(value) ? value : []).filter(isBlock).map((block, i) => {
|
|
7
|
+
const at = `${path}.${i}`;
|
|
8
|
+
const schema = registry[block.type];
|
|
9
|
+
return {
|
|
10
|
+
id: block.id,
|
|
11
|
+
type: block.type,
|
|
12
|
+
label: schema?.label ?? block.type,
|
|
13
|
+
path: at,
|
|
14
|
+
areas: Object.entries(schema?.areas ?? {}).map(([name, area]) => list(`${at}.props.${name}`, area.label ?? name, area, block.props?.[name], registry))
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
return { path, label, rules, blocks };
|
|
18
|
+
}
|
|
19
|
+
export function blockTree(data, fields, registry) {
|
|
20
|
+
return Object.entries(fields).filter(([, f]) => f.type === "blocks").map(([key, f]) => list(key, f.label ?? key, { ...f.allow ? { allow: [...f.allow] } : {}, ...f.minItems !== void 0 ? { min: f.minItems } : {}, ...f.maxItems !== void 0 ? { max: f.maxItems } : {} }, data[key], registry));
|
|
21
|
+
}
|
|
22
|
+
export function allLists(lists) {
|
|
23
|
+
return lists.flatMap((l) => [l, ...l.blocks.flatMap((b) => allLists(b.areas))]);
|
|
24
|
+
}
|
|
25
|
+
export function locate(lists, id) {
|
|
26
|
+
for (const l of allLists(lists)) {
|
|
27
|
+
const index = l.blocks.findIndex((b) => b.id === id);
|
|
28
|
+
if (index >= 0)
|
|
29
|
+
return { block: l.blocks[index], list: l, index };
|
|
30
|
+
}
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
const keys = (path) => path.split(".").map((k) => /^\d+$/.test(k) ? Number(k) : k);
|
|
34
|
+
export function get(data, path) {
|
|
35
|
+
return keys(path).reduce((at, key) => at?.[key], data);
|
|
36
|
+
}
|
|
37
|
+
function set(data, path, value) {
|
|
38
|
+
const [key, ...rest] = keys(path);
|
|
39
|
+
const copy = Array.isArray(data) ? [...data] : { ...data };
|
|
40
|
+
copy[key] = rest.length ? set(copy[key] ?? (typeof rest[0] === "number" ? [] : {}), rest.join("."), value) : value;
|
|
41
|
+
return copy;
|
|
42
|
+
}
|
|
43
|
+
const blocksAt = (data, path) => Array.isArray(get(data, path)) ? get(data, path) : [];
|
|
44
|
+
export function accepts(target, type, registry, moving = false) {
|
|
45
|
+
return placeable(type, registry[type], target.rules) && (moving || target.rules.max === void 0 || target.blocks.length < target.rules.max);
|
|
46
|
+
}
|
|
47
|
+
export function insert(data, path, index, block) {
|
|
48
|
+
const blocks = [...blocksAt(data, path)];
|
|
49
|
+
blocks.splice(Math.max(0, Math.min(index, blocks.length)), 0, block);
|
|
50
|
+
return set(data, path, blocks);
|
|
51
|
+
}
|
|
52
|
+
export function remove(data, lists, id) {
|
|
53
|
+
const at = locate(lists, id);
|
|
54
|
+
return at ? set(data, at.list.path, blocksAt(data, at.list.path).filter((b) => b.id !== id)) : data;
|
|
55
|
+
}
|
|
56
|
+
export function move(data, lists, registry, id, to, index) {
|
|
57
|
+
const at = locate(lists, id);
|
|
58
|
+
const target = allLists(lists).find((l) => l.path === to);
|
|
59
|
+
if (!at || !target || to.startsWith(`${at.block.path}.`))
|
|
60
|
+
return void 0;
|
|
61
|
+
const same = at.list.path === to;
|
|
62
|
+
if (!accepts(target, at.block.type, registry, same))
|
|
63
|
+
return void 0;
|
|
64
|
+
const block = get(data, at.block.path);
|
|
65
|
+
const without = set(data, at.list.path, blocksAt(data, at.list.path).filter((b) => b.id !== id));
|
|
66
|
+
return insert(without, to, same && index > at.index ? index - 1 : index, block);
|
|
67
|
+
}
|
|
68
|
+
export function duplicate(data, lists, registry, id) {
|
|
69
|
+
const at = locate(lists, id);
|
|
70
|
+
if (!at || !accepts(at.list, at.block.type, registry))
|
|
71
|
+
return void 0;
|
|
72
|
+
const [copy] = copyBlocks([get(data, at.block.path)]);
|
|
73
|
+
return { data: insert(data, at.list.path, at.index + 1, copy), id: copy.id };
|
|
74
|
+
}
|
package/dist/types.d.mts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt-atelier/editor",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/AnoRebel/nuxt-atelier.git",
|
|
9
|
+
"directory": "packages/editor"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://nuxt-atelier.anorebel.net",
|
|
12
|
+
"description": "Visual editor for Nuxt Atelier",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/types.d.mts",
|
|
16
|
+
"import": "./dist/module.mjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"main": "./dist/module.mjs",
|
|
20
|
+
"typesVersions": {
|
|
21
|
+
"*": {
|
|
22
|
+
".": [
|
|
23
|
+
"./dist/types.d.mts"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "nuxt-module-build build",
|
|
32
|
+
"prepack": "nuxt-module-build build",
|
|
33
|
+
"check:pkg": "publint --pack bun && attw --pack . --profile esm-only"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"nuxt": ">=4.6.0"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@nuxt/kit": "^4.6.3",
|
|
40
|
+
"@tiptap/core": "3.32.1",
|
|
41
|
+
"@tiptap/pm": "3.32.1",
|
|
42
|
+
"@tiptap/starter-kit": "3.32.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@nuxt/schema": "4.6.3"
|
|
46
|
+
}
|
|
47
|
+
}
|