@abraca/nuxt 2.34.0 → 2.35.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.
Files changed (46) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/ANodeSettingsPanel.d.vue.ts +11 -4
  3. package/dist/runtime/components/ANodeSettingsPanel.vue +63 -9
  4. package/dist/runtime/components/ANodeSettingsPanel.vue.d.ts +11 -4
  5. package/dist/runtime/components/aware/AMedia.d.vue.ts +1 -1
  6. package/dist/runtime/components/aware/AMedia.vue.d.ts +1 -1
  7. package/dist/runtime/components/chat/ANodeChatPanel.vue +4 -0
  8. package/dist/runtime/components/renderers/ASheetsRenderer.client.vue +160 -1
  9. package/dist/runtime/components/renderers/sheets/ASheetsCell.d.vue.ts +3 -0
  10. package/dist/runtime/components/renderers/sheets/ASheetsCell.vue +30 -34
  11. package/dist/runtime/components/renderers/sheets/ASheetsCell.vue.d.ts +3 -0
  12. package/dist/runtime/components/renderers/sheets/ASheetsConditionalModal.d.vue.ts +15 -0
  13. package/dist/runtime/components/renderers/sheets/ASheetsConditionalModal.vue +226 -0
  14. package/dist/runtime/components/renderers/sheets/ASheetsConditionalModal.vue.d.ts +15 -0
  15. package/dist/runtime/components/renderers/sheets/ASheetsFindPanel.d.vue.ts +31 -0
  16. package/dist/runtime/components/renderers/sheets/ASheetsFindPanel.vue +130 -0
  17. package/dist/runtime/components/renderers/sheets/ASheetsFindPanel.vue.d.ts +31 -0
  18. package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue +25 -6
  19. package/dist/runtime/components/renderers/sheets/ASheetsToolbar.d.vue.ts +6 -0
  20. package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue +39 -3
  21. package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue.d.ts +6 -0
  22. package/dist/runtime/components/renderers/sheets/ASheetsValidationModal.d.vue.ts +15 -0
  23. package/dist/runtime/components/renderers/sheets/ASheetsValidationModal.vue +185 -0
  24. package/dist/runtime/components/renderers/sheets/ASheetsValidationModal.vue.d.ts +15 -0
  25. package/dist/runtime/components/settings/ASettingsAdminPanel.vue +168 -1
  26. package/dist/runtime/components/settings/ASettingsInvitesPanel.vue +73 -11
  27. package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +25 -3
  28. package/dist/runtime/components/shell/ADocPanelSettings.vue +28 -10
  29. package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +25 -3
  30. package/dist/runtime/components/shell/AUserMenu.d.vue.ts +2 -2
  31. package/dist/runtime/components/shell/AUserMenu.vue.d.ts +2 -2
  32. package/dist/runtime/composables/useChatUsers.d.ts +50 -4
  33. package/dist/runtime/composables/useChatUsers.js +57 -17
  34. package/dist/runtime/composables/useDocPermissions.d.ts +137 -0
  35. package/dist/runtime/composables/useDocPermissions.js +258 -0
  36. package/dist/runtime/composables/useIdentityDoc.d.ts +1 -1
  37. package/dist/runtime/composables/useOrphans.d.ts +58 -0
  38. package/dist/runtime/composables/useOrphans.js +87 -0
  39. package/dist/runtime/composables/useSheetsFind.d.ts +35 -0
  40. package/dist/runtime/composables/useSheetsFind.js +44 -0
  41. package/dist/runtime/composables/useSheetsFormat.d.ts +40 -0
  42. package/dist/runtime/composables/useSheetsFormat.js +132 -0
  43. package/dist/runtime/composables/useSheetsValidation.d.ts +22 -0
  44. package/dist/runtime/composables/useSheetsValidation.js +38 -0
  45. package/dist/runtime/types.d.ts +52 -10
  46. package/package.json +1 -1
@@ -0,0 +1,226 @@
1
+ <script setup>
2
+ import { ref, computed, watch } from "vue";
3
+ const props = defineProps({
4
+ open: { type: Boolean, required: true },
5
+ columnLabel: { type: String, required: true },
6
+ rules: { type: Array, required: true }
7
+ });
8
+ const emit = defineEmits(["update:open", "save"]);
9
+ const SWATCHES = [
10
+ "#fde047",
11
+ "#fca5a5",
12
+ "#86efac",
13
+ "#93c5fd",
14
+ "#c4b5fd",
15
+ "#f9a8d4",
16
+ "#fdba74",
17
+ "#67e8f9",
18
+ "#d9f99d",
19
+ "#a5b4fc",
20
+ "#fecaca",
21
+ "#e5e7eb"
22
+ ];
23
+ const draft = ref([]);
24
+ watch(() => props.open, (isOpen) => {
25
+ if (isOpen) draft.value = props.rules.map((r) => ({ ...r }));
26
+ });
27
+ const OPS = [
28
+ { value: "gt", label: "Greater than", needsValue: true, numeric: true },
29
+ { value: "lt", label: "Less than", needsValue: true, numeric: true },
30
+ { value: "ge", label: "\u2265", needsValue: true, numeric: true },
31
+ { value: "le", label: "\u2264", needsValue: true, numeric: true },
32
+ { value: "eq", label: "Equals", needsValue: true },
33
+ { value: "ne", label: "Not equal", needsValue: true },
34
+ { value: "between", label: "Between", needsValue: true, needsValue2: true, numeric: true },
35
+ { value: "contains", label: "Contains", needsValue: true },
36
+ { value: "notContains", label: "Does not contain", needsValue: true },
37
+ { value: "isEmpty", label: "Is empty", needsValue: false },
38
+ { value: "notEmpty", label: "Is not empty", needsValue: false }
39
+ ];
40
+ const opItems = computed(() => OPS.map((o) => ({ label: o.label, value: o.value })));
41
+ function opSpec(op) {
42
+ return OPS.find((o) => o.value === op) ?? OPS[0];
43
+ }
44
+ function addRule() {
45
+ draft.value.push({ op: "gt", value: 0, bg: "#fde047" });
46
+ }
47
+ function removeRule(idx) {
48
+ draft.value.splice(idx, 1);
49
+ }
50
+ function apply() {
51
+ const clean = draft.value.filter((r) => {
52
+ const spec = opSpec(r.op);
53
+ if (spec.needsValue && (r.value === void 0 || r.value === "")) return false;
54
+ return true;
55
+ });
56
+ emit("save", clean);
57
+ emit("update:open", false);
58
+ }
59
+ </script>
60
+
61
+ <template>
62
+ <UModal
63
+ :open="open"
64
+ title="Conditional formatting"
65
+ @update:open="emit('update:open', $event)"
66
+ >
67
+ <template #content>
68
+ <UCard>
69
+ <template #header>
70
+ <div class="flex items-center justify-between">
71
+ <h3 class="text-base font-semibold">
72
+ Conditional formatting · <span class="font-mono text-(--ui-text-muted)">{{ columnLabel }}</span>
73
+ </h3>
74
+ <UButton
75
+ color="neutral"
76
+ variant="ghost"
77
+ icon="i-lucide-x"
78
+ size="sm"
79
+ @click="emit('update:open', false)"
80
+ />
81
+ </div>
82
+ </template>
83
+
84
+ <div class="space-y-3 min-w-[28rem]">
85
+ <p
86
+ v-if="!draft.length"
87
+ class="text-sm text-(--ui-text-dimmed) py-2"
88
+ >
89
+ No rules yet. Add one below — the first matching rule styles the cell.
90
+ </p>
91
+
92
+ <div
93
+ v-for="(rule, idx) in draft"
94
+ :key="idx"
95
+ class="flex flex-wrap items-center gap-2 p-2 rounded-lg border border-(--ui-border)"
96
+ >
97
+ <USelectMenu
98
+ v-model="rule.op"
99
+ :items="opItems"
100
+ value-key="value"
101
+ size="sm"
102
+ class="w-40"
103
+ />
104
+
105
+ <UInput
106
+ v-if="opSpec(rule.op).needsValue"
107
+ v-model="rule.value"
108
+ :type="opSpec(rule.op).numeric ? 'number' : 'text'"
109
+ size="sm"
110
+ class="w-24"
111
+ placeholder="Value"
112
+ />
113
+ <template v-if="opSpec(rule.op).needsValue2">
114
+ <span class="text-xs text-(--ui-text-muted)">and</span>
115
+ <UInput
116
+ v-model="rule.value2"
117
+ type="number"
118
+ size="sm"
119
+ class="w-24"
120
+ />
121
+ </template>
122
+
123
+ <div class="flex items-center gap-1 ml-auto">
124
+ <UPopover>
125
+ <UButton
126
+ size="xs"
127
+ variant="ghost"
128
+ aria-label="Background color"
129
+ :style="rule.bg ? { backgroundColor: rule.bg, color: '#000' } : void 0"
130
+ icon="i-lucide-paint-bucket"
131
+ />
132
+ <template #content>
133
+ <div class="grid grid-cols-6 gap-1 p-2">
134
+ <button
135
+ v-for="c in SWATCHES"
136
+ :key="`bg${c}`"
137
+ class="size-5 rounded-sm border border-(--ui-border)"
138
+ :style="{ backgroundColor: c }"
139
+ @click="rule.bg = c"
140
+ />
141
+ <button
142
+ class="size-5 rounded-sm border border-(--ui-border) flex items-center justify-center"
143
+ @click="rule.bg = void 0"
144
+ >
145
+ <UIcon
146
+ name="i-lucide-x"
147
+ class="size-3"
148
+ />
149
+ </button>
150
+ </div>
151
+ </template>
152
+ </UPopover>
153
+ <UPopover>
154
+ <UButton
155
+ size="xs"
156
+ variant="ghost"
157
+ aria-label="Text color"
158
+ :style="rule.fg ? { color: rule.fg } : void 0"
159
+ icon="i-lucide-baseline"
160
+ />
161
+ <template #content>
162
+ <div class="grid grid-cols-6 gap-1 p-2">
163
+ <button
164
+ v-for="c in SWATCHES"
165
+ :key="`fg${c}`"
166
+ class="size-5 rounded-sm border border-(--ui-border)"
167
+ :style="{ backgroundColor: c }"
168
+ @click="rule.fg = c"
169
+ />
170
+ <button
171
+ class="size-5 rounded-sm border border-(--ui-border) flex items-center justify-center"
172
+ @click="rule.fg = void 0"
173
+ >
174
+ <UIcon
175
+ name="i-lucide-x"
176
+ class="size-3"
177
+ />
178
+ </button>
179
+ </div>
180
+ </template>
181
+ </UPopover>
182
+ <UButton
183
+ size="xs"
184
+ :variant="rule.bold ? 'soft' : 'ghost'"
185
+ icon="i-lucide-bold"
186
+ aria-label="Bold"
187
+ @click="rule.bold = !rule.bold"
188
+ />
189
+ <UButton
190
+ size="xs"
191
+ variant="ghost"
192
+ color="error"
193
+ icon="i-lucide-trash-2"
194
+ aria-label="Delete rule"
195
+ @click="removeRule(idx)"
196
+ />
197
+ </div>
198
+ </div>
199
+
200
+ <UButton
201
+ size="sm"
202
+ variant="soft"
203
+ icon="i-lucide-plus"
204
+ label="Add rule"
205
+ @click="addRule"
206
+ />
207
+ </div>
208
+
209
+ <template #footer>
210
+ <div class="flex justify-end gap-2">
211
+ <UButton
212
+ color="neutral"
213
+ variant="ghost"
214
+ label="Cancel"
215
+ @click="emit('update:open', false)"
216
+ />
217
+ <UButton
218
+ label="Apply"
219
+ @click="apply"
220
+ />
221
+ </div>
222
+ </template>
223
+ </UCard>
224
+ </template>
225
+ </UModal>
226
+ </template>
@@ -0,0 +1,15 @@
1
+ import type { SheetsConditionalRule } from '../../../types.js';
2
+ type __VLS_Props = {
3
+ open: boolean;
4
+ columnLabel: string;
5
+ rules: SheetsConditionalRule[];
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ "update:open": (value: boolean) => any;
9
+ save: (rules: SheetsConditionalRule[]) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
12
+ onSave?: ((rules: SheetsConditionalRule[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import type { FindOptions } from '../../../composables/useSheetsFind.js';
2
+ type __VLS_Props = {
3
+ visible: boolean;
4
+ editable: boolean;
5
+ matchCount: number;
6
+ currentIndex: number;
7
+ query: string;
8
+ replacement: string;
9
+ options: FindOptions;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ close: () => any;
13
+ replace: () => any;
14
+ replaceAll: () => any;
15
+ prev: () => any;
16
+ next: () => any;
17
+ "update:query": (value: string) => any;
18
+ "update:replacement": (value: string) => any;
19
+ "update:options": (value: FindOptions) => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onClose?: (() => any) | undefined;
22
+ onReplace?: (() => any) | undefined;
23
+ onReplaceAll?: (() => any) | undefined;
24
+ onPrev?: (() => any) | undefined;
25
+ onNext?: (() => any) | undefined;
26
+ "onUpdate:query"?: ((value: string) => any) | undefined;
27
+ "onUpdate:replacement"?: ((value: string) => any) | undefined;
28
+ "onUpdate:options"?: ((value: FindOptions) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
@@ -0,0 +1,130 @@
1
+ <script setup>
2
+ import { ref, computed, watch, nextTick } from "vue";
3
+ const props = defineProps({
4
+ visible: { type: Boolean, required: true },
5
+ editable: { type: Boolean, required: true },
6
+ matchCount: { type: Number, required: true },
7
+ currentIndex: { type: Number, required: true },
8
+ query: { type: String, required: true },
9
+ replacement: { type: String, required: true },
10
+ options: { type: Object, required: true }
11
+ });
12
+ const emit = defineEmits(["update:query", "update:replacement", "update:options", "next", "prev", "replace", "replaceAll", "close"]);
13
+ const queryRef = ref();
14
+ function focusQuery() {
15
+ const root = queryRef.value?.$el;
16
+ const input = root instanceof HTMLInputElement ? root : root?.querySelector("input");
17
+ input?.focus();
18
+ }
19
+ watch(() => props.visible, (v) => {
20
+ if (v) nextTick(() => focusQuery());
21
+ });
22
+ function toggleOption(key) {
23
+ emit("update:options", { ...props.options, [key]: !props.options[key] });
24
+ }
25
+ function onQueryKeydown(e) {
26
+ if (e.key === "Enter") {
27
+ e.preventDefault();
28
+ if (e.shiftKey) emit("prev");
29
+ else emit("next");
30
+ } else if (e.key === "Escape") {
31
+ e.preventDefault();
32
+ emit("close");
33
+ }
34
+ }
35
+ const countLabel = computed(
36
+ () => props.matchCount === 0 ? "No matches" : `${props.currentIndex + 1} / ${props.matchCount}`
37
+ );
38
+ </script>
39
+
40
+ <template>
41
+ <div
42
+ v-if="visible"
43
+ class="absolute top-2 right-2 z-40 w-80 bg-(--ui-bg) border border-(--ui-border) rounded-lg shadow-lg p-2 space-y-1.5"
44
+ role="search"
45
+ >
46
+ <div class="flex items-center gap-1">
47
+ <UInput
48
+ ref="queryRef"
49
+ :model-value="query"
50
+ placeholder="Find in sheet…"
51
+ size="sm"
52
+ class="flex-1"
53
+ @update:model-value="emit('update:query', String($event))"
54
+ @keydown="onQueryKeydown"
55
+ />
56
+ <span class="text-xs text-(--ui-text-dimmed) tabular-nums w-16 text-center shrink-0">{{ countLabel }}</span>
57
+ <UButton
58
+ icon="i-lucide-chevron-up"
59
+ size="xs"
60
+ variant="ghost"
61
+ :disabled="matchCount === 0"
62
+ aria-label="Previous match"
63
+ @click="emit('prev')"
64
+ />
65
+ <UButton
66
+ icon="i-lucide-chevron-down"
67
+ size="xs"
68
+ variant="ghost"
69
+ :disabled="matchCount === 0"
70
+ aria-label="Next match"
71
+ @click="emit('next')"
72
+ />
73
+ <UButton
74
+ icon="i-lucide-x"
75
+ size="xs"
76
+ variant="ghost"
77
+ aria-label="Close"
78
+ @click="emit('close')"
79
+ />
80
+ </div>
81
+
82
+ <div
83
+ v-if="editable"
84
+ class="flex items-center gap-1"
85
+ >
86
+ <UInput
87
+ :model-value="replacement"
88
+ placeholder="Replace with…"
89
+ size="sm"
90
+ class="flex-1"
91
+ @update:model-value="emit('update:replacement', String($event))"
92
+ />
93
+ <UButton
94
+ size="xs"
95
+ variant="soft"
96
+ :disabled="matchCount === 0"
97
+ label="Replace"
98
+ @click="emit('replace')"
99
+ />
100
+ <UButton
101
+ size="xs"
102
+ variant="soft"
103
+ :disabled="matchCount === 0"
104
+ label="All"
105
+ @click="emit('replaceAll')"
106
+ />
107
+ </div>
108
+
109
+ <div class="flex items-center gap-1">
110
+ <UButton
111
+ size="xs"
112
+ :variant="options.matchCase ? 'soft' : 'ghost'"
113
+ label="Match case"
114
+ @click="toggleOption('matchCase')"
115
+ />
116
+ <UButton
117
+ size="xs"
118
+ :variant="options.wholeCell ? 'soft' : 'ghost'"
119
+ label="Whole cell"
120
+ @click="toggleOption('wholeCell')"
121
+ />
122
+ <UButton
123
+ size="xs"
124
+ :variant="options.includeFormulas ? 'soft' : 'ghost'"
125
+ label="Formulas"
126
+ @click="toggleOption('includeFormulas')"
127
+ />
128
+ </div>
129
+ </div>
130
+ </template>
@@ -0,0 +1,31 @@
1
+ import type { FindOptions } from '../../../composables/useSheetsFind.js';
2
+ type __VLS_Props = {
3
+ visible: boolean;
4
+ editable: boolean;
5
+ matchCount: number;
6
+ currentIndex: number;
7
+ query: string;
8
+ replacement: string;
9
+ options: FindOptions;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ close: () => any;
13
+ replace: () => any;
14
+ replaceAll: () => any;
15
+ prev: () => any;
16
+ next: () => any;
17
+ "update:query": (value: string) => any;
18
+ "update:replacement": (value: string) => any;
19
+ "update:options": (value: FindOptions) => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onClose?: (() => any) | undefined;
22
+ onReplace?: (() => any) | undefined;
23
+ onReplaceAll?: (() => any) | undefined;
24
+ onPrev?: (() => any) | undefined;
25
+ onNext?: (() => any) | undefined;
26
+ "onUpdate:query"?: ((value: string) => any) | undefined;
27
+ "onUpdate:replacement"?: ((value: string) => any) | undefined;
28
+ "onUpdate:options"?: ((value: FindOptions) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
@@ -528,7 +528,10 @@ defineExpose({ scrollToCell });
528
528
  </script>
529
529
 
530
530
  <template>
531
- <UContextMenu :items="contextMenuItems" @update:open="onContextMenuOpenChange">
531
+ <UContextMenu
532
+ :items="contextMenuItems"
533
+ @update:open="onContextMenuOpenChange"
534
+ >
532
535
  <div
533
536
  ref="scrollRef"
534
537
  class="flex-1 min-h-0 overflow-auto relative focus:outline-none"
@@ -562,7 +565,10 @@ defineExpose({ scrollToCell });
562
565
  />
563
566
 
564
567
  <!-- Column headers -->
565
- <template v-for="col in visibleColsReactive" :key="col.id">
568
+ <template
569
+ v-for="col in visibleColsReactive"
570
+ :key="col.id"
571
+ >
566
572
  <div
567
573
  class="absolute top-0 flex items-center justify-center text-xs font-medium text-(--ui-text-muted) select-none bg-(--ui-bg) group cursor-pointer"
568
574
  :class="showGridlines ? 'border-b border-r border-(--ui-border)' : ''"
@@ -585,7 +591,10 @@ defineExpose({ scrollToCell });
585
591
  @keydown.escape="renamingColId = null"
586
592
  @click.stop
587
593
  >
588
- <span v-else class="truncate px-1">{{ col.label }}</span>
594
+ <span
595
+ v-else
596
+ class="truncate px-1"
597
+ >{{ col.label }}</span>
589
598
 
590
599
  <!-- Resize handle (wider hit target on touch; visible marker on mobile) -->
591
600
  <div
@@ -610,7 +619,10 @@ defineExpose({ scrollToCell });
610
619
  class="sticky left-0 z-10"
611
620
  :style="{ width: `${ROW_HEADER_WIDTH}px`, height: 0 }"
612
621
  >
613
- <template v-for="vRow in virtualRows" :key="vRow.index">
622
+ <template
623
+ v-for="vRow in virtualRows"
624
+ :key="vRow.index"
625
+ >
614
626
  <div
615
627
  class="absolute flex items-center justify-center text-xs text-(--ui-text-dimmed) select-none bg-(--ui-bg) cursor-pointer"
616
628
  :class="showGridlines ? 'border-b border-r border-(--ui-border)' : ''"
@@ -635,8 +647,14 @@ defineExpose({ scrollToCell });
635
647
  left: `${ROW_HEADER_WIDTH}px`
636
648
  }"
637
649
  >
638
- <template v-for="vRow in virtualRows" :key="vRow.index">
639
- <template v-for="col in visibleColsReactive" :key="`${vRow.index}:${col.id}`">
650
+ <template
651
+ v-for="vRow in virtualRows"
652
+ :key="vRow.index"
653
+ >
654
+ <template
655
+ v-for="col in visibleColsReactive"
656
+ :key="`${vRow.index}:${col.id}`"
657
+ >
640
658
  <ASheetsCell
641
659
  :col-idx="col.idx"
642
660
  :row-idx="vRow.index"
@@ -646,6 +664,7 @@ defineExpose({ scrollToCell });
646
664
  :height="vRow.size"
647
665
  :value="getCellValue(col.idx, vRow.index)"
648
666
  :entry="getCellEntry(col.idx, vRow.index)"
667
+ :column-meta="dataColumns[col.idx]?.meta"
649
668
  :is-active="activeCell?.colIdx === col.idx && activeCell?.rowIdx === vRow.index"
650
669
  :is-selected="cellInSelection(col.idx, vRow.index)"
651
670
  :is-cut="isInCutRange(col.idx, vRow.index)"
@@ -30,6 +30,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
30
30
  setBgColor: (color: string | undefined) => any;
31
31
  setAlign: (align: string) => any;
32
32
  setNumberFormat: (format: string | undefined) => any;
33
+ openFind: () => any;
34
+ openConditional: () => any;
35
+ openValidation: () => any;
33
36
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
34
37
  onToggleBold?: (() => any) | undefined;
35
38
  onToggleItalic?: (() => any) | undefined;
@@ -43,6 +46,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
43
46
  onSetBgColor?: ((color: string | undefined) => any) | undefined;
44
47
  onSetAlign?: ((align: string) => any) | undefined;
45
48
  onSetNumberFormat?: ((format: string | undefined) => any) | undefined;
49
+ onOpenFind?: (() => any) | undefined;
50
+ onOpenConditional?: (() => any) | undefined;
51
+ onOpenValidation?: (() => any) | undefined;
46
52
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
53
  declare const _default: typeof __VLS_export;
48
54
  export default _default;
@@ -19,7 +19,7 @@ const props = defineProps({
19
19
  selectionNumberFormat: { type: null, required: true },
20
20
  labels: { type: Object, required: false }
21
21
  });
22
- const emit = defineEmits(["addColumn", "addRow", "update:editValue", "commitFormulaBar", "cancelFormulaBar", "startEditFromBar", "toggleBold", "toggleItalic", "setTextColor", "setBgColor", "setAlign", "setNumberFormat"]);
22
+ const emit = defineEmits(["addColumn", "addRow", "update:editValue", "commitFormulaBar", "cancelFormulaBar", "startEditFromBar", "toggleBold", "toggleItalic", "setTextColor", "setBgColor", "setAlign", "setNumberFormat", "openFind", "openConditional", "openValidation"]);
23
23
  const config = useRuntimeConfig();
24
24
  const locale = computed(() => ({
25
25
  ...DEFAULT_LOCALE.renderers.sheets,
@@ -147,7 +147,10 @@ const numberFormatLabel = computed(() => {
147
147
  class="size-5 rounded-sm border border-(--ui-border) hover:scale-110 transition-transform flex items-center justify-center text-xs"
148
148
  @click="emit('setTextColor', void 0)"
149
149
  >
150
- <UIcon name="i-lucide-x" class="size-3" />
150
+ <UIcon
151
+ name="i-lucide-x"
152
+ class="size-3"
153
+ />
151
154
  </button>
152
155
  </div>
153
156
  </template>
@@ -174,7 +177,10 @@ const numberFormatLabel = computed(() => {
174
177
  class="size-5 rounded-sm border border-(--ui-border) hover:scale-110 transition-transform flex items-center justify-center text-xs"
175
178
  @click="emit('setBgColor', void 0)"
176
179
  >
177
- <UIcon name="i-lucide-x" class="size-3" />
180
+ <UIcon
181
+ name="i-lucide-x"
182
+ class="size-3"
183
+ />
178
184
  </button>
179
185
  </div>
180
186
  </template>
@@ -217,6 +223,36 @@ const numberFormatLabel = computed(() => {
217
223
  </div>
218
224
  </template>
219
225
 
226
+ <!-- Find -->
227
+ <UTooltip text="Find & replace (⌘F)">
228
+ <UButton
229
+ icon="i-lucide-search"
230
+ size="xs"
231
+ variant="ghost"
232
+ @click="emit('openFind')"
233
+ />
234
+ </UTooltip>
235
+
236
+ <!-- Conditional formatting + data validation -->
237
+ <template v-if="editable">
238
+ <UTooltip text="Conditional formatting">
239
+ <UButton
240
+ icon="i-lucide-palette"
241
+ size="xs"
242
+ variant="ghost"
243
+ @click="emit('openConditional')"
244
+ />
245
+ </UTooltip>
246
+ <UTooltip text="Data validation">
247
+ <UButton
248
+ icon="i-lucide-list-checks"
249
+ size="xs"
250
+ variant="ghost"
251
+ @click="emit('openValidation')"
252
+ />
253
+ </UTooltip>
254
+ </template>
255
+
220
256
  <!-- Counts -->
221
257
  <span class="text-xs text-(--ui-text-dimmed) tabular-nums shrink-0">
222
258
  {{ locale.colCount(colCount) }} · {{ locale.rowCount(rowCount) }}
@@ -30,6 +30,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
30
30
  setBgColor: (color: string | undefined) => any;
31
31
  setAlign: (align: string) => any;
32
32
  setNumberFormat: (format: string | undefined) => any;
33
+ openFind: () => any;
34
+ openConditional: () => any;
35
+ openValidation: () => any;
33
36
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
34
37
  onToggleBold?: (() => any) | undefined;
35
38
  onToggleItalic?: (() => any) | undefined;
@@ -43,6 +46,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
43
46
  onSetBgColor?: ((color: string | undefined) => any) | undefined;
44
47
  onSetAlign?: ((align: string) => any) | undefined;
45
48
  onSetNumberFormat?: ((format: string | undefined) => any) | undefined;
49
+ onOpenFind?: (() => any) | undefined;
50
+ onOpenConditional?: (() => any) | undefined;
51
+ onOpenValidation?: (() => any) | undefined;
46
52
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
53
  declare const _default: typeof __VLS_export;
48
54
  export default _default;
@@ -0,0 +1,15 @@
1
+ import type { SheetsValidation } from '../../../types.js';
2
+ type __VLS_Props = {
3
+ open: boolean;
4
+ columnLabel: string;
5
+ spec: SheetsValidation | undefined;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ "update:open": (value: boolean) => any;
9
+ save: (spec: SheetsValidation | undefined) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
12
+ onSave?: ((spec: SheetsValidation | undefined) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;