rimelight-components 2.1.32 → 2.1.34
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 +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/app/Header.vue +6 -2
- package/dist/runtime/components/app/Image.vue +33 -27
- package/dist/runtime/components/app/ScrollToTop.vue +37 -37
- package/dist/runtime/components/content/Callout.vue +4 -1
- package/dist/runtime/components/content/Section.vue +5 -1
- package/dist/runtime/components/page/PageEditor.vue +51 -67
- package/dist/runtime/components/page/PageMention.vue +1 -5
- package/dist/runtime/components/page/PagePropertiesEditor.vue +9 -2
- package/dist/runtime/components/page/PagePropertiesRenderer.vue +16 -9
- package/dist/runtime/components/page/PageRenderer.vue +8 -7
- package/dist/runtime/components/page/modals/CreatePageModal.vue +42 -36
- package/dist/runtime/components/page/modals/DeletePageModal.vue +3 -3
- package/dist/runtime/composables/useHeaderStack.js +1 -3
- package/dist/runtime/composables/useHeaderStack.mjs +1 -3
- package/dist/runtime/composables/useInfobox.d.ts +1 -1
- package/dist/runtime/composables/useInfobox.js +3 -1
- package/dist/runtime/composables/useInfobox.mjs +3 -1
- package/dist/runtime/types/app.config.d.ts +2 -2
- package/dist/runtime/types/tv.d.ts +11 -11
- package/package.json +20 -19
package/dist/module.json
CHANGED
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.1.
|
|
7
|
+
const version = "2.1.34";
|
|
8
8
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
9
|
|
|
10
10
|
const defaultOptions = {
|
|
@@ -46,8 +46,12 @@ const {
|
|
|
46
46
|
<div :class="center({ class: rc.center })"><slot name="center" /></div>
|
|
47
47
|
<div :class="right({ class: rc.right })"><slot name="right" /></div>
|
|
48
48
|
<div :class="collapsedLeft({ class: rc.collapsedLeft })"><slot name="collapsed-left" /></div>
|
|
49
|
-
<div :class="collapsedCenter({ class: rc.collapsedCenter })"
|
|
50
|
-
|
|
49
|
+
<div :class="collapsedCenter({ class: rc.collapsedCenter })">
|
|
50
|
+
<slot name="collapsed-center" />
|
|
51
|
+
</div>
|
|
52
|
+
<div :class="collapsedRight({ class: rc.collapsedRight })">
|
|
53
|
+
<slot name="collapsed-right" />
|
|
54
|
+
</div>
|
|
51
55
|
</UContainer>
|
|
52
56
|
</header>
|
|
53
57
|
</template>
|
|
@@ -128,33 +128,34 @@ watch(() => imgElement.value, (newVal) => {
|
|
|
128
128
|
</script>
|
|
129
129
|
|
|
130
130
|
<template>
|
|
131
|
-
<UModal
|
|
131
|
+
<UModal
|
|
132
|
+
v-model="isOpen"
|
|
133
|
+
title="Image Viewer"
|
|
134
|
+
:description="`${src}`"
|
|
135
|
+
:ui="{
|
|
132
136
|
content: 'w-fit max-w-[98vw] sm:max-w-[95vw] mx-auto'
|
|
133
|
-
}"
|
|
137
|
+
}"
|
|
138
|
+
>
|
|
134
139
|
<template #default>
|
|
135
140
|
<div class="relative">
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
<NuxtImg
|
|
142
|
+
ref="imgRef"
|
|
143
|
+
:src="src"
|
|
144
|
+
:alt="alt"
|
|
145
|
+
:height="height"
|
|
146
|
+
:width="width"
|
|
147
|
+
:loading="loading"
|
|
148
|
+
:class="base({ isExpanded: false, class: rc.base })"
|
|
149
|
+
@click="isOpen = true"
|
|
150
|
+
@load="handleImageLoad"
|
|
151
|
+
/>
|
|
147
152
|
</div>
|
|
148
153
|
</template>
|
|
149
154
|
|
|
150
155
|
<template #body>
|
|
151
156
|
<div class="flex flex-col gap-md">
|
|
152
157
|
<div class="flex-1 min-h-0 w-full flex items-center">
|
|
153
|
-
<NuxtImg
|
|
154
|
-
:src="src"
|
|
155
|
-
:alt="alt"
|
|
156
|
-
:class="base({ isExpanded: true, class: rc.base })"
|
|
157
|
-
/>
|
|
158
|
+
<NuxtImg :src="src" :alt="alt" :class="base({ isExpanded: true, class: rc.base })" />
|
|
158
159
|
</div>
|
|
159
160
|
|
|
160
161
|
<USeparator />
|
|
@@ -163,27 +164,32 @@ watch(() => imgElement.value, (newVal) => {
|
|
|
163
164
|
<div class="flex flex-col gap-xs">
|
|
164
165
|
<div class="flex flex-row gap-xs items-center">
|
|
165
166
|
<UIcon name="lucide:image" class="size-4" />
|
|
166
|
-
<p class="text-sm">
|
|
167
|
+
<p class="text-sm">
|
|
168
|
+
Source: <span class="text-dimmed">{{ src }}</span>
|
|
169
|
+
</p>
|
|
167
170
|
</div>
|
|
168
171
|
<div class="flex flex-row gap-xs items-center">
|
|
169
172
|
<UIcon name="lucide:file-question-mark" class="size-4" />
|
|
170
|
-
<p class="text-sm">
|
|
173
|
+
<p class="text-sm">
|
|
174
|
+
Format: <span class="text-dimmed">{{ metadata.format }}</span>
|
|
175
|
+
</p>
|
|
171
176
|
</div>
|
|
172
177
|
<div class="flex flex-row gap-xs items-center">
|
|
173
178
|
<UIcon name="lucide:weight" class="size-4" />
|
|
174
|
-
<p class="text-sm">
|
|
179
|
+
<p class="text-sm">
|
|
180
|
+
Size: <span class="text-dimmed">{{ metadata.size || "Unknown" }}</span>
|
|
181
|
+
</p>
|
|
175
182
|
</div>
|
|
176
183
|
<div class="flex flex-row gap-xs items-center">
|
|
177
184
|
<UIcon name="lucide:image-upscale" class="size-4" />
|
|
178
|
-
<p class="text-sm">
|
|
185
|
+
<p class="text-sm">
|
|
186
|
+
Dimensions:
|
|
187
|
+
<span class="text-dimmed">{{ metadata.width }} × {{ metadata.height }}</span>
|
|
188
|
+
</p>
|
|
179
189
|
</div>
|
|
180
190
|
</div>
|
|
181
191
|
|
|
182
|
-
<UButton
|
|
183
|
-
icon="lucide:download"
|
|
184
|
-
label="Download Original"
|
|
185
|
-
@click="downloadImage"
|
|
186
|
-
/>
|
|
192
|
+
<UButton icon="lucide:download" label="Download Original" @click="downloadImage" />
|
|
187
193
|
</div>
|
|
188
194
|
</div>
|
|
189
195
|
</template>
|
|
@@ -67,44 +67,44 @@ const durationInSeconds = computed(() => `${duration}s`);
|
|
|
67
67
|
<template>
|
|
68
68
|
<ClientOnly>
|
|
69
69
|
<Transition
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
70
|
+
name="fade"
|
|
71
|
+
enter-active-class="transition-opacity duration-500 ease-in"
|
|
72
|
+
leave-active-class="transition-opacity duration-500 ease-out"
|
|
73
|
+
enter-from-class="opacity-0"
|
|
74
|
+
leave-to-class="opacity-0"
|
|
75
|
+
>
|
|
76
|
+
<div v-if="isVisible">
|
|
77
|
+
<UButton variant="ghost" :class="button({ class: rc.button })" @click="scrollToTop">
|
|
78
|
+
<div :class="progressBase({ class: rc.progressBase })">
|
|
79
|
+
<svg :class="svg({ class: rc.svg })" viewBox="0 0 100 100">
|
|
80
|
+
<circle
|
|
81
|
+
cx="50"
|
|
82
|
+
cy="50"
|
|
83
|
+
r="45"
|
|
84
|
+
fill="var(--color-primary-950)"
|
|
85
|
+
:stroke-width="circleStrokeWidth"
|
|
86
|
+
stroke-dashoffset="0"
|
|
87
|
+
stroke-linecap="round"
|
|
88
|
+
class="gauge-secondary-stroke opacity-100"
|
|
89
|
+
/>
|
|
90
|
+
<circle
|
|
91
|
+
cx="50"
|
|
92
|
+
cy="50"
|
|
93
|
+
r="45"
|
|
94
|
+
fill="transparent"
|
|
95
|
+
:stroke-width="circleStrokeWidth"
|
|
96
|
+
stroke-dashoffset="0"
|
|
97
|
+
stroke-linecap="round"
|
|
98
|
+
class="gauge-primary-stroke opacity-100"
|
|
99
|
+
/>
|
|
100
|
+
</svg>
|
|
101
|
+
<div :class="iconContainer({ class: rc.iconContainer })">
|
|
102
|
+
<UIcon name="lucide:arrow-up" :class="icon({ class: rc.icon })" />
|
|
103
|
+
</div>
|
|
103
104
|
</div>
|
|
104
|
-
</
|
|
105
|
-
</
|
|
106
|
-
</
|
|
107
|
-
</Transition>
|
|
105
|
+
</UButton>
|
|
106
|
+
</div>
|
|
107
|
+
</Transition>
|
|
108
108
|
</ClientOnly>
|
|
109
109
|
</template>
|
|
110
110
|
|
|
@@ -52,7 +52,10 @@ const tooltip = computed(() => config.value.tooltip);
|
|
|
52
52
|
</template>
|
|
53
53
|
<template #close>
|
|
54
54
|
<UTooltip v-if="tooltip" :text="t(tooltip)">
|
|
55
|
-
<UIcon
|
|
55
|
+
<UIcon
|
|
56
|
+
name="lucide:circle-question-mark"
|
|
57
|
+
:class="tooltipIcon({ class: rc.tooltipIcon })"
|
|
58
|
+
/>
|
|
56
59
|
</UTooltip>
|
|
57
60
|
</template>
|
|
58
61
|
</UAlert>
|
|
@@ -124,7 +124,11 @@ const fullSectionUrl = computed(() => {
|
|
|
124
124
|
|
|
125
125
|
<template>
|
|
126
126
|
<section :id="sectionId" :class="section({ class: rc.section })" v-bind="$attrs">
|
|
127
|
-
<component
|
|
127
|
+
<component
|
|
128
|
+
:id="`${sectionId}-heading`"
|
|
129
|
+
:is="`h${level}`"
|
|
130
|
+
:class="heading({ class: rc.heading })"
|
|
131
|
+
>
|
|
128
132
|
<NuxtLink
|
|
129
133
|
v-if="!isEditing"
|
|
130
134
|
:href="`#${sectionId}`"
|
|
@@ -193,17 +193,12 @@ const handleDeleteConfirm = async () => {
|
|
|
193
193
|
/>
|
|
194
194
|
<RCCreatePageModal
|
|
195
195
|
:is-open="isCreateModalOpen"
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
:definitions="pageDefinitions"
|
|
197
|
+
:loading="isCreating"
|
|
198
|
+
@close="isCreateModalOpen = false"
|
|
199
|
+
@confirm="handleCreateConfirm"
|
|
200
200
|
>
|
|
201
|
-
<UButton
|
|
202
|
-
icon="lucide:file-plus"
|
|
203
|
-
label="Create Page"
|
|
204
|
-
color="primary"
|
|
205
|
-
size="xs"
|
|
206
|
-
/>
|
|
201
|
+
<UButton icon="lucide:file-plus" label="Create Page" color="primary" size="xs" />
|
|
207
202
|
</RCCreatePageModal>
|
|
208
203
|
<RCDeletePageModal
|
|
209
204
|
:is-open="isDeleteModalOpen"
|
|
@@ -212,35 +207,23 @@ const handleDeleteConfirm = async () => {
|
|
|
212
207
|
@close="isDeleteModalOpen = false"
|
|
213
208
|
@confirm="handleDeleteConfirm"
|
|
214
209
|
>
|
|
215
|
-
<UButton
|
|
216
|
-
icon="lucide:file-plus"
|
|
217
|
-
label="Delete Page"
|
|
218
|
-
color="error"
|
|
219
|
-
size="xs"
|
|
220
|
-
/>
|
|
210
|
+
<UButton icon="lucide:file-plus" label="Delete Page" color="error" size="xs" />
|
|
221
211
|
</RCDeletePageModal>
|
|
222
212
|
</div>
|
|
223
213
|
</template>
|
|
224
214
|
</UHeader>
|
|
225
215
|
</RCHeaderLayer>
|
|
226
216
|
|
|
227
|
-
<div
|
|
228
|
-
ref="split-container"
|
|
229
|
-
:class="splitContainer({ class: rc.splitContainer })"
|
|
230
|
-
>
|
|
217
|
+
<div ref="split-container" :class="splitContainer({ class: rc.splitContainer })">
|
|
231
218
|
<div
|
|
232
219
|
:class="editorColumn({ class: rc.editorColumn })"
|
|
233
220
|
:style="{ width: showPreview ? `${editorWidth}%` : '100%' }"
|
|
234
221
|
>
|
|
235
222
|
<UContainer :class="container({ class: rc.container })">
|
|
236
223
|
<div :class="grid({ class: rc.grid })">
|
|
237
|
-
<RCPageTOC
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
:class="toc({ class: rc.toc })"
|
|
241
|
-
>
|
|
242
|
-
<template #bottom> </template>
|
|
243
|
-
</RCPageTOC>
|
|
224
|
+
<RCPageTOC :page-blocks="page.blocks" :levels="[2, 3, 4]" :class="toc({ class: rc.toc })">
|
|
225
|
+
<template #bottom> </template>
|
|
226
|
+
</RCPageTOC>
|
|
244
227
|
<RCPagePropertiesEditor v-model="page" :class="properties({ class: rc.properties })" />
|
|
245
228
|
<div :class="contentWrapper({ class: rc.contentWrapper })">
|
|
246
229
|
<RCImage
|
|
@@ -262,17 +245,18 @@ const handleDeleteConfirm = async () => {
|
|
|
262
245
|
:alt="page.icon?.alt"
|
|
263
246
|
:class="icon({ class: rc.icon })"
|
|
264
247
|
/>
|
|
265
|
-
<h1 :class="titleClass({ class: rc.title })">
|
|
248
|
+
<h1 :class="titleClass({ class: rc.title })">
|
|
249
|
+
{{ getLocalizedContent(page.title, locale) }}
|
|
250
|
+
</h1>
|
|
266
251
|
</div>
|
|
267
252
|
</template>
|
|
268
253
|
</UPageHeader>
|
|
269
|
-
<RCBlockEditor
|
|
270
|
-
ref="editor"
|
|
271
|
-
v-model="page.blocks"
|
|
272
|
-
@mutation="captureSnapshot"
|
|
273
|
-
/>
|
|
254
|
+
<RCBlockEditor ref="editor" v-model="page.blocks" @mutation="captureSnapshot" />
|
|
274
255
|
<template v-if="useSurround">
|
|
275
|
-
<div
|
|
256
|
+
<div
|
|
257
|
+
v-if="surroundStatus === 'pending'"
|
|
258
|
+
:class="surroundSkeleton({ class: rc.surroundSkeleton })"
|
|
259
|
+
>
|
|
276
260
|
<USkeleton :class="skeleton({ class: rc.skeleton })" />
|
|
277
261
|
<USkeleton :class="skeleton({ class: rc.skeleton })" />
|
|
278
262
|
</div>
|
|
@@ -295,41 +279,41 @@ const handleDeleteConfirm = async () => {
|
|
|
295
279
|
<h6>Metadata</h6>
|
|
296
280
|
<span>Page ID: {{ page.id }}</span>
|
|
297
281
|
<span
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
282
|
+
>Created At:
|
|
283
|
+
<NuxtTime
|
|
284
|
+
:datetime="page.created_at ?? ''"
|
|
285
|
+
year="numeric"
|
|
286
|
+
month="numeric"
|
|
287
|
+
day="numeric"
|
|
288
|
+
hour="numeric"
|
|
289
|
+
minute="numeric"
|
|
290
|
+
second="numeric"
|
|
291
|
+
time-zone-name="short"
|
|
292
|
+
/></span>
|
|
309
293
|
<span
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
294
|
+
>Posted At:
|
|
295
|
+
<NuxtTime
|
|
296
|
+
:datetime="page.created_at ?? ''"
|
|
297
|
+
year="numeric"
|
|
298
|
+
month="numeric"
|
|
299
|
+
day="numeric"
|
|
300
|
+
hour="numeric"
|
|
301
|
+
minute="numeric"
|
|
302
|
+
second="numeric"
|
|
303
|
+
time-zone-name="short"
|
|
304
|
+
/></span>
|
|
321
305
|
<span
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
306
|
+
>Updated At:
|
|
307
|
+
<NuxtTime
|
|
308
|
+
:datetime="page.created_at ?? ''"
|
|
309
|
+
year="numeric"
|
|
310
|
+
month="numeric"
|
|
311
|
+
day="numeric"
|
|
312
|
+
hour="numeric"
|
|
313
|
+
minute="numeric"
|
|
314
|
+
second="numeric"
|
|
315
|
+
time-zone-name="short"
|
|
316
|
+
/></span>
|
|
333
317
|
</div>
|
|
334
318
|
</template>
|
|
335
319
|
</div>
|
|
@@ -38,11 +38,7 @@ const { data: linkedPage, status } = await useAsyncData(`page-mention-${pageId}`
|
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
40
|
<template>
|
|
41
|
-
<NuxtLink
|
|
42
|
-
v-if="linkedPage"
|
|
43
|
-
:to="`/${linkedPage.slug}`"
|
|
44
|
-
:class="link({ class: rc.link })"
|
|
45
|
-
>
|
|
41
|
+
<NuxtLink v-if="linkedPage" :to="`/${linkedPage.slug}`" :class="link({ class: rc.link })">
|
|
46
42
|
<NuxtImg
|
|
47
43
|
v-if="linkedPage.icon?.src"
|
|
48
44
|
:src="linkedPage.icon.src"
|
|
@@ -113,7 +113,11 @@ const updateTextArray = (schema, vals) => {
|
|
|
113
113
|
:class="tabs({ class: rc.tabs })"
|
|
114
114
|
>
|
|
115
115
|
<template #content="{ item }">
|
|
116
|
-
<RCImage
|
|
116
|
+
<RCImage
|
|
117
|
+
:src="item.img.src"
|
|
118
|
+
:alt="item.img.alt"
|
|
119
|
+
:class="image({ class: rc.image })"
|
|
120
|
+
/>
|
|
117
121
|
</template>
|
|
118
122
|
</UTabs>
|
|
119
123
|
|
|
@@ -147,7 +151,10 @@ const updateTextArray = (schema, vals) => {
|
|
|
147
151
|
<template #content>
|
|
148
152
|
<ClientOnly>
|
|
149
153
|
<dl :class="details({ class: rc.details })">
|
|
150
|
-
<template
|
|
154
|
+
<template
|
|
155
|
+
v-for="[fieldKey, schema] in getSortedFields(group.fields)"
|
|
156
|
+
:key="fieldKey"
|
|
157
|
+
>
|
|
151
158
|
<UFormField
|
|
152
159
|
v-if="isFieldVisible(schema, false)"
|
|
153
160
|
:label="getLocalizedContent(schema.label, locale)"
|
|
@@ -160,14 +160,20 @@ const imageTabs = computed(() => {
|
|
|
160
160
|
:class="tabs({ class: rc.tabs })"
|
|
161
161
|
>
|
|
162
162
|
<template #content="{ item }">
|
|
163
|
-
<RCImage
|
|
163
|
+
<RCImage
|
|
164
|
+
:src="item.img.src"
|
|
165
|
+
:alt="item.img.alt"
|
|
166
|
+
:class="image({ class: rc.image })"
|
|
167
|
+
/>
|
|
164
168
|
</template>
|
|
165
169
|
</UTabs>
|
|
166
170
|
|
|
167
171
|
<div v-else-if="page.images[0]">
|
|
168
|
-
<RCImage
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
<RCImage
|
|
173
|
+
:src="page.images[0].src"
|
|
174
|
+
:alt="page.images[0].alt"
|
|
175
|
+
:class="image({ class: rc.image })"
|
|
176
|
+
/>
|
|
171
177
|
</div>
|
|
172
178
|
</div>
|
|
173
179
|
</div>
|
|
@@ -195,10 +201,7 @@ const imageTabs = computed(() => {
|
|
|
195
201
|
v-for="[fieldKey, schema] in getSortedFields(group.fields)"
|
|
196
202
|
:key="fieldKey"
|
|
197
203
|
>
|
|
198
|
-
<div
|
|
199
|
-
v-if="isFieldVisible(schema, true)"
|
|
200
|
-
:class="field({ class: rc.field })"
|
|
201
|
-
>
|
|
204
|
+
<div v-if="isFieldVisible(schema, true)" :class="field({ class: rc.field })">
|
|
202
205
|
<dt :class="fieldLabel({ class: rc.fieldLabel })">
|
|
203
206
|
{{ getLocalizedContent(schema.label, locale) }}
|
|
204
207
|
</dt>
|
|
@@ -226,7 +229,11 @@ const imageTabs = computed(() => {
|
|
|
226
229
|
v-else-if="schema.type === 'page-array' && Array.isArray(schema.value)"
|
|
227
230
|
:class="pageArrayList({ class: rc.pageArrayList })"
|
|
228
231
|
>
|
|
229
|
-
<li
|
|
232
|
+
<li
|
|
233
|
+
v-for="id in schema.value"
|
|
234
|
+
:key="id"
|
|
235
|
+
:class="pageArrayItem({ class: rc.pageArrayItem })"
|
|
236
|
+
>
|
|
230
237
|
<span
|
|
231
238
|
:class="pageArrayBullet({ class: rc.pageArrayBullet })"
|
|
232
239
|
aria-hidden="true"
|
|
@@ -61,11 +61,7 @@ const hasSurround = computed(() => !!(surround?.previous || surround?.next));
|
|
|
61
61
|
<template>
|
|
62
62
|
<UContainer :class="container({ class: rc.container })">
|
|
63
63
|
<div :class="grid({ class: rc.grid })">
|
|
64
|
-
<RCPageTOC
|
|
65
|
-
:page-blocks="page.blocks"
|
|
66
|
-
:levels="[2, 3, 4]"
|
|
67
|
-
:class="toc({ class: rc.toc })"
|
|
68
|
-
>
|
|
64
|
+
<RCPageTOC :page-blocks="page.blocks" :levels="[2, 3, 4]" :class="toc({ class: rc.toc })">
|
|
69
65
|
<template #bottom> </template>
|
|
70
66
|
</RCPageTOC>
|
|
71
67
|
<RCPagePropertiesRenderer v-model="page" :class="properties({ class: rc.properties })" />
|
|
@@ -89,13 +85,18 @@ const hasSurround = computed(() => !!(surround?.previous || surround?.next));
|
|
|
89
85
|
:alt="page.icon?.alt"
|
|
90
86
|
:class="icon({ class: rc.icon })"
|
|
91
87
|
/>
|
|
92
|
-
<h1 :class="titleClass({ class: rc.title })">
|
|
88
|
+
<h1 :class="titleClass({ class: rc.title })">
|
|
89
|
+
{{ getLocalizedContent(page.title, locale) }}
|
|
90
|
+
</h1>
|
|
93
91
|
</div>
|
|
94
92
|
</template>
|
|
95
93
|
</UPageHeader>
|
|
96
94
|
<RCBlockViewRenderer :blocks="page.blocks" />
|
|
97
95
|
<template v-if="useSurround">
|
|
98
|
-
<div
|
|
96
|
+
<div
|
|
97
|
+
v-if="surroundStatus === 'pending'"
|
|
98
|
+
:class="surroundSkeleton({ class: rc.surroundSkeleton })"
|
|
99
|
+
>
|
|
99
100
|
<USkeleton :class="skeleton({ class: rc.skeleton })" />
|
|
100
101
|
<USkeleton :class="skeleton({ class: rc.skeleton })" />
|
|
101
102
|
</div>
|
|
@@ -71,48 +71,54 @@ const handleConfirm = () => {
|
|
|
71
71
|
|
|
72
72
|
<template>
|
|
73
73
|
<UModal :model-value="isOpen" @update:model-value="emit('close')">
|
|
74
|
-
<slot/>
|
|
74
|
+
<slot />
|
|
75
75
|
<template #content>
|
|
76
76
|
<UCard>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
:placeholder="t('editor.template_placeholder', 'Select a template...')"
|
|
90
|
-
:class="field({ class: rc.field })"
|
|
91
|
-
/>
|
|
92
|
-
</UFormField>
|
|
77
|
+
<template #header>
|
|
78
|
+
<div :class="headerClass({ class: rc.header })">
|
|
79
|
+
<h3 :class="headerTitle({ class: rc.headerTitle })">Create New Page</h3>
|
|
80
|
+
<UButton
|
|
81
|
+
color="neutral"
|
|
82
|
+
variant="ghost"
|
|
83
|
+
icon="i-heroicons-x-mark-20-solid"
|
|
84
|
+
:class="closeButton({ class: rc.closeButton })"
|
|
85
|
+
@click="emit('close')"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
93
89
|
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
|
|
90
|
+
<div :class="body({ class: rc.body })">
|
|
91
|
+
<UFormField label="Page Template" required>
|
|
92
|
+
<USelect
|
|
93
|
+
v-model="selectedType"
|
|
94
|
+
:items="typeOptions"
|
|
95
|
+
:placeholder="t('editor.template_placeholder', 'Select a template...')"
|
|
96
|
+
:class="field({ class: rc.field })"
|
|
97
|
+
/>
|
|
98
|
+
</UFormField>
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
</div>
|
|
100
|
+
<UFormField label="Title" required>
|
|
101
|
+
<UInput v-model="title" placeholder="e.g. My Awesome Movie" />
|
|
102
|
+
</UFormField>
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<UButton
|
|
107
|
-
color="primary"
|
|
108
|
-
label="Create & Edit"
|
|
109
|
-
:loading="loading"
|
|
110
|
-
:disabled="!selectedType || !title"
|
|
111
|
-
@click="handleConfirm"
|
|
112
|
-
/>
|
|
104
|
+
<UFormField label="Slug" required>
|
|
105
|
+
<UInput v-model="slug" placeholder="my-awesome-movie" />
|
|
106
|
+
</UFormField>
|
|
113
107
|
</div>
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
|
|
109
|
+
<template #footer>
|
|
110
|
+
<div :class="footer({ class: rc.footer })">
|
|
111
|
+
<UButton color="neutral" variant="ghost" label="Cancel" @click="emit('close')" />
|
|
112
|
+
<UButton
|
|
113
|
+
color="primary"
|
|
114
|
+
label="Create & Edit"
|
|
115
|
+
:loading="loading"
|
|
116
|
+
:disabled="!selectedType || !title"
|
|
117
|
+
@click="handleConfirm"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
121
|
+
</UCard>
|
|
116
122
|
</template>
|
|
117
123
|
</UModal>
|
|
118
124
|
</template>
|
|
@@ -43,7 +43,7 @@ const handleConfirm = () => {
|
|
|
43
43
|
|
|
44
44
|
<template>
|
|
45
45
|
<UModal :model-value="isOpen" @update:model-value="emits('close')">
|
|
46
|
-
<slot/>
|
|
46
|
+
<slot />
|
|
47
47
|
<template #content>
|
|
48
48
|
<UCard :ui="{ body: 'space-y-4' }">
|
|
49
49
|
<template #header>
|
|
@@ -63,8 +63,8 @@ const handleConfirm = () => {
|
|
|
63
63
|
|
|
64
64
|
<div :class="body({ class: rc.body })">
|
|
65
65
|
<p>
|
|
66
|
-
Are you sure you want to delete <strong>{{ pageTitle }}</strong
|
|
67
|
-
This action is permanent and cannot be undone.
|
|
66
|
+
Are you sure you want to delete <strong>{{ pageTitle }}</strong
|
|
67
|
+
>? This action is permanent and cannot be undone.
|
|
68
68
|
</p>
|
|
69
69
|
</div>
|
|
70
70
|
|
|
@@ -16,9 +16,7 @@ export const useHeaderStack = () => {
|
|
|
16
16
|
const unregisterHeader = (id) => {
|
|
17
17
|
layers.value = layers.value.filter((l) => l.id !== id);
|
|
18
18
|
};
|
|
19
|
-
const totalOffset = computed(
|
|
20
|
-
() => layers.value.reduce((acc, l) => acc + l.height, 0)
|
|
21
|
-
);
|
|
19
|
+
const totalOffset = computed(() => layers.value.reduce((acc, l) => acc + l.height, 0));
|
|
22
20
|
const getOffsetFor = (id) => {
|
|
23
21
|
const index = layers.value.findIndex((l) => l.id === id);
|
|
24
22
|
if (index === -1) return 0;
|
|
@@ -16,9 +16,7 @@ export const useHeaderStack = () => {
|
|
|
16
16
|
const unregisterHeader = (id) => {
|
|
17
17
|
layers.value = layers.value.filter((l) => l.id !== id);
|
|
18
18
|
};
|
|
19
|
-
const totalOffset = computed(
|
|
20
|
-
() => layers.value.reduce((acc, l) => acc + l.height, 0)
|
|
21
|
-
);
|
|
19
|
+
const totalOffset = computed(() => layers.value.reduce((acc, l) => acc + l.height, 0));
|
|
22
20
|
const getOffsetFor = (id) => {
|
|
23
21
|
const index = layers.value.findIndex((l) => l.id === id);
|
|
24
22
|
if (index === -1) return 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Property, PropertyGroup, BasePageProperties } from
|
|
1
|
+
import type { Property, PropertyGroup, BasePageProperties } from "../types/index.js";
|
|
2
2
|
export declare const useInfobox: (properties: BasePageProperties) => {
|
|
3
3
|
isFieldVisible: (schema: Property, isReadOnly: boolean) => boolean;
|
|
4
4
|
shouldRenderGroup: (group: PropertyGroup, isReadOnly: boolean) => boolean;
|
|
@@ -19,7 +19,9 @@ export const useInfobox = (properties) => {
|
|
|
19
19
|
return Object.entries(fields).sort(([, a], [, b]) => (a.order ?? 0) - (b.order ?? 0));
|
|
20
20
|
};
|
|
21
21
|
const getSortedGroups = (props) => {
|
|
22
|
-
return Object.entries(props).sort(
|
|
22
|
+
return Object.entries(props).sort(
|
|
23
|
+
([, a], [, b]) => (a.order ?? 0) - (b.order ?? 0)
|
|
24
|
+
);
|
|
23
25
|
};
|
|
24
26
|
return {
|
|
25
27
|
isFieldVisible,
|
|
@@ -19,7 +19,9 @@ export const useInfobox = (properties) => {
|
|
|
19
19
|
return Object.entries(fields).sort(([, a], [, b]) => (a.order ?? 0) - (b.order ?? 0));
|
|
20
20
|
};
|
|
21
21
|
const getSortedGroups = (props) => {
|
|
22
|
-
return Object.entries(props).sort(
|
|
22
|
+
return Object.entries(props).sort(
|
|
23
|
+
([, a], [, b]) => (a.order ?? 0) - (b.order ?? 0)
|
|
24
|
+
);
|
|
23
25
|
};
|
|
24
26
|
return {
|
|
25
27
|
isFieldVisible,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { ClassValue, TVVariants, TVCompoundVariants, TVDefaultVariants } from
|
|
1
|
+
import type { ClassValue, TVVariants, TVCompoundVariants, TVDefaultVariants } from "tailwind-variants";
|
|
2
2
|
/**
|
|
3
3
|
* Defines the AppConfig object based on the tailwind-variants configuration.
|
|
4
4
|
*/
|
|
5
5
|
export type TVConfig<T extends Record<string, any>> = {
|
|
6
6
|
[P in keyof T]?: {
|
|
7
|
-
[K in keyof T[P] as K extends
|
|
8
|
-
[S in keyof T[P][
|
|
9
|
-
} : K extends
|
|
7
|
+
[K in keyof T[P] as K extends "base" | "slots" | "variants" | "defaultVariants" ? K : never]?: K extends "base" ? ClassValue : K extends "slots" ? {
|
|
8
|
+
[S in keyof T[P]["slots"]]?: ClassValue;
|
|
9
|
+
} : K extends "variants" ? TVVariants<T[P]["slots"], ClassValue, WidenVariantsValues<T[P]["variants"]>> : K extends "defaultVariants" ? TVDefaultVariants<WidenVariantsValues<T[P]["variants"]>, T[P]["slots"], object, undefined> : never;
|
|
10
10
|
};
|
|
11
11
|
} & {
|
|
12
12
|
[P in keyof T]?: {
|
|
13
|
-
compoundVariants?: TVCompoundVariants<WidenVariantsValues<T[P][
|
|
13
|
+
compoundVariants?: TVCompoundVariants<WidenVariantsValues<T[P]["variants"]>, T[P]["slots"], ClassValue, object, undefined>;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
type WidenVariantsValues<V extends Record<string, any> | undefined> = V extends Record<string, any> ? V & {
|
|
@@ -26,27 +26,27 @@ type Id<T> = {} & {
|
|
|
26
26
|
type ComponentVariants<T extends {
|
|
27
27
|
variants?: Record<string, Record<string, any>>;
|
|
28
28
|
}> = {
|
|
29
|
-
[K in keyof T[
|
|
29
|
+
[K in keyof T["variants"]]: keyof T["variants"][K];
|
|
30
30
|
};
|
|
31
31
|
type ComponentSlots<T extends {
|
|
32
32
|
slots?: Record<string, any>;
|
|
33
33
|
}> = Id<{
|
|
34
|
-
[K in keyof T[
|
|
34
|
+
[K in keyof T["slots"]]?: ClassValue;
|
|
35
35
|
}>;
|
|
36
36
|
type ComponentUI<T extends {
|
|
37
37
|
slots?: Record<string, any>;
|
|
38
38
|
}> = Id<{
|
|
39
|
-
[K in keyof Required<T[
|
|
39
|
+
[K in keyof Required<T["slots"]>]: (props?: Record<string, any>) => string;
|
|
40
40
|
}>;
|
|
41
41
|
type GetComponentAppConfig<A, U extends string, K extends string> = A extends Record<U, Record<K, any>> ? A[U][K] : {};
|
|
42
|
-
type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U extends string =
|
|
42
|
+
type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U extends string = "ui" | "ui.prose"> = A & (U extends "ui.prose" ? {
|
|
43
43
|
ui?: {
|
|
44
44
|
prose?: {
|
|
45
45
|
[k in K]?: Partial<T>;
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
} : {
|
|
49
|
-
[key in Exclude<U,
|
|
49
|
+
[key in Exclude<U, "ui.prose">]?: {
|
|
50
50
|
[k in K]?: Partial<T>;
|
|
51
51
|
};
|
|
52
52
|
});
|
|
@@ -57,7 +57,7 @@ type ComponentAppConfig<T, A extends Record<string, any>, K extends string, U ex
|
|
|
57
57
|
* @template K The key identifying the component (e.g., 'badge').
|
|
58
58
|
* @template U The top-level key in AppConfig ('rimelightComponents').
|
|
59
59
|
*/
|
|
60
|
-
export type ComponentConfig<T extends Record<string, any>, A extends Record<string, any>, K extends string, U extends
|
|
60
|
+
export type ComponentConfig<T extends Record<string, any>, A extends Record<string, any>, K extends string, U extends "rimelightComponents"> = {
|
|
61
61
|
AppConfig: ComponentAppConfig<T, A, K, U>;
|
|
62
62
|
variants: ComponentVariants<T & GetComponentAppConfig<A, U, K>>;
|
|
63
63
|
slots: ComponentSlots<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rimelight-components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.34",
|
|
4
4
|
"description": "A component library by Rimelight Entertainment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nuxt",
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
"import": "./dist/runtime/composables/index.mjs",
|
|
29
29
|
"default": "./dist/runtime/composables/index.mjs"
|
|
30
30
|
},
|
|
31
|
+
"./db": {
|
|
32
|
+
"types": "./dist/runtime/db/index.d.ts",
|
|
33
|
+
"import": "./dist/runtime/db/index.mjs",
|
|
34
|
+
"default": "./dist/runtime/db/index.mjs"
|
|
35
|
+
},
|
|
31
36
|
"./types": {
|
|
32
37
|
"types": "./dist/runtime/types/index.d.ts",
|
|
33
38
|
"import": "./dist/runtime/types/index.mjs",
|
|
@@ -37,11 +42,6 @@
|
|
|
37
42
|
"types": "./dist/runtime/utils/index.d.ts",
|
|
38
43
|
"import": "./dist/runtime/utils/index.mjs",
|
|
39
44
|
"default": "./dist/runtime/utils/index.mjs"
|
|
40
|
-
},
|
|
41
|
-
"./db": {
|
|
42
|
-
"types": "./dist/runtime/db/index.d.ts",
|
|
43
|
-
"import": "./dist/runtime/db/index.mjs",
|
|
44
|
-
"default": "./dist/runtime/db/index.mjs"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"style": "./dist/runtime/index.css",
|
|
@@ -68,42 +68,43 @@
|
|
|
68
68
|
"rimelight-components": "workspace:*"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@nuxt/kit": "^4.
|
|
71
|
+
"@nuxt/kit": "^4.3.0",
|
|
72
72
|
"@vueuse/core": "^14.1.0",
|
|
73
73
|
"date-fns": "^4.1.0",
|
|
74
74
|
"defu": "^6.1.4",
|
|
75
75
|
"drizzle-orm": "^0.45.1",
|
|
76
|
-
"nuxt": "^4.2.2",
|
|
77
76
|
"tailwind-variants": "^3.2.2",
|
|
78
77
|
"uuid": "^13.0.0",
|
|
79
|
-
"vue": "^3.5.
|
|
80
|
-
"zod": "^4.
|
|
78
|
+
"vue": "^3.5.27",
|
|
79
|
+
"zod": "^4.3.6"
|
|
81
80
|
},
|
|
82
81
|
"devDependencies": {
|
|
83
|
-
"@iconify-json/lucide": "^1.2.
|
|
82
|
+
"@iconify-json/lucide": "^1.2.86",
|
|
84
83
|
"@nuxt/devtools": "^3.1.1",
|
|
85
84
|
"@nuxt/image": "^2.0.0",
|
|
86
85
|
"@nuxt/module-builder": "^1.0.2",
|
|
87
|
-
"@nuxt/schema": "^4.
|
|
88
|
-
"@nuxt/test-utils": "^3.
|
|
89
|
-
"@nuxt/ui": "^4.
|
|
86
|
+
"@nuxt/schema": "^4.3.0",
|
|
87
|
+
"@nuxt/test-utils": "^3.23.0",
|
|
88
|
+
"@nuxt/ui": "^4.4.0",
|
|
90
89
|
"@nuxtjs/i18n": "^10.2.1",
|
|
91
90
|
"@types/node": "latest",
|
|
92
91
|
"@vueuse/nuxt": "^14.1.0",
|
|
93
92
|
"changelogen": "^0.6.2",
|
|
93
|
+
"nuxt": "^4.3.0",
|
|
94
94
|
"oxfmt": "^0.18.0",
|
|
95
|
-
"oxlint": "^1.
|
|
96
|
-
"release-it": "^19.
|
|
95
|
+
"oxlint": "^1.41.0",
|
|
96
|
+
"release-it": "^19.2.4",
|
|
97
97
|
"tailwind-merge": "^3.4.0",
|
|
98
98
|
"typescript": "^5.9.3",
|
|
99
|
-
"vitest": "^4.0.
|
|
100
|
-
"vue-tsc": "^3.2.
|
|
99
|
+
"vitest": "^4.0.18",
|
|
100
|
+
"vue-tsc": "^3.2.3"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"@nuxt/image": "^2.0.0",
|
|
104
104
|
"@nuxt/ui": "^4.2.0",
|
|
105
105
|
"@nuxtjs/i18n": "^10.2.1",
|
|
106
|
-
"@vueuse/nuxt": "^14.1.0"
|
|
106
|
+
"@vueuse/nuxt": "^14.1.0",
|
|
107
|
+
"nuxt": "^4.3.0"
|
|
107
108
|
},
|
|
108
109
|
"trustedDependencies": [
|
|
109
110
|
"@parcel/watcher",
|