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.
Files changed (58) hide show
  1. package/dist/module.d.mts +0 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +9 -18
  4. package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +1 -1
  5. package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +1 -1
  6. package/dist/runtime/components/blocks/BlockEditor.d.vue.ts +1 -1
  7. package/dist/runtime/components/blocks/BlockEditor.vue.d.ts +1 -1
  8. package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +1 -1
  9. package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +1 -1
  10. package/dist/runtime/components/blocks/TOC.d.vue.ts +1 -1
  11. package/dist/runtime/components/blocks/TOC.vue.d.ts +1 -1
  12. package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +1 -1
  13. package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +1 -1
  14. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +1 -1
  15. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +1 -1
  16. package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +1 -1
  17. package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +1 -1
  18. package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +1 -1
  19. package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +1 -1
  20. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +1 -1
  21. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +1 -1
  22. package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +1 -1
  23. package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +1 -1
  24. package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +1 -1
  25. package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +1 -1
  26. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +1 -1
  27. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +1 -1
  28. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +1 -1
  29. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +1 -1
  30. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +1 -1
  31. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +1 -1
  32. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +1 -1
  33. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +1 -1
  34. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +1 -1
  35. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +1 -1
  36. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +1 -1
  37. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +1 -1
  38. package/dist/runtime/components/page/PageEditor.d.vue.ts +9 -9
  39. package/dist/runtime/components/page/PageEditor.vue +1 -0
  40. package/dist/runtime/components/page/PageEditor.vue.d.ts +9 -9
  41. package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +5 -5
  42. package/dist/runtime/components/page/PagePropertiesEditor.vue +3 -1
  43. package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +5 -5
  44. package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +1 -1
  45. package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +1 -1
  46. package/dist/runtime/composables/index.d.ts +3 -3
  47. package/dist/runtime/composables/useBlockEditor.d.ts +131 -131
  48. package/dist/runtime/composables/useBlockEditor.js +0 -17
  49. package/dist/runtime/composables/usePageEditor.d.ts +1 -1
  50. package/dist/runtime/internal/blockMapper.d.ts +1 -1
  51. package/dist/runtime/types/index.d.ts +3 -3
  52. package/dist/runtime/types/pages.d.ts +2 -2
  53. package/dist/runtime/utils/index.d.ts +3 -3
  54. package/dist/runtime/utils/page.d.ts +1 -1
  55. package/dist/runtime/utils/page.js +1 -1
  56. package/dist/runtime/utils/richTextHelpers.d.ts +1 -1
  57. package/dist/types.d.mts +0 -2
  58. 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,5 +1,5 @@
1
1
  import { type Ref } from "vue";
2
- import type { Page } from "../types/pages";
2
+ import type { Page } from "../types/pages.js";
3
3
  export declare function usePageEditor(page: Ref<Page>, maxHistorySize?: number): {
4
4
  undo: () => void;
5
5
  redo: () => void;
@@ -1,5 +1,5 @@
1
1
  import { type Component } from "vue";
2
- import { type BlockType } from "../types/blocks";
2
+ import { type BlockType } from "../types/blocks.js";
3
3
  /**
4
4
  * Maps the block type string from the database to a dynamically imported Vue component.
5
5
  *
@@ -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,5 +1,5 @@
1
- import { type Image } from "../types";
2
- import { type Block } from "../types";
1
+ import { type Image } from "../types/index.js";
2
+ import { type Block } from "../types/index.js";
3
3
  declare global {
4
4
  interface RimelightRegisterPageTypes {
5
5
  }
@@ -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,6 +1,6 @@
1
1
  import { toValue } from "vue";
2
2
  export const getLocalizedContent = (field, currentLocale) => {
3
- if (!field) return "";
3
+ if (!field || typeof field !== "object") return "";
4
4
  const locale = toValue(currentLocale);
5
5
  return field[locale] ?? field["en"] ?? "";
6
6
  };
@@ -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
@@ -1,5 +1,3 @@
1
1
  export { default } from './module.mjs'
2
2
 
3
3
  export { type ModuleOptions } from './module.mjs'
4
-
5
- export * from '../dist/runtime/types/index.js'
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.94",
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.25",
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": "~5.9.3",
110
+ "typescript": "^5.9.3",
110
111
  "vitest": "^4.0.15",
111
- "vue-tsc": "^3.1.8"
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",