rimelight-components 2.0.42 → 2.0.44

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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "2.0.42",
3
+ "version": "2.0.44",
4
4
  "docs": "https://rimelight.com/tools/rimelight-components",
5
5
  "configKey": "rimelightComponents",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import { readdirSync } from 'node:fs';
4
4
  import { basename } from 'node:path';
5
5
 
6
6
  const name = "rimelight-components";
7
- const version = "2.0.42";
7
+ const version = "2.0.44";
8
8
  const homepage = "https://rimelight.com/tools/rimelight-components";
9
9
 
10
10
  const defaultOptions = {
@@ -1,4 +1,4 @@
1
- import type { SectionBlock } from "~~/src/runtime/types/blocks";
2
- declare const __VLS_export: import("vue").DefineComponent<SectionBlock, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlock> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
1
+ import type { SectionBlockProps } from "~~/src/runtime/types/blocks";
2
+ declare const __VLS_export: import("vue").DefineComponent<SectionBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
3
  declare const _default: typeof __VLS_export;
4
4
  export default _default;
@@ -1,64 +1,51 @@
1
1
  <script setup>
2
- import { computed, inject } from "vue";
2
+ import { computed } from "vue";
3
3
  import { slugify } from "../../../utils";
4
- const props = defineProps({
5
- type: { type: String, required: true },
6
- props: { type: Object, required: true },
7
- id: { type: String, required: true }
4
+ const { level, title, description, children } = defineProps({
5
+ level: { type: Number, required: true },
6
+ title: { type: String, required: true },
7
+ description: { type: String, required: false },
8
+ children: { type: Array, required: true }
8
9
  });
9
- const headingId = computed(() => props.props.title ? slugify(props.props.title) : void 0);
10
- const { removeBlock } = inject("blockEditorMutators", {
11
- removeBlock: (id) => console.warn(`removeBlock not implemented for ${id}`)
12
- });
13
- const handleRemove = () => {
14
- removeBlock(props.id);
15
- };
16
- const childrenBlocks = computed(() => props.props.children || []);
10
+ const headingId = computed(() => title ? slugify(title) : void 0);
17
11
  </script>
18
12
 
19
13
  <template>
20
- <div
21
- class="block-editor-container group relative rounded-lg border-2 border-dashed border-primary-200 bg-primary-50/50 p-4"
22
- >
23
- <div
24
- class="absolute z-10 flex -translate-x-1/2 gap-2 opacity-0 transition-opacity group-hover:opacity-100"
25
- >
26
- <UButton
27
- icon="lucide:trash-2"
28
- variant="solid"
29
- size="sm"
30
- @click="handleRemove"
31
- />
32
- </div>
33
-
34
- <RCSection
35
- :level="props.props.level"
36
- :title="props.props.title"
37
- :description="props.props.description"
14
+ <RCSection
15
+ :level="level"
16
+ :title="title"
17
+ :description="description"
38
18
  :id="headingId"
39
- is-editing
40
- >
41
- <template #title>
42
- <input
43
- :value="props.props.title"
44
- :class="`text-${props.props.level === 1 ? '3xl' : 'xl'} pointer-events-auto w-full bg-transparent font-bold focus:outline-none`"
45
- placeholder="Enter section title..."
46
- />
47
- </template>
48
-
49
- <template #description>
50
- <textarea
51
- v-if="props.props.description !== void 0"
52
- :value="props.props.description"
53
- class="text-md pointer-events-auto w-full resize-none bg-transparent text-muted focus:outline-none"
54
- placeholder="Optional description..."
55
- rows="2"
56
- />
57
- </template>
19
+ >
20
+ <template #title>
21
+ <UInput :v-model="title" :maxlength="128" type="text" variant="ghost" placeholder="Section title">
22
+ <template #trailing>
23
+ <div
24
+ id="character-count"
25
+ class="text-xs text-muted tabular-nums"
26
+ aria-live="polite"
27
+ role="status"
28
+ >
29
+ {{ description?.length }}/{{ 256 }}
30
+ </div>
31
+ </template>
32
+ </UInput>
33
+ </template>
58
34
 
59
- <div class="mt-4">
60
- <RCBlockEditor :blocks="childrenBlocks" />
61
- </div>
62
- </RCSection>
63
- </div>
35
+ <template #description>
36
+ <UTextarea :v-model="description" :maxlength="256" variant="ghost" autoresize placeholder="Section description">
37
+ <template #trailing>
38
+ <div
39
+ id="character-count"
40
+ class="text-xs text-muted tabular-nums"
41
+ aria-live="polite"
42
+ role="status"
43
+ >
44
+ {{ description?.length }}/{{ 256 }}
45
+ </div>
46
+ </template>
47
+ </UTextarea>
48
+ </template>
49
+ <RCBlockEditor :blocks="children" />
50
+ </RCSection>
64
51
  </template>
@@ -1,4 +1,4 @@
1
- import type { SectionBlock } from "~~/src/runtime/types/blocks";
2
- declare const __VLS_export: import("vue").DefineComponent<SectionBlock, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlock> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
1
+ import type { SectionBlockProps } from "~~/src/runtime/types/blocks";
2
+ declare const __VLS_export: import("vue").DefineComponent<SectionBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SectionBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
3
  declare const _default: typeof __VLS_export;
4
4
  export default _default;
@@ -139,9 +139,11 @@ const fullSectionUrl = computed(() => {
139
139
  </NuxtLink>
140
140
  <slot v-else name="title">{{ title }}</slot>
141
141
  </component>
142
- <p v-if="description" :class="descriptionSlot()">
143
- <slot name="description">{{ description }}</slot>
144
- </p>
142
+ <slot name="description">
143
+ <p v-if="description" :class="descriptionSlot()">
144
+ {{ description }}
145
+ </p>
146
+ </slot>
145
147
  <USeparator :class="separatorSlot()" />
146
148
  <div :class="contentSlot()">
147
149
  <slot />
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.42",
4
+ "version": "2.0.44",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",