rimelight-components 2.0.94 → 2.0.96
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/module.d.mts +0 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +9 -18
- package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/BlockEditor.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/BlockEditor.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/TOC.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/TOC.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +1 -1
- package/dist/runtime/components/page/PageEditor.d.vue.ts +9 -9
- package/dist/runtime/components/page/PageEditor.vue +1 -0
- package/dist/runtime/components/page/PageEditor.vue.d.ts +9 -9
- package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +5 -5
- package/dist/runtime/components/page/PagePropertiesEditor.vue +3 -1
- package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +5 -5
- package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +1 -1
- package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +1 -1
- package/dist/runtime/composables/index.d.ts +3 -3
- package/dist/runtime/composables/useBlockEditor.d.ts +131 -131
- package/dist/runtime/composables/useBlockEditor.js +0 -17
- package/dist/runtime/composables/usePageEditor.d.ts +1 -1
- package/dist/runtime/internal/blockMapper.d.ts +1 -1
- package/dist/runtime/types/index.d.ts +3 -3
- package/dist/runtime/types/pages.d.ts +2 -2
- package/dist/runtime/utils/index.d.ts +3 -3
- package/dist/runtime/utils/page.d.ts +1 -1
- package/dist/runtime/utils/page.js +1 -1
- package/dist/runtime/utils/richTextHelpers.d.ts +1 -1
- package/dist/types.d.mts +0 -2
- package/package.json +15 -8
|
@@ -124,20 +124,6 @@ export function useBlockEditor(initialBlocks, { maxHistorySize = 100, onMutation
|
|
|
124
124
|
};
|
|
125
125
|
const insertBlock = (newBlockType, targetId = null, position = "after") => {
|
|
126
126
|
executeMutation(() => {
|
|
127
|
-
const newBlock = {
|
|
128
|
-
id: uuidv7(),
|
|
129
|
-
type: newBlockType,
|
|
130
|
-
props: getDefaultPropsForType(newBlockType)
|
|
131
|
-
};
|
|
132
|
-
if (!targetId) {
|
|
133
|
-
initialBlocks.value.push(newBlock);
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
const loc = findBlockLocation(initialBlocks.value, targetId);
|
|
137
|
-
if (loc) {
|
|
138
|
-
const insertIndex = position === "after" ? loc.index + 1 : loc.index;
|
|
139
|
-
loc.parentArray.splice(insertIndex, 0, newBlock);
|
|
140
|
-
}
|
|
141
127
|
});
|
|
142
128
|
};
|
|
143
129
|
const commitChanges = () => {
|
|
@@ -162,6 +148,3 @@ export function useBlockEditor(initialBlocks, { maxHistorySize = 100, onMutation
|
|
|
162
148
|
commitChanges
|
|
163
149
|
};
|
|
164
150
|
}
|
|
165
|
-
function getDefaultPropsForType(type) {
|
|
166
|
-
return { children: [] };
|
|
167
|
-
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./blocks";
|
|
2
|
-
export * from "./pages";
|
|
3
|
-
export * from "./schemas";
|
|
1
|
+
export * from "./blocks.js";
|
|
2
|
+
export * from "./pages.js";
|
|
3
|
+
export * from "./schemas.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./richTextHelpers";
|
|
2
|
-
export * from "./page";
|
|
3
|
-
export * from "./database";
|
|
1
|
+
export * from "./richTextHelpers.js";
|
|
2
|
+
export * from "./page.js";
|
|
3
|
+
export * from "./database.js";
|
|
4
4
|
/**
|
|
5
5
|
* Converts a string into a URL-friendly slug.
|
|
6
6
|
* - Converts to lowercase.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
-
import type { Page, Localized, PageDefinition } from "../types/pages";
|
|
2
|
+
import type { Page, Localized, PageDefinition } from "../types/pages.js";
|
|
3
3
|
export declare const getLocalizedContent: <T = string>(field: Localized<T> | undefined, currentLocale: MaybeRefOrGetter<string>) => T | string;
|
|
4
4
|
/**
|
|
5
5
|
* Helper to define a page with full type safety and literal preservation.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RichTextContent } from "../types/blocks";
|
|
1
|
+
import type { RichTextContent } from "../types/blocks.js";
|
|
2
2
|
/**
|
|
3
3
|
* Helper: Converts RichTextContent array into a plain string for a simple contenteditable area.
|
|
4
4
|
* For complex editors, this would generate full HTML/DOM nodes, preserving links/mentions.
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rimelight-components",
|
|
3
3
|
"description": "A component library by Rimelight Entertainment.",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.96",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -80,35 +80,42 @@
|
|
|
80
80
|
"release": "release-it --ci"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@nuxt/image": "^1.11.0",
|
|
84
83
|
"@nuxt/kit": "^4.2.2",
|
|
85
|
-
"@nuxt/ui": "^4.2.1",
|
|
86
|
-
"@nuxtjs/i18n": "^10.2.1",
|
|
87
84
|
"@vueuse/core": "^14.1.0",
|
|
88
|
-
"@vueuse/nuxt": "^14.1.0",
|
|
89
85
|
"date-fns": "^4.1.0",
|
|
90
86
|
"defu": "^6.1.4",
|
|
91
87
|
"drizzle-orm": "^0.45.1",
|
|
92
88
|
"nuxt": "^4.2.2",
|
|
93
89
|
"tailwind-variants": "^3.2.2",
|
|
94
90
|
"uuid": "^13.0.0",
|
|
95
|
-
"vue": "^3.5.
|
|
91
|
+
"vue": "^3.5.26",
|
|
96
92
|
"zod": "^4.2.1"
|
|
97
93
|
},
|
|
98
94
|
"devDependencies": {
|
|
95
|
+
"@iconify-json/lucide": "^1.2.82",
|
|
99
96
|
"@nuxt/devtools": "^3.1.1",
|
|
97
|
+
"@nuxt/image": "^2.0.0",
|
|
100
98
|
"@nuxt/module-builder": "^1.0.2",
|
|
101
99
|
"@nuxt/schema": "^4.2.2",
|
|
102
100
|
"@nuxt/test-utils": "^3.21.0",
|
|
101
|
+
"@nuxt/ui": "^4.2.0",
|
|
102
|
+
"@nuxtjs/i18n": "^10.2.1",
|
|
103
103
|
"@types/node": "latest",
|
|
104
|
+
"@vueuse/nuxt": "^14.1.0",
|
|
104
105
|
"changelogen": "^0.6.2",
|
|
105
106
|
"oxfmt": "^0.18.0",
|
|
106
107
|
"oxlint": "^1.33.0",
|
|
107
108
|
"release-it": "^19.1.0",
|
|
108
109
|
"tailwind-merge": "^3.4.0",
|
|
109
|
-
"typescript": "
|
|
110
|
+
"typescript": "^5.9.3",
|
|
110
111
|
"vitest": "^4.0.15",
|
|
111
|
-
"vue-tsc": "^3.
|
|
112
|
+
"vue-tsc": "^3.2.0"
|
|
113
|
+
},
|
|
114
|
+
"peerDependencies": {
|
|
115
|
+
"@nuxt/image": "^2.0.0",
|
|
116
|
+
"@nuxt/ui": "^4.2.0",
|
|
117
|
+
"@nuxtjs/i18n": "^10.2.1",
|
|
118
|
+
"@vueuse/nuxt": "^14.1.0"
|
|
112
119
|
},
|
|
113
120
|
"trustedDependencies": [
|
|
114
121
|
"@parcel/watcher",
|