@abraca/nuxt 2.57.0 → 2.58.0
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/runtime/components/aware/AMedia.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AMedia.vue.d.ts +1 -1
- package/dist/runtime/components/editor/AMetaChip.d.vue.ts +36 -0
- package/dist/runtime/components/editor/AMetaChip.vue +381 -0
- package/dist/runtime/components/editor/AMetaChip.vue.d.ts +36 -0
- package/dist/runtime/components/shell/AUserProfilePopover.d.vue.ts +1 -1
- package/dist/runtime/components/shell/AUserProfilePopover.vue.d.ts +1 -1
- package/dist/runtime/extensions/views/DocEmbedView.vue +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
awareness: boolean;
|
|
13
13
|
tag: "video" | "audio";
|
|
14
14
|
live: boolean;
|
|
15
|
-
total: boolean;
|
|
16
15
|
controls: boolean;
|
|
16
|
+
total: boolean;
|
|
17
17
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
19
19
|
export default _default;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
awareness: boolean;
|
|
13
13
|
tag: "video" | "audio";
|
|
14
14
|
live: boolean;
|
|
15
|
-
total: boolean;
|
|
16
15
|
controls: boolean;
|
|
16
|
+
total: boolean;
|
|
17
17
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
19
19
|
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
fieldType: 'text' | 'url' | 'date' | 'datetime' | 'daterange' | 'location';
|
|
3
|
+
/** Chip label — shown while the field is empty, and as the popover title. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Lucide icon override (defaults per field type). */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Current meta snapshot (reactive from the parent). */
|
|
8
|
+
meta: Record<string, unknown>;
|
|
9
|
+
/** Key for single-value fields (text/url/date/datetime). */
|
|
10
|
+
metaKey?: string;
|
|
11
|
+
/** Keys for daterange. */
|
|
12
|
+
startKey?: string;
|
|
13
|
+
endKey?: string;
|
|
14
|
+
/** Keys for location. */
|
|
15
|
+
latKey?: string;
|
|
16
|
+
lngKey?: string;
|
|
17
|
+
/** Read-only chip (no popover, display only). */
|
|
18
|
+
readonly?: boolean;
|
|
19
|
+
/** daterange: offer an "Ongoing" action that clears endKey. */
|
|
20
|
+
allowOpenEnd?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
patch: (patch: Record<string, unknown>) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onPatch?: ((patch: Record<string, unknown>) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
label: string;
|
|
28
|
+
icon: string;
|
|
29
|
+
metaKey: string;
|
|
30
|
+
startKey: string;
|
|
31
|
+
endKey: string;
|
|
32
|
+
latKey: string;
|
|
33
|
+
lngKey: string;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
DateFormatter,
|
|
5
|
+
getLocalTimeZone,
|
|
6
|
+
Time,
|
|
7
|
+
parseDate
|
|
8
|
+
} from "@internationalized/date";
|
|
9
|
+
import ALocationPickerPopover from "./ALocationPickerPopover.vue";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
fieldType: { type: String, required: true },
|
|
12
|
+
label: { type: String, required: false, default: "" },
|
|
13
|
+
icon: { type: String, required: false, default: "" },
|
|
14
|
+
meta: { type: Object, required: true },
|
|
15
|
+
metaKey: { type: String, required: false, default: "" },
|
|
16
|
+
startKey: { type: String, required: false, default: "" },
|
|
17
|
+
endKey: { type: String, required: false, default: "" },
|
|
18
|
+
latKey: { type: String, required: false, default: "" },
|
|
19
|
+
lngKey: { type: String, required: false, default: "" },
|
|
20
|
+
readonly: { type: Boolean, required: false },
|
|
21
|
+
allowOpenEnd: { type: Boolean, required: false }
|
|
22
|
+
});
|
|
23
|
+
const emit = defineEmits(["patch"]);
|
|
24
|
+
const df = new DateFormatter("en-US", { dateStyle: "medium" });
|
|
25
|
+
const CHIP_CLASS = "h-7 px-2.5 py-1 text-sm border border-(--ui-border) rounded-md hover:bg-(--ui-bg-elevated) gap-1.5 data-[state=open]:bg-(--ui-bg-elevated)";
|
|
26
|
+
const DEFAULT_ICONS = {
|
|
27
|
+
text: "i-lucide-text-cursor-input",
|
|
28
|
+
url: "i-lucide-link",
|
|
29
|
+
date: "i-lucide-calendar",
|
|
30
|
+
datetime: "i-lucide-calendar-clock",
|
|
31
|
+
daterange: "i-lucide-calendar-range",
|
|
32
|
+
location: "i-lucide-map-pin"
|
|
33
|
+
};
|
|
34
|
+
const chipIcon = computed(() => props.icon || DEFAULT_ICONS[props.fieldType] || "i-lucide-tag");
|
|
35
|
+
function getStr(key) {
|
|
36
|
+
const v = props.meta?.[key];
|
|
37
|
+
return typeof v === "string" ? v : v != null ? String(v) : "";
|
|
38
|
+
}
|
|
39
|
+
function getOptNum(key) {
|
|
40
|
+
const v = props.meta?.[key];
|
|
41
|
+
if (v === void 0 || v === null || v === "") return void 0;
|
|
42
|
+
return Number(v);
|
|
43
|
+
}
|
|
44
|
+
function patch(update) {
|
|
45
|
+
if (props.readonly) return;
|
|
46
|
+
emit("patch", update);
|
|
47
|
+
}
|
|
48
|
+
function isoToCalendarDate(s) {
|
|
49
|
+
if (s.length < 10) return void 0;
|
|
50
|
+
try {
|
|
51
|
+
return parseDate(s.slice(0, 10));
|
|
52
|
+
} catch {
|
|
53
|
+
return void 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function dvToIso(d) {
|
|
57
|
+
return d.toString().slice(0, 10);
|
|
58
|
+
}
|
|
59
|
+
function fmtDate(s) {
|
|
60
|
+
if (!s) return "";
|
|
61
|
+
const cd = isoToCalendarDate(s);
|
|
62
|
+
return cd ? df.format(cd.toDate(getLocalTimeZone())) : s;
|
|
63
|
+
}
|
|
64
|
+
function isoToTime(hhmm) {
|
|
65
|
+
const [h = 0, m = 0] = hhmm.split(":").map(Number);
|
|
66
|
+
return new Time(Number.isNaN(h) ? 0 : h, Number.isNaN(m) ? 0 : m);
|
|
67
|
+
}
|
|
68
|
+
function timeToHHMM(tv) {
|
|
69
|
+
return `${String(tv.hour).padStart(2, "0")}:${String(tv.minute).padStart(2, "0")}`;
|
|
70
|
+
}
|
|
71
|
+
function asSingleTime(raw) {
|
|
72
|
+
if (raw && typeof raw === "object" && "hour" in raw && "minute" in raw) {
|
|
73
|
+
const v = raw;
|
|
74
|
+
if (typeof v.hour === "number" && typeof v.minute === "number") {
|
|
75
|
+
return { hour: v.hour, minute: v.minute };
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
const displayText = computed(() => {
|
|
81
|
+
switch (props.fieldType) {
|
|
82
|
+
case "text":
|
|
83
|
+
return getStr(props.metaKey);
|
|
84
|
+
case "url": {
|
|
85
|
+
const url = getStr(props.metaKey);
|
|
86
|
+
if (!url) return "";
|
|
87
|
+
try {
|
|
88
|
+
return new URL(url).hostname.replace(/^www\./, "");
|
|
89
|
+
} catch {
|
|
90
|
+
return url;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
case "date":
|
|
94
|
+
return fmtDate(getStr(props.metaKey));
|
|
95
|
+
case "datetime": {
|
|
96
|
+
const v = getStr(props.metaKey);
|
|
97
|
+
if (!v) return "";
|
|
98
|
+
const time = v.includes("T") ? v.slice(11, 16) : "";
|
|
99
|
+
return [fmtDate(v), time].filter(Boolean).join(" ");
|
|
100
|
+
}
|
|
101
|
+
case "daterange": {
|
|
102
|
+
const start = getStr(props.startKey);
|
|
103
|
+
const end = getStr(props.endKey);
|
|
104
|
+
if (!start && !end) return "";
|
|
105
|
+
const endLabel = end ? fmtDate(end) : props.allowOpenEnd ? "now" : "";
|
|
106
|
+
return endLabel ? `${fmtDate(start)} \u2013 ${endLabel}` : fmtDate(start);
|
|
107
|
+
}
|
|
108
|
+
case "location": {
|
|
109
|
+
const lat = getOptNum(props.latKey);
|
|
110
|
+
const lng = getOptNum(props.lngKey);
|
|
111
|
+
if (lat === void 0 || lng === void 0) return "";
|
|
112
|
+
return `${lat.toFixed(4)}, ${lng.toFixed(4)}`;
|
|
113
|
+
}
|
|
114
|
+
default:
|
|
115
|
+
return "";
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const chipText = computed(() => displayText.value || props.label || props.fieldType);
|
|
119
|
+
const isEmpty = computed(() => !displayText.value);
|
|
120
|
+
const popoverOpen = ref(false);
|
|
121
|
+
const draft = ref("");
|
|
122
|
+
function openTextDraft(open) {
|
|
123
|
+
popoverOpen.value = open;
|
|
124
|
+
if (open) draft.value = getStr(props.metaKey);
|
|
125
|
+
}
|
|
126
|
+
function commitDraft() {
|
|
127
|
+
const v = draft.value.trim();
|
|
128
|
+
patch({ [props.metaKey]: v || void 0 });
|
|
129
|
+
popoverOpen.value = false;
|
|
130
|
+
}
|
|
131
|
+
function openUrl() {
|
|
132
|
+
const url = getStr(props.metaKey);
|
|
133
|
+
if (url) window.open(url, "_blank", "noopener");
|
|
134
|
+
}
|
|
135
|
+
function onSingleDate(d) {
|
|
136
|
+
if (!d || typeof d.toString !== "function") return;
|
|
137
|
+
const iso = dvToIso(d);
|
|
138
|
+
if (props.fieldType === "datetime") {
|
|
139
|
+
const time = getStr(props.metaKey).slice(11, 16) || "00:00";
|
|
140
|
+
patch({ [props.metaKey]: `${iso}T${time}:00.000Z` });
|
|
141
|
+
} else {
|
|
142
|
+
patch({ [props.metaKey]: iso });
|
|
143
|
+
popoverOpen.value = false;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function onDatetimeTime(raw) {
|
|
147
|
+
const tv = asSingleTime(raw);
|
|
148
|
+
if (!tv) return;
|
|
149
|
+
const date = getStr(props.metaKey).slice(0, 10) || (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
150
|
+
patch({ [props.metaKey]: `${date}T${timeToHHMM(tv)}:00.000Z` });
|
|
151
|
+
}
|
|
152
|
+
const rangeModel = computed(() => {
|
|
153
|
+
const start = isoToCalendarDate(getStr(props.startKey));
|
|
154
|
+
const end = isoToCalendarDate(getStr(props.endKey));
|
|
155
|
+
return start && end ? { start, end } : void 0;
|
|
156
|
+
});
|
|
157
|
+
function onDateRange(range) {
|
|
158
|
+
if (!range?.start) return;
|
|
159
|
+
patch({
|
|
160
|
+
[props.startKey]: dvToIso(range.start),
|
|
161
|
+
[props.endKey]: range.end ? dvToIso(range.end) : void 0
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function setOngoing() {
|
|
165
|
+
patch({ [props.endKey]: void 0 });
|
|
166
|
+
popoverOpen.value = false;
|
|
167
|
+
}
|
|
168
|
+
function clearField() {
|
|
169
|
+
const update = {};
|
|
170
|
+
if (props.metaKey) update[props.metaKey] = void 0;
|
|
171
|
+
if (props.startKey) update[props.startKey] = void 0;
|
|
172
|
+
if (props.endKey) update[props.endKey] = void 0;
|
|
173
|
+
patch(update);
|
|
174
|
+
popoverOpen.value = false;
|
|
175
|
+
}
|
|
176
|
+
function onLatLng(key, v) {
|
|
177
|
+
patch({ [key]: v != null ? Number(v) : void 0 });
|
|
178
|
+
}
|
|
179
|
+
</script>
|
|
180
|
+
|
|
181
|
+
<template>
|
|
182
|
+
<span
|
|
183
|
+
class="a-meta-chip inline-flex items-center"
|
|
184
|
+
:data-field-type="fieldType"
|
|
185
|
+
>
|
|
186
|
+
<!-- location delegates to the shared picker popover -->
|
|
187
|
+
<ALocationPickerPopover
|
|
188
|
+
v-if="fieldType === 'location' && !readonly"
|
|
189
|
+
:lat-value="getOptNum(latKey)"
|
|
190
|
+
:lng-value="getOptNum(lngKey)"
|
|
191
|
+
:open="popoverOpen"
|
|
192
|
+
@update:lat="(v) => onLatLng(latKey, v)"
|
|
193
|
+
@update:lng="(v) => onLatLng(lngKey, v)"
|
|
194
|
+
@update:open="popoverOpen = $event"
|
|
195
|
+
@clear="() => {
|
|
196
|
+
onLatLng(latKey, null);
|
|
197
|
+
onLatLng(lngKey, null);
|
|
198
|
+
}"
|
|
199
|
+
>
|
|
200
|
+
<UButton
|
|
201
|
+
size="sm"
|
|
202
|
+
color="neutral"
|
|
203
|
+
variant="ghost"
|
|
204
|
+
:icon="chipIcon"
|
|
205
|
+
:class="CHIP_CLASS"
|
|
206
|
+
>
|
|
207
|
+
<span
|
|
208
|
+
class="max-w-44 truncate"
|
|
209
|
+
:class="isEmpty ? 'text-(--ui-text-muted)' : ''"
|
|
210
|
+
>{{ chipText }}</span>
|
|
211
|
+
</UButton>
|
|
212
|
+
</ALocationPickerPopover>
|
|
213
|
+
|
|
214
|
+
<UPopover
|
|
215
|
+
v-else-if="!readonly"
|
|
216
|
+
:open="popoverOpen"
|
|
217
|
+
:content="{ align: 'start' }"
|
|
218
|
+
@update:open="fieldType === 'text' || fieldType === 'url' ? openTextDraft($event) : popoverOpen = $event"
|
|
219
|
+
>
|
|
220
|
+
<UButton
|
|
221
|
+
size="sm"
|
|
222
|
+
color="neutral"
|
|
223
|
+
variant="ghost"
|
|
224
|
+
:icon="chipIcon"
|
|
225
|
+
:class="CHIP_CLASS"
|
|
226
|
+
>
|
|
227
|
+
<span
|
|
228
|
+
class="max-w-44 truncate"
|
|
229
|
+
:class="isEmpty ? 'text-(--ui-text-muted)' : ''"
|
|
230
|
+
>{{ chipText }}</span>
|
|
231
|
+
</UButton>
|
|
232
|
+
|
|
233
|
+
<template #content>
|
|
234
|
+
<!-- text / url -->
|
|
235
|
+
<div
|
|
236
|
+
v-if="fieldType === 'text' || fieldType === 'url'"
|
|
237
|
+
class="p-2 w-72"
|
|
238
|
+
>
|
|
239
|
+
<p
|
|
240
|
+
v-if="label"
|
|
241
|
+
class="text-xs font-medium text-(--ui-text-muted) mb-1.5"
|
|
242
|
+
>
|
|
243
|
+
{{ label }}
|
|
244
|
+
</p>
|
|
245
|
+
<div class="flex items-center gap-1.5">
|
|
246
|
+
<UInput
|
|
247
|
+
v-model="draft"
|
|
248
|
+
size="sm"
|
|
249
|
+
class="flex-1"
|
|
250
|
+
:type="fieldType === 'url' ? 'url' : 'text'"
|
|
251
|
+
:placeholder="fieldType === 'url' ? 'https://\u2026' : label"
|
|
252
|
+
autofocus
|
|
253
|
+
@keydown.enter.prevent="commitDraft"
|
|
254
|
+
@keydown.escape.prevent="popoverOpen = false"
|
|
255
|
+
/>
|
|
256
|
+
<UButton
|
|
257
|
+
v-if="fieldType === 'url' && getStr(metaKey)"
|
|
258
|
+
size="sm"
|
|
259
|
+
color="neutral"
|
|
260
|
+
variant="ghost"
|
|
261
|
+
icon="i-lucide-external-link"
|
|
262
|
+
aria-label="Open link"
|
|
263
|
+
@click="openUrl"
|
|
264
|
+
/>
|
|
265
|
+
</div>
|
|
266
|
+
<div class="flex items-center justify-between mt-2">
|
|
267
|
+
<UButton
|
|
268
|
+
size="xs"
|
|
269
|
+
color="neutral"
|
|
270
|
+
variant="ghost"
|
|
271
|
+
@click="clearField"
|
|
272
|
+
>
|
|
273
|
+
Clear
|
|
274
|
+
</UButton>
|
|
275
|
+
<UButton
|
|
276
|
+
size="xs"
|
|
277
|
+
color="neutral"
|
|
278
|
+
variant="soft"
|
|
279
|
+
@click="commitDraft"
|
|
280
|
+
>
|
|
281
|
+
Save
|
|
282
|
+
</UButton>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
<!-- single date -->
|
|
287
|
+
<div
|
|
288
|
+
v-else-if="fieldType === 'date'"
|
|
289
|
+
class="p-2"
|
|
290
|
+
>
|
|
291
|
+
<UCalendar
|
|
292
|
+
:model-value="isoToCalendarDate(getStr(metaKey))"
|
|
293
|
+
@update:model-value="onSingleDate($event)"
|
|
294
|
+
/>
|
|
295
|
+
<div class="flex justify-end pt-1">
|
|
296
|
+
<UButton
|
|
297
|
+
size="xs"
|
|
298
|
+
color="neutral"
|
|
299
|
+
variant="ghost"
|
|
300
|
+
@click="clearField"
|
|
301
|
+
>
|
|
302
|
+
Clear
|
|
303
|
+
</UButton>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
|
|
307
|
+
<!-- datetime -->
|
|
308
|
+
<div
|
|
309
|
+
v-else-if="fieldType === 'datetime'"
|
|
310
|
+
class="p-2"
|
|
311
|
+
>
|
|
312
|
+
<UCalendar
|
|
313
|
+
:model-value="isoToCalendarDate(getStr(metaKey))"
|
|
314
|
+
@update:model-value="onSingleDate($event)"
|
|
315
|
+
/>
|
|
316
|
+
<div class="flex items-center gap-2 pt-3 mt-3 border-t border-(--ui-border)">
|
|
317
|
+
<UInputTime
|
|
318
|
+
size="sm"
|
|
319
|
+
:model-value="isoToTime(getStr(metaKey).slice(11, 16) || '00:00')"
|
|
320
|
+
@update:model-value="onDatetimeTime($event)"
|
|
321
|
+
/>
|
|
322
|
+
<div class="flex-1" />
|
|
323
|
+
<UButton
|
|
324
|
+
size="xs"
|
|
325
|
+
color="neutral"
|
|
326
|
+
variant="ghost"
|
|
327
|
+
@click="clearField"
|
|
328
|
+
>
|
|
329
|
+
Clear
|
|
330
|
+
</UButton>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
<!-- daterange -->
|
|
335
|
+
<div
|
|
336
|
+
v-else-if="fieldType === 'daterange'"
|
|
337
|
+
class="p-2"
|
|
338
|
+
>
|
|
339
|
+
<UCalendar
|
|
340
|
+
range
|
|
341
|
+
:model-value="rangeModel"
|
|
342
|
+
@update:model-value="onDateRange($event)"
|
|
343
|
+
/>
|
|
344
|
+
<div class="flex items-center justify-between pt-1">
|
|
345
|
+
<UButton
|
|
346
|
+
v-if="allowOpenEnd"
|
|
347
|
+
size="xs"
|
|
348
|
+
color="neutral"
|
|
349
|
+
variant="soft"
|
|
350
|
+
icon="i-lucide-infinity"
|
|
351
|
+
@click="setOngoing"
|
|
352
|
+
>
|
|
353
|
+
Ongoing
|
|
354
|
+
</UButton>
|
|
355
|
+
<span v-else />
|
|
356
|
+
<UButton
|
|
357
|
+
size="xs"
|
|
358
|
+
color="neutral"
|
|
359
|
+
variant="ghost"
|
|
360
|
+
@click="clearField"
|
|
361
|
+
>
|
|
362
|
+
Clear
|
|
363
|
+
</UButton>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
</template>
|
|
367
|
+
</UPopover>
|
|
368
|
+
|
|
369
|
+
<!-- read-only chip -->
|
|
370
|
+
<span
|
|
371
|
+
v-else
|
|
372
|
+
class="inline-flex items-center gap-1.5 h-7 px-2.5 py-1 text-sm border border-(--ui-border) rounded-md text-(--ui-text-muted)"
|
|
373
|
+
>
|
|
374
|
+
<UIcon
|
|
375
|
+
:name="chipIcon"
|
|
376
|
+
class="size-3.5"
|
|
377
|
+
/>
|
|
378
|
+
<span class="max-w-44 truncate">{{ chipText }}</span>
|
|
379
|
+
</span>
|
|
380
|
+
</span>
|
|
381
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
fieldType: 'text' | 'url' | 'date' | 'datetime' | 'daterange' | 'location';
|
|
3
|
+
/** Chip label — shown while the field is empty, and as the popover title. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Lucide icon override (defaults per field type). */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Current meta snapshot (reactive from the parent). */
|
|
8
|
+
meta: Record<string, unknown>;
|
|
9
|
+
/** Key for single-value fields (text/url/date/datetime). */
|
|
10
|
+
metaKey?: string;
|
|
11
|
+
/** Keys for daterange. */
|
|
12
|
+
startKey?: string;
|
|
13
|
+
endKey?: string;
|
|
14
|
+
/** Keys for location. */
|
|
15
|
+
latKey?: string;
|
|
16
|
+
lngKey?: string;
|
|
17
|
+
/** Read-only chip (no popover, display only). */
|
|
18
|
+
readonly?: boolean;
|
|
19
|
+
/** daterange: offer an "Ongoing" action that clears endKey. */
|
|
20
|
+
allowOpenEnd?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
patch: (patch: Record<string, unknown>) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onPatch?: ((patch: Record<string, unknown>) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
label: string;
|
|
28
|
+
icon: string;
|
|
29
|
+
metaKey: string;
|
|
30
|
+
startKey: string;
|
|
31
|
+
endKey: string;
|
|
32
|
+
latKey: string;
|
|
33
|
+
lngKey: string;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
39
39
|
currentDocId: string | null;
|
|
40
40
|
isSelf: boolean;
|
|
41
41
|
avatarStyle: string;
|
|
42
|
-
isFollowing: boolean;
|
|
43
42
|
showFollow: boolean;
|
|
43
|
+
isFollowing: boolean;
|
|
44
44
|
currentDocLabel: string | null;
|
|
45
45
|
currentDocIcon: string;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
39
39
|
currentDocId: string | null;
|
|
40
40
|
isSelf: boolean;
|
|
41
41
|
avatarStyle: string;
|
|
42
|
-
isFollowing: boolean;
|
|
43
42
|
showFollow: boolean;
|
|
43
|
+
isFollowing: boolean;
|
|
44
44
|
currentDocLabel: string | null;
|
|
45
45
|
currentDocIcon: string;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -225,5 +225,5 @@ function removeEmbed() {
|
|
|
225
225
|
</template>
|
|
226
226
|
|
|
227
227
|
<style scoped>
|
|
228
|
-
.de-container{background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:10px;box-shadow:0 8px 32px rgba(0,0,0,.1),0 2px 8px rgba(0,0,0,.06);overflow:hidden;transition:box-shadow .28s ease}.de-container:has(.de-body-collapsed){box-shadow:0 2px 8px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.04)}.de-header{align-items:center;background:var(--ui-bg-elevated);border-bottom:1px solid var(--ui-border);cursor:grab;display:flex;flex-shrink:0;gap:6px;height:34px;padding:0 4px 0 10px;transition:border-color .28s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.de-header:active{cursor:grabbing}.de-header-collapsed{border-bottom-color:transparent}.de-body{display:flex;flex-direction:column;height:400px;overflow:hidden;transition:height .28s cubic-bezier(.4,0,.2,1),border-color .28s ease}.de-body-tall{height:700px}.de-body-collapsed{height:0}.de-seamless{background:transparent;border:none;box-shadow:none}.de-seamless .de-header{background:transparent;border-bottom:none;height:26px;opacity:0;pointer-events:none;transition:opacity .15s ease}.de-seamless:focus-within .de-header,.de-seamless:hover .de-header{opacity:1;pointer-events:auto}.de-body-seamless{height:auto;min-height:0}.de-title{align-items:center;display:flex;flex:1;gap:4px;min-width:0;overflow:hidden;pointer-events:none}.de-title button,.de-title-link{pointer-events:auto}.de-title-link{cursor:pointer}.de-title-link .de-title-text{color:var(--ui-primary);text-decoration:underline;text-decoration-color:transparent;transition:text-decoration-color .12s}.de-title-link:hover .de-title-text{text-decoration-color:var(--ui-primary)}.de-title-text{color:var(--ui-text-muted);font-size:12px;font-weight:500;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.de-type-btn{align-items:center;border-radius:var(--ui-radius);color:var(--ui-text-muted);cursor:pointer;display:flex;flex-shrink:0;height:22px;justify-content:center;transition:background .1s,color .1s;width:22px}.de-type-btn:hover{background:var(--ui-bg-accented);color:var(--ui-text)}.de-controls{flex-shrink:0;gap:2px}.de-controls,.de-ctrl-btn{align-items:center;display:flex}.de-ctrl-btn{border-radius:50%;color:var(--ui-text-dimmed);cursor:pointer;height:22px;justify-content:center;transition:background .12s,color .12s;width:22px}.de-ctrl-btn:hover{background:var(--ui-bg-accented);color:var(--ui-text)}.de-ctrl-expand:hover{background:rgba(34,197,94,.15);color:#148f3e}.de-ctrl-close:hover{background:rgba(239,68,68,.15);color:#dc2626}
|
|
228
|
+
.de-container{background:var(--ui-bg);border:1px solid var(--ui-border);border-radius:10px;box-shadow:0 8px 32px rgba(0,0,0,.1),0 2px 8px rgba(0,0,0,.06);overflow:hidden;transition:box-shadow .28s ease}.de-container:has(.de-body-collapsed){box-shadow:0 2px 8px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.04)}.de-header{align-items:center;background:var(--ui-bg-elevated);border-bottom:1px solid var(--ui-border);cursor:grab;display:flex;flex-shrink:0;gap:6px;height:34px;padding:0 4px 0 10px;transition:border-color .28s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.de-header:active{cursor:grabbing}.de-header-collapsed{border-bottom-color:transparent}.de-body{display:flex;flex-direction:column;height:400px;overflow-x:hidden;overflow-y:auto;transition:height .28s cubic-bezier(.4,0,.2,1),border-color .28s ease}.de-body-collapsed{overflow-y:hidden}.de-body-tall{height:700px}.de-body-collapsed{height:0}.de-seamless{background:transparent;border:none;box-shadow:none}.de-seamless .de-header{background:transparent;border-bottom:none;height:26px;opacity:0;pointer-events:none;transition:opacity .15s ease}.de-seamless:focus-within .de-header,.de-seamless:hover .de-header{opacity:1;pointer-events:auto}.de-body-seamless{height:auto;min-height:0}.de-title{align-items:center;display:flex;flex:1;gap:4px;min-width:0;overflow:hidden;pointer-events:none}.de-title button,.de-title-link{pointer-events:auto}.de-title-link{cursor:pointer}.de-title-link .de-title-text{color:var(--ui-primary);text-decoration:underline;text-decoration-color:transparent;transition:text-decoration-color .12s}.de-title-link:hover .de-title-text{text-decoration-color:var(--ui-primary)}.de-title-text{color:var(--ui-text-muted);font-size:12px;font-weight:500;overflow:hidden;pointer-events:none;text-overflow:ellipsis;white-space:nowrap}.de-type-btn{align-items:center;border-radius:var(--ui-radius);color:var(--ui-text-muted);cursor:pointer;display:flex;flex-shrink:0;height:22px;justify-content:center;transition:background .1s,color .1s;width:22px}.de-type-btn:hover{background:var(--ui-bg-accented);color:var(--ui-text)}.de-controls{flex-shrink:0;gap:2px}.de-controls,.de-ctrl-btn{align-items:center;display:flex}.de-ctrl-btn{border-radius:50%;color:var(--ui-text-dimmed);cursor:pointer;height:22px;justify-content:center;transition:background .12s,color .12s;width:22px}.de-ctrl-btn:hover{background:var(--ui-bg-accented);color:var(--ui-text)}.de-ctrl-expand:hover{background:rgba(34,197,94,.15);color:#148f3e}.de-ctrl-close:hover{background:rgba(239,68,68,.15);color:#dc2626}
|
|
229
229
|
</style>
|