rei-kit 0.12.1 → 0.14.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.
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The card that offers to install the app, and remembers being turned down.
3
+ *
4
+ * Both phone apps had this, 111 lines, differing in a storage key and a colour.
5
+ * What is here is the part that was the same: the three-way platform check, the
6
+ * week-long snooze, and the shape.
7
+ *
8
+ * Every string is a prop. The kit does not know a language, and "Add to Home
9
+ * Screen" is a sentence about a platform, not about this component.
10
+ */
11
+ type __VLS_Props = {
12
+ /** Where the dismissal is remembered. Namespace it: `hibi-install-nudge`. */
13
+ storageKey: string;
14
+ title: string;
15
+ body: string;
16
+ /** The install button. Not shown on iOS, which has no API to call. */
17
+ action: string;
18
+ later: string;
19
+ /** Shown instead of `title` where the user has to use the Share menu. */
20
+ iosTitle?: string | undefined;
21
+ iosBody?: string | undefined;
22
+ snoozeDays?: number | undefined;
23
+ };
24
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The way back to installing after the card has been dismissed.
3
+ *
4
+ * The card snoozes for a week; without this row, someone who tapped "Not now"
5
+ * and then changed their mind would have nowhere to go. Both phone apps had it,
6
+ * thirty-four lines, with no difference at all.
7
+ *
8
+ * It renders nothing where installing is neither possible nor already done — a
9
+ * settings group that says "you cannot install this" is worse than silence.
10
+ */
11
+ type __VLS_Props = {
12
+ /** The group's heading. */
13
+ title: string;
14
+ /** The row's label while installing is still possible. */
15
+ label: string;
16
+ /** The row's label once it is installed. */
17
+ installedLabel: string;
18
+ body: string;
19
+ /** Shown instead of `body` on iOS, where the user must use the Share menu. */
20
+ iosBody: string;
21
+ /** The install button. Absent on iOS, which has no API to call. */
22
+ action: string;
23
+ };
24
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The card that says a new version is waiting.
3
+ *
4
+ * `registerType: 'prompt'` means a new service worker waits rather than taking
5
+ * over, and this is what asks whether to apply it. Asking rather than reloading
6
+ * is the decision worth keeping: an automatic swap mid-sentence loses whatever
7
+ * was being typed.
8
+ *
9
+ * **The service worker stays the app's.** `virtual:pwa-register/vue` is a
10
+ * build-time module from `vite-plugin-pwa`, and a library cannot import one —
11
+ * so the app owns `useRegisterSW` and hands the answer down as `open`. That
12
+ * split is also honest: whether an update is waiting is the app's business,
13
+ * and what the card looks like is this component's.
14
+ *
15
+ * @example
16
+ * ```vue
17
+ * <script setup>
18
+ * const { needRefresh, updateServiceWorker } = useRegisterSW()
19
+ * <\/script>
20
+ *
21
+ * <UpdatePrompt
22
+ * :open="needRefresh"
23
+ * :title="t('pwa.updateTitle')"
24
+ * :body="t('pwa.updateBody')"
25
+ * :action="t('pwa.reload')"
26
+ * :dismiss-label="t('pwa.later')"
27
+ * @update="updateServiceWorker(true)"
28
+ * @dismiss="needRefresh = false"
29
+ * />
30
+ * ```
31
+ */
32
+ type __VLS_Props = {
33
+ open: boolean;
34
+ title: string;
35
+ body: string;
36
+ action: string;
37
+ /** The X's accessible name. An X on its own has none. */
38
+ dismissLabel: string;
39
+ };
40
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
41
+ dismiss: () => any;
42
+ update: () => any;
43
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
44
+ onDismiss?: () => any;
45
+ onUpdate?: () => any;
46
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * rei-kit/pwa — installing the app, and updating it.
3
+ *
4
+ * A separate entry because these reach for `beforeinstallprompt` and a service
5
+ * worker: an app that is a website should not download them, and the main
6
+ * barrel has to stay importable on a server.
7
+ *
8
+ * Both phone apps had all of this, 95–100% identical — the same three-way
9
+ * platform check, the same week-long snooze, the same two cards. What differed
10
+ * was a storage key and a colour.
11
+ */
12
+ export { useInstall, watchInstallability } from './use-install';
13
+ export { useSnooze } from './use-snooze';
14
+ export { default as InstallPrompt } from './InstallPrompt.vue';
15
+ export { default as InstallSettings } from './InstallSettings.vue';
16
+ export { default as UpdatePrompt } from './UpdatePrompt.vue';
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Starts listening for the install event.
3
+ *
4
+ * **Call this from the app's entry file, not from a component.**
5
+ * `beforeinstallprompt` fires once, early, and only once per page load — a
6
+ * listener attached when a component mounts has usually already missed it.
7
+ *
8
+ * It is a function rather than module-scope side effects so the package can be
9
+ * imported on a server: the phone apps this came from ran it at module scope
10
+ * and the kit spent a release learning why that is not free.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * // main.ts
15
+ * import { watchInstallability } from 'rei-kit/pwa'
16
+ * watchInstallability()
17
+ * ```
18
+ */
19
+ export declare function watchInstallability(): void;
20
+ /**
21
+ * Adding the app to the Home Screen.
22
+ *
23
+ * Three states, because the platforms genuinely differ: Chromium hands over an
24
+ * event that can be triggered from a button, Safari on iOS has no API at all
25
+ * and needs the user walked through Share → Add to Home Screen, and everything
26
+ * else can only be told that installing is possible.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const install = useInstall()
31
+ * if (install.canPrompt.value) await install.prompt()
32
+ * ```
33
+ */
34
+ export declare function useInstall(): {
35
+ isInstalled: import('vue').ComputedRef<boolean>;
36
+ /** A button can open the real install sheet. */
37
+ canPrompt: import('vue').ComputedRef<boolean>;
38
+ /** No API — the user has to be shown the Share menu. */
39
+ needsManualSteps: import('vue').ComputedRef<boolean>;
40
+ prompt: () => Promise<boolean>;
41
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * A nudge that stops asking for a while after it is dismissed.
3
+ *
4
+ * Both phone apps had this inside their install card, identically: a date in
5
+ * `localStorage`, compared against today. Pulled out because the install card
6
+ * is not the only thing that should stop asking — a notification nudge wants
7
+ * exactly the same behaviour, and had exactly the same code.
8
+ *
9
+ * Storage is wrapped in try/catch on both sides. A private window or a browser
10
+ * set to block site data throws on access, and the honest failure there is a
11
+ * nudge that reappears next session rather than one that crashes the screen it
12
+ * is asking from.
13
+ *
14
+ * @param key - Where the date is kept. Namespace it to the app.
15
+ * @param days - How long to stay quiet after a dismissal.
16
+ */
17
+ export declare function useSnooze(key: string, days?: number): {
18
+ /** False while the nudge is snoozed. */
19
+ isOver: import('vue').ComputedRef<boolean>;
20
+ /** Stop asking for `days`. */
21
+ snooze(): void;
22
+ };
package/dist/pwa.js ADDED
@@ -0,0 +1,283 @@
1
+ import { a as addDays, f as todayKey, i as needsIosInstall, r as isInstalled, t as SettingsGroup_default } from "./SettingsGroup-DtEB_Hrd.js";
2
+ import { n as _plugin_vue_export_helper_default, r as BaseButton_default, t as SettingsRow_default } from "./SettingsRow-MnVleeTR.js";
3
+ import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
4
+ import { CheckCircle2, Download, RefreshCw, Share, X } from "lucide-vue-next";
5
+ //#region src/pwa/use-install.ts
6
+ var deferred = ref(null);
7
+ var installed = ref(false);
8
+ var listening = false;
9
+ /**
10
+ * Starts listening for the install event.
11
+ *
12
+ * **Call this from the app's entry file, not from a component.**
13
+ * `beforeinstallprompt` fires once, early, and only once per page load — a
14
+ * listener attached when a component mounts has usually already missed it.
15
+ *
16
+ * It is a function rather than module-scope side effects so the package can be
17
+ * imported on a server: the phone apps this came from ran it at module scope
18
+ * and the kit spent a release learning why that is not free.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * // main.ts
23
+ * import { watchInstallability } from 'rei-kit/pwa'
24
+ * watchInstallability()
25
+ * ```
26
+ */
27
+ function watchInstallability() {
28
+ if (listening || typeof window === "undefined") return;
29
+ listening = true;
30
+ installed.value = isInstalled();
31
+ window.addEventListener("beforeinstallprompt", (event) => {
32
+ event.preventDefault();
33
+ deferred.value = event;
34
+ });
35
+ window.addEventListener("appinstalled", () => {
36
+ installed.value = true;
37
+ deferred.value = null;
38
+ });
39
+ }
40
+ /**
41
+ * Adding the app to the Home Screen.
42
+ *
43
+ * Three states, because the platforms genuinely differ: Chromium hands over an
44
+ * event that can be triggered from a button, Safari on iOS has no API at all
45
+ * and needs the user walked through Share → Add to Home Screen, and everything
46
+ * else can only be told that installing is possible.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const install = useInstall()
51
+ * if (install.canPrompt.value) await install.prompt()
52
+ * ```
53
+ */
54
+ function useInstall() {
55
+ async function prompt() {
56
+ const event = deferred.value;
57
+ if (!event) return false;
58
+ await event.prompt();
59
+ const { outcome } = await event.userChoice;
60
+ deferred.value = null;
61
+ return outcome === "accepted";
62
+ }
63
+ return {
64
+ isInstalled: computed(() => installed.value),
65
+ /** A button can open the real install sheet. */
66
+ canPrompt: computed(() => !installed.value && deferred.value !== null),
67
+ /** No API — the user has to be shown the Share menu. */
68
+ needsManualSteps: computed(() => !installed.value && needsIosInstall()),
69
+ prompt
70
+ };
71
+ }
72
+ //#endregion
73
+ //#region src/pwa/use-snooze.ts
74
+ /**
75
+ * A nudge that stops asking for a while after it is dismissed.
76
+ *
77
+ * Both phone apps had this inside their install card, identically: a date in
78
+ * `localStorage`, compared against today. Pulled out because the install card
79
+ * is not the only thing that should stop asking — a notification nudge wants
80
+ * exactly the same behaviour, and had exactly the same code.
81
+ *
82
+ * Storage is wrapped in try/catch on both sides. A private window or a browser
83
+ * set to block site data throws on access, and the honest failure there is a
84
+ * nudge that reappears next session rather than one that crashes the screen it
85
+ * is asking from.
86
+ *
87
+ * @param key - Where the date is kept. Namespace it to the app.
88
+ * @param days - How long to stay quiet after a dismissal.
89
+ */
90
+ function useSnooze(key, days = 7) {
91
+ const read = () => {
92
+ try {
93
+ return localStorage.getItem(key) ?? "";
94
+ } catch {
95
+ return "";
96
+ }
97
+ };
98
+ const until = ref(read());
99
+ return {
100
+ /** False while the nudge is snoozed. */
101
+ isOver: computed(() => todayKey() >= until.value),
102
+ /** Stop asking for `days`. */
103
+ snooze() {
104
+ const next = addDays(todayKey(), days);
105
+ until.value = next;
106
+ try {
107
+ localStorage.setItem(key, next);
108
+ } catch {}
109
+ }
110
+ };
111
+ }
112
+ //#endregion
113
+ //#region src/pwa/InstallPrompt.vue?vue&type=script&setup=true&lang.ts
114
+ var _hoisted_1$1 = {
115
+ key: 0,
116
+ class: "border-positive/25 bg-positive/5 rounded-card flex gap-3 border p-3.5"
117
+ };
118
+ var _hoisted_2$1 = {
119
+ class: "bg-positive/15 text-positive flex size-10 shrink-0 items-center justify-center rounded-xl",
120
+ "aria-hidden": "true"
121
+ };
122
+ var _hoisted_3$1 = { class: "flex min-w-0 flex-1 flex-col gap-2" };
123
+ var _hoisted_4$1 = { class: "text-ink text-sm font-semibold" };
124
+ var _hoisted_5$1 = { class: "text-ink-soft mt-0.5 text-xs leading-relaxed" };
125
+ var _hoisted_6 = { class: "flex items-center gap-2" };
126
+ //#endregion
127
+ //#region src/pwa/InstallPrompt.vue
128
+ var InstallPrompt_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
129
+ __name: "InstallPrompt",
130
+ props: {
131
+ storageKey: {},
132
+ title: {},
133
+ body: {},
134
+ action: {},
135
+ later: {},
136
+ iosTitle: { default: "" },
137
+ iosBody: { default: "" },
138
+ snoozeDays: { default: 7 }
139
+ },
140
+ setup(__props) {
141
+ const { canPrompt, needsManualSteps, prompt } = useInstall();
142
+ const { isOver, snooze } = useSnooze(__props.storageKey, __props.snoozeDays);
143
+ const visible = computed(() => (canPrompt.value || needsManualSteps.value) && isOver.value);
144
+ async function install() {
145
+ await prompt();
146
+ snooze();
147
+ }
148
+ return (_ctx, _cache) => {
149
+ return openBlock(), createBlock(Transition, { name: "install" }, {
150
+ default: withCtx(() => [visible.value ? (openBlock(), createElementBlock("section", _hoisted_1$1, [createElementVNode("span", _hoisted_2$1, [(openBlock(), createBlock(resolveDynamicComponent(unref(needsManualSteps) ? unref(Share) : unref(Download)), { class: "size-5" }))]), createElementVNode("div", _hoisted_3$1, [createElementVNode("div", null, [createElementVNode("p", _hoisted_4$1, toDisplayString(unref(needsManualSteps) && __props.iosTitle ? __props.iosTitle : __props.title), 1), createElementVNode("p", _hoisted_5$1, toDisplayString(unref(needsManualSteps) && __props.iosBody ? __props.iosBody : __props.body), 1)]), createElementVNode("div", _hoisted_6, [unref(canPrompt) ? (openBlock(), createBlock(BaseButton_default, {
151
+ key: 0,
152
+ variant: "positive",
153
+ pill: "",
154
+ size: "xs",
155
+ class: "font-semibold",
156
+ onClick: install
157
+ }, {
158
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.action), 1)]),
159
+ _: 1
160
+ })) : createCommentVNode("", true), createVNode(BaseButton_default, {
161
+ pill: "",
162
+ size: "xs",
163
+ variant: "quiet",
164
+ onClick: unref(snooze)
165
+ }, {
166
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.later), 1)]),
167
+ _: 1
168
+ }, 8, ["onClick"])])])])) : createCommentVNode("", true)]),
169
+ _: 1
170
+ });
171
+ };
172
+ }
173
+ }), [["__scopeId", "data-v-34c86300"]]);
174
+ //#endregion
175
+ //#region src/pwa/InstallSettings.vue
176
+ var InstallSettings_default = /* @__PURE__ */ defineComponent({
177
+ __name: "InstallSettings",
178
+ props: {
179
+ title: {},
180
+ label: {},
181
+ installedLabel: {},
182
+ body: {},
183
+ iosBody: {},
184
+ action: {}
185
+ },
186
+ setup(__props) {
187
+ const { isInstalled, canPrompt, needsManualSteps, prompt } = useInstall();
188
+ return (_ctx, _cache) => {
189
+ return unref(isInstalled) || unref(canPrompt) || unref(needsManualSteps) ? (openBlock(), createBlock(SettingsGroup_default, {
190
+ key: 0,
191
+ title: __props.title
192
+ }, {
193
+ default: withCtx(() => [createVNode(SettingsRow_default, {
194
+ label: unref(isInstalled) ? __props.installedLabel : __props.label,
195
+ description: unref(isInstalled) ? "" : unref(needsManualSteps) ? __props.iosBody : __props.body,
196
+ icon: unref(isInstalled) ? unref(CheckCircle2) : unref(needsManualSteps) ? unref(Share) : unref(Download),
197
+ stacked: ""
198
+ }, {
199
+ default: withCtx(() => [unref(canPrompt) ? (openBlock(), createBlock(BaseButton_default, {
200
+ key: 0,
201
+ variant: "primary",
202
+ size: "sm",
203
+ class: "self-start",
204
+ onClick: unref(prompt)
205
+ }, {
206
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.action), 1)]),
207
+ _: 1
208
+ }, 8, ["onClick"])) : createCommentVNode("", true)]),
209
+ _: 1
210
+ }, 8, [
211
+ "label",
212
+ "description",
213
+ "icon"
214
+ ])]),
215
+ _: 1
216
+ }, 8, ["title"])) : createCommentVNode("", true);
217
+ };
218
+ }
219
+ });
220
+ //#endregion
221
+ //#region src/pwa/UpdatePrompt.vue?vue&type=script&setup=true&lang.ts
222
+ var _hoisted_1 = {
223
+ key: 0,
224
+ class: "update-card",
225
+ role: "status"
226
+ };
227
+ var _hoisted_2 = {
228
+ class: "update-icon",
229
+ "aria-hidden": "true"
230
+ };
231
+ var _hoisted_3 = { class: "min-w-0 flex-1" };
232
+ var _hoisted_4 = { class: "text-ink text-sm font-semibold" };
233
+ var _hoisted_5 = { class: "text-ink-soft text-xs leading-snug" };
234
+ //#endregion
235
+ //#region src/pwa/UpdatePrompt.vue
236
+ var UpdatePrompt_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
237
+ __name: "UpdatePrompt",
238
+ props: {
239
+ open: { type: Boolean },
240
+ title: {},
241
+ body: {},
242
+ action: {},
243
+ dismissLabel: {}
244
+ },
245
+ emits: ["update", "dismiss"],
246
+ setup(__props) {
247
+ return (_ctx, _cache) => {
248
+ return openBlock(), createBlock(Transition, { name: "update" }, {
249
+ default: withCtx(() => [__props.open ? (openBlock(), createElementBlock("aside", _hoisted_1, [
250
+ createElementVNode("span", _hoisted_2, [createVNode(unref(RefreshCw), { class: "size-4" })]),
251
+ createElementVNode("div", _hoisted_3, [createElementVNode("p", _hoisted_4, toDisplayString(__props.title), 1), createElementVNode("p", _hoisted_5, toDisplayString(__props.body), 1)]),
252
+ createVNode(BaseButton_default, {
253
+ variant: "primary",
254
+ pill: "",
255
+ size: "xs",
256
+ class: "shrink-0 font-semibold",
257
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update"))
258
+ }, {
259
+ default: withCtx(() => [createTextVNode(toDisplayString(__props.action), 1)]),
260
+ _: 1
261
+ }),
262
+ createVNode(BaseButton_default, {
263
+ variant: "quiet",
264
+ icon: "",
265
+ pill: "",
266
+ size: "sm",
267
+ class: "shrink-0",
268
+ "aria-label": __props.dismissLabel,
269
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("dismiss"))
270
+ }, {
271
+ default: withCtx(() => [createVNode(unref(X), { class: "size-4" })]),
272
+ _: 1
273
+ }, 8, ["aria-label"])
274
+ ])) : createCommentVNode("", true)]),
275
+ _: 1
276
+ });
277
+ };
278
+ }
279
+ }), [["__scopeId", "data-v-7cf60526"]]);
280
+ //#endregion
281
+ export { InstallPrompt_default as InstallPrompt, InstallSettings_default as InstallSettings, UpdatePrompt_default as UpdatePrompt, useInstall, useSnooze, watchInstallability };
282
+
283
+ //# sourceMappingURL=pwa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pwa.js","names":["$emit"],"sources":["../src/pwa/use-install.ts","../src/pwa/use-snooze.ts","../src/pwa/InstallPrompt.vue","../src/pwa/InstallPrompt.vue","../src/pwa/InstallSettings.vue","../src/pwa/InstallSettings.vue","../src/pwa/UpdatePrompt.vue","../src/pwa/UpdatePrompt.vue"],"sourcesContent":["import { computed, ref } from 'vue'\n\nimport { isInstalled, needsIosInstall } from '../utils/platform'\n\n/**\n * The event Chromium fires when it decides the app is installable.\n *\n * Not in lib.dom yet, and it is the only way to trigger the install sheet from\n * the app's own button rather than the browser's.\n */\ninterface BeforeInstallPromptEvent extends Event {\n prompt: () => Promise<void>\n userChoice: Promise<{ outcome: 'accepted' | 'dismissed' }>\n}\n\nconst deferred = ref<BeforeInstallPromptEvent | null>(null)\nconst installed = ref(false)\n\nlet listening = false\n\n/**\n * Starts listening for the install event.\n *\n * **Call this from the app's entry file, not from a component.**\n * `beforeinstallprompt` fires once, early, and only once per page load — a\n * listener attached when a component mounts has usually already missed it.\n *\n * It is a function rather than module-scope side effects so the package can be\n * imported on a server: the phone apps this came from ran it at module scope\n * and the kit spent a release learning why that is not free.\n *\n * @example\n * ```ts\n * // main.ts\n * import { watchInstallability } from 'rei-kit/pwa'\n * watchInstallability()\n * ```\n */\nexport function watchInstallability(): void {\n if (listening || typeof window === 'undefined') return\n\n listening = true\n installed.value = isInstalled()\n\n window.addEventListener('beforeinstallprompt', (event) => {\n // Without this the browser shows its own bar, and then the app's card and\n // the browser's bar are both on screen saying the same thing.\n event.preventDefault()\n deferred.value = event as BeforeInstallPromptEvent\n })\n\n window.addEventListener('appinstalled', () => {\n installed.value = true\n deferred.value = null\n })\n}\n\n/**\n * Adding the app to the Home Screen.\n *\n * Three states, because the platforms genuinely differ: Chromium hands over an\n * event that can be triggered from a button, Safari on iOS has no API at all\n * and needs the user walked through Share → Add to Home Screen, and everything\n * else can only be told that installing is possible.\n *\n * @example\n * ```ts\n * const install = useInstall()\n * if (install.canPrompt.value) await install.prompt()\n * ```\n */\nexport function useInstall() {\n async function prompt(): Promise<boolean> {\n const event = deferred.value\n if (!event) return false\n\n await event.prompt()\n const { outcome } = await event.userChoice\n\n // The event is single-use: Chromium refuses a second prompt() on it.\n deferred.value = null\n\n return outcome === 'accepted'\n }\n\n return {\n isInstalled: computed(() => installed.value),\n /** A button can open the real install sheet. */\n canPrompt: computed(() => !installed.value && deferred.value !== null),\n /** No API — the user has to be shown the Share menu. */\n needsManualSteps: computed(() => !installed.value && needsIosInstall()),\n prompt,\n }\n}\n","import { computed, ref } from 'vue'\n\nimport { addDays, todayKey } from '../utils/date'\n\n/**\n * A nudge that stops asking for a while after it is dismissed.\n *\n * Both phone apps had this inside their install card, identically: a date in\n * `localStorage`, compared against today. Pulled out because the install card\n * is not the only thing that should stop asking — a notification nudge wants\n * exactly the same behaviour, and had exactly the same code.\n *\n * Storage is wrapped in try/catch on both sides. A private window or a browser\n * set to block site data throws on access, and the honest failure there is a\n * nudge that reappears next session rather than one that crashes the screen it\n * is asking from.\n *\n * @param key - Where the date is kept. Namespace it to the app.\n * @param days - How long to stay quiet after a dismissal.\n */\nexport function useSnooze(key: string, days = 7) {\n const read = (): string => {\n try {\n return localStorage.getItem(key) ?? ''\n } catch {\n return ''\n }\n }\n\n const until = ref(read())\n\n return {\n /** False while the nudge is snoozed. */\n isOver: computed(() => todayKey() >= until.value),\n\n /** Stop asking for `days`. */\n snooze(): void {\n const next = addDays(todayKey(), days)\n until.value = next\n\n try {\n localStorage.setItem(key, next)\n } catch {\n // Storage blocked; it reappears next session rather than never.\n }\n },\n }\n}\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Download, Share } from 'lucide-vue-next'\n\nimport BaseButton from '../components/BaseButton.vue'\nimport { useInstall } from './use-install'\nimport { useSnooze } from './use-snooze'\n\n/**\n * The card that offers to install the app, and remembers being turned down.\n *\n * Both phone apps had this, 111 lines, differing in a storage key and a colour.\n * What is here is the part that was the same: the three-way platform check, the\n * week-long snooze, and the shape.\n *\n * Every string is a prop. The kit does not know a language, and \"Add to Home\n * Screen\" is a sentence about a platform, not about this component.\n */\nconst {\n storageKey,\n title,\n body,\n action,\n later,\n iosTitle = '',\n iosBody = '',\n snoozeDays = 7,\n} = defineProps<{\n /** Where the dismissal is remembered. Namespace it: `hibi-install-nudge`. */\n storageKey: string\n title: string\n body: string\n /** The install button. Not shown on iOS, which has no API to call. */\n action: string\n later: string\n /** Shown instead of `title` where the user has to use the Share menu. */\n iosTitle?: string | undefined\n iosBody?: string | undefined\n snoozeDays?: number | undefined\n}>()\n\nconst { canPrompt, needsManualSteps, prompt } = useInstall()\nconst { isOver, snooze } = useSnooze(storageKey, snoozeDays)\n\nconst visible = computed(() => (canPrompt.value || needsManualSteps.value) && isOver.value)\n\nasync function install() {\n await prompt()\n\n // Accepted or dismissed, stop asking for a week. The prompt is what gets\n // tiring, not the answer.\n snooze()\n}\n</script>\n\n<template>\n <Transition name=\"install\">\n <section\n v-if=\"visible\"\n class=\"border-positive/25 bg-positive/5 rounded-card flex gap-3 border p-3.5\"\n >\n <span\n class=\"bg-positive/15 text-positive flex size-10 shrink-0 items-center justify-center rounded-xl\"\n aria-hidden=\"true\"\n >\n <component :is=\"needsManualSteps ? Share : Download\" class=\"size-5\" />\n </span>\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-2\">\n <div>\n <p class=\"text-ink text-sm font-semibold\">\n {{ needsManualSteps && iosTitle ? iosTitle : title }}\n </p>\n <p class=\"text-ink-soft mt-0.5 text-xs leading-relaxed\">\n {{ needsManualSteps && iosBody ? iosBody : body }}\n </p>\n </div>\n\n <div class=\"flex items-center gap-2\">\n <!-- No button on iOS: Safari exposes no way to open the Share sheet\n from script, so a button here could only fail. -->\n <BaseButton\n v-if=\"canPrompt\"\n variant=\"positive\"\n pill\n size=\"xs\"\n class=\"font-semibold\"\n @click=\"install\"\n >\n {{ action }}\n </BaseButton>\n\n <BaseButton pill size=\"xs\" variant=\"quiet\" @click=\"snooze\">{{ later }}</BaseButton>\n </div>\n </div>\n </section>\n </Transition>\n</template>\n\n<style scoped>\n.install-enter-active,\n.install-leave-active {\n transition:\n opacity 200ms ease,\n transform 200ms ease;\n}\n\n.install-enter-from,\n.install-leave-to {\n opacity: 0;\n transform: translateY(-4px);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .install-enter-from,\n .install-leave-to {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Download, Share } from 'lucide-vue-next'\n\nimport BaseButton from '../components/BaseButton.vue'\nimport { useInstall } from './use-install'\nimport { useSnooze } from './use-snooze'\n\n/**\n * The card that offers to install the app, and remembers being turned down.\n *\n * Both phone apps had this, 111 lines, differing in a storage key and a colour.\n * What is here is the part that was the same: the three-way platform check, the\n * week-long snooze, and the shape.\n *\n * Every string is a prop. The kit does not know a language, and \"Add to Home\n * Screen\" is a sentence about a platform, not about this component.\n */\nconst {\n storageKey,\n title,\n body,\n action,\n later,\n iosTitle = '',\n iosBody = '',\n snoozeDays = 7,\n} = defineProps<{\n /** Where the dismissal is remembered. Namespace it: `hibi-install-nudge`. */\n storageKey: string\n title: string\n body: string\n /** The install button. Not shown on iOS, which has no API to call. */\n action: string\n later: string\n /** Shown instead of `title` where the user has to use the Share menu. */\n iosTitle?: string | undefined\n iosBody?: string | undefined\n snoozeDays?: number | undefined\n}>()\n\nconst { canPrompt, needsManualSteps, prompt } = useInstall()\nconst { isOver, snooze } = useSnooze(storageKey, snoozeDays)\n\nconst visible = computed(() => (canPrompt.value || needsManualSteps.value) && isOver.value)\n\nasync function install() {\n await prompt()\n\n // Accepted or dismissed, stop asking for a week. The prompt is what gets\n // tiring, not the answer.\n snooze()\n}\n</script>\n\n<template>\n <Transition name=\"install\">\n <section\n v-if=\"visible\"\n class=\"border-positive/25 bg-positive/5 rounded-card flex gap-3 border p-3.5\"\n >\n <span\n class=\"bg-positive/15 text-positive flex size-10 shrink-0 items-center justify-center rounded-xl\"\n aria-hidden=\"true\"\n >\n <component :is=\"needsManualSteps ? Share : Download\" class=\"size-5\" />\n </span>\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-2\">\n <div>\n <p class=\"text-ink text-sm font-semibold\">\n {{ needsManualSteps && iosTitle ? iosTitle : title }}\n </p>\n <p class=\"text-ink-soft mt-0.5 text-xs leading-relaxed\">\n {{ needsManualSteps && iosBody ? iosBody : body }}\n </p>\n </div>\n\n <div class=\"flex items-center gap-2\">\n <!-- No button on iOS: Safari exposes no way to open the Share sheet\n from script, so a button here could only fail. -->\n <BaseButton\n v-if=\"canPrompt\"\n variant=\"positive\"\n pill\n size=\"xs\"\n class=\"font-semibold\"\n @click=\"install\"\n >\n {{ action }}\n </BaseButton>\n\n <BaseButton pill size=\"xs\" variant=\"quiet\" @click=\"snooze\">{{ later }}</BaseButton>\n </div>\n </div>\n </section>\n </Transition>\n</template>\n\n<style scoped>\n.install-enter-active,\n.install-leave-active {\n transition:\n opacity 200ms ease,\n transform 200ms ease;\n}\n\n.install-enter-from,\n.install-leave-to {\n opacity: 0;\n transform: translateY(-4px);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .install-enter-from,\n .install-leave-to {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { CheckCircle2, Download, Share } from 'lucide-vue-next'\n\nimport BaseButton from '../components/BaseButton.vue'\nimport SettingsGroup from '../components/SettingsGroup.vue'\nimport SettingsRow from '../components/SettingsRow.vue'\nimport { useInstall } from './use-install'\n\n/**\n * The way back to installing after the card has been dismissed.\n *\n * The card snoozes for a week; without this row, someone who tapped \"Not now\"\n * and then changed their mind would have nowhere to go. Both phone apps had it,\n * thirty-four lines, with no difference at all.\n *\n * It renders nothing where installing is neither possible nor already done — a\n * settings group that says \"you cannot install this\" is worse than silence.\n */\ndefineProps<{\n /** The group's heading. */\n title: string\n /** The row's label while installing is still possible. */\n label: string\n /** The row's label once it is installed. */\n installedLabel: string\n body: string\n /** Shown instead of `body` on iOS, where the user must use the Share menu. */\n iosBody: string\n /** The install button. Absent on iOS, which has no API to call. */\n action: string\n}>()\n\nconst { isInstalled, canPrompt, needsManualSteps, prompt } = useInstall()\n</script>\n\n<template>\n <SettingsGroup v-if=\"isInstalled || canPrompt || needsManualSteps\" :title=\"title\">\n <SettingsRow\n :label=\"isInstalled ? installedLabel : label\"\n :description=\"isInstalled ? '' : needsManualSteps ? iosBody : body\"\n :icon=\"isInstalled ? CheckCircle2 : needsManualSteps ? Share : Download\"\n stacked\n >\n <BaseButton v-if=\"canPrompt\" variant=\"primary\" size=\"sm\" class=\"self-start\" @click=\"prompt\">\n {{ action }}\n </BaseButton>\n </SettingsRow>\n </SettingsGroup>\n</template>\n","<script setup lang=\"ts\">\nimport { CheckCircle2, Download, Share } from 'lucide-vue-next'\n\nimport BaseButton from '../components/BaseButton.vue'\nimport SettingsGroup from '../components/SettingsGroup.vue'\nimport SettingsRow from '../components/SettingsRow.vue'\nimport { useInstall } from './use-install'\n\n/**\n * The way back to installing after the card has been dismissed.\n *\n * The card snoozes for a week; without this row, someone who tapped \"Not now\"\n * and then changed their mind would have nowhere to go. Both phone apps had it,\n * thirty-four lines, with no difference at all.\n *\n * It renders nothing where installing is neither possible nor already done — a\n * settings group that says \"you cannot install this\" is worse than silence.\n */\ndefineProps<{\n /** The group's heading. */\n title: string\n /** The row's label while installing is still possible. */\n label: string\n /** The row's label once it is installed. */\n installedLabel: string\n body: string\n /** Shown instead of `body` on iOS, where the user must use the Share menu. */\n iosBody: string\n /** The install button. Absent on iOS, which has no API to call. */\n action: string\n}>()\n\nconst { isInstalled, canPrompt, needsManualSteps, prompt } = useInstall()\n</script>\n\n<template>\n <SettingsGroup v-if=\"isInstalled || canPrompt || needsManualSteps\" :title=\"title\">\n <SettingsRow\n :label=\"isInstalled ? installedLabel : label\"\n :description=\"isInstalled ? '' : needsManualSteps ? iosBody : body\"\n :icon=\"isInstalled ? CheckCircle2 : needsManualSteps ? Share : Download\"\n stacked\n >\n <BaseButton v-if=\"canPrompt\" variant=\"primary\" size=\"sm\" class=\"self-start\" @click=\"prompt\">\n {{ action }}\n </BaseButton>\n </SettingsRow>\n </SettingsGroup>\n</template>\n","<script setup lang=\"ts\">\nimport { RefreshCw, X } from 'lucide-vue-next'\n\nimport BaseButton from '../components/BaseButton.vue'\n\n/**\n * The card that says a new version is waiting.\n *\n * `registerType: 'prompt'` means a new service worker waits rather than taking\n * over, and this is what asks whether to apply it. Asking rather than reloading\n * is the decision worth keeping: an automatic swap mid-sentence loses whatever\n * was being typed.\n *\n * **The service worker stays the app's.** `virtual:pwa-register/vue` is a\n * build-time module from `vite-plugin-pwa`, and a library cannot import one —\n * so the app owns `useRegisterSW` and hands the answer down as `open`. That\n * split is also honest: whether an update is waiting is the app's business,\n * and what the card looks like is this component's.\n *\n * @example\n * ```vue\n * <script setup>\n * const { needRefresh, updateServiceWorker } = useRegisterSW()\n * <\\/script>\n *\n * <UpdatePrompt\n * :open=\"needRefresh\"\n * :title=\"t('pwa.updateTitle')\"\n * :body=\"t('pwa.updateBody')\"\n * :action=\"t('pwa.reload')\"\n * :dismiss-label=\"t('pwa.later')\"\n * @update=\"updateServiceWorker(true)\"\n * @dismiss=\"needRefresh = false\"\n * />\n * ```\n */\ndefineProps<{\n open: boolean\n title: string\n body: string\n action: string\n /** The X's accessible name. An X on its own has none. */\n dismissLabel: string\n}>()\n\ndefineEmits<{ update: []; dismiss: [] }>()\n</script>\n\n<template>\n <Transition name=\"update\">\n <aside v-if=\"open\" class=\"update-card\" role=\"status\">\n <span class=\"update-icon\" aria-hidden=\"true\">\n <RefreshCw class=\"size-4\" />\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <p class=\"text-ink text-sm font-semibold\">{{ title }}</p>\n <p class=\"text-ink-soft text-xs leading-snug\">{{ body }}</p>\n </div>\n\n <BaseButton\n variant=\"primary\"\n pill\n size=\"xs\"\n class=\"shrink-0 font-semibold\"\n @click=\"$emit('update')\"\n >\n {{ action }}\n </BaseButton>\n\n <BaseButton\n variant=\"quiet\"\n icon\n pill\n size=\"sm\"\n class=\"shrink-0\"\n :aria-label=\"dismissLabel\"\n @click=\"$emit('dismiss')\"\n >\n <X class=\"size-4\" />\n </BaseButton>\n </aside>\n </Transition>\n</template>\n\n<style scoped>\n/* Sits above the tab bar and the action button, because it outranks both — but\n absolutely inside its container, so on a desktop-sized shell it does not\n float off into the page. Give the shell `relative`. */\n.update-card {\n border-color: var(--color-hair);\n background: color-mix(in srgb, var(--color-surface) 95%, transparent);\n border-radius: var(--radius-card);\n position: absolute;\n left: 50%;\n z-index: 50;\n display: flex;\n width: 100%;\n max-width: 360px;\n align-items: center;\n gap: 0.75rem;\n border-width: 1px;\n padding: 0.75rem;\n backdrop-filter: blur(12px);\n box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);\n transform: translateX(-50%);\n bottom: calc(1rem + env(safe-area-inset-bottom, 0px));\n}\n\n.update-icon {\n background: color-mix(in srgb, var(--color-primary) 15%, transparent);\n color: var(--color-primary);\n display: flex;\n height: 2.25rem;\n width: 2.25rem;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n border-radius: 0.75rem;\n}\n\n.update-enter-active,\n.update-leave-active {\n transition:\n opacity 250ms ease,\n transform 250ms cubic-bezier(0.32, 0.72, 0, 1);\n}\n\n.update-enter-from,\n.update-leave-to {\n opacity: 0;\n transform: translate(-50%, 1rem);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .update-enter-from,\n .update-leave-to {\n transform: translate(-50%, 0);\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { RefreshCw, X } from 'lucide-vue-next'\n\nimport BaseButton from '../components/BaseButton.vue'\n\n/**\n * The card that says a new version is waiting.\n *\n * `registerType: 'prompt'` means a new service worker waits rather than taking\n * over, and this is what asks whether to apply it. Asking rather than reloading\n * is the decision worth keeping: an automatic swap mid-sentence loses whatever\n * was being typed.\n *\n * **The service worker stays the app's.** `virtual:pwa-register/vue` is a\n * build-time module from `vite-plugin-pwa`, and a library cannot import one —\n * so the app owns `useRegisterSW` and hands the answer down as `open`. That\n * split is also honest: whether an update is waiting is the app's business,\n * and what the card looks like is this component's.\n *\n * @example\n * ```vue\n * <script setup>\n * const { needRefresh, updateServiceWorker } = useRegisterSW()\n * <\\/script>\n *\n * <UpdatePrompt\n * :open=\"needRefresh\"\n * :title=\"t('pwa.updateTitle')\"\n * :body=\"t('pwa.updateBody')\"\n * :action=\"t('pwa.reload')\"\n * :dismiss-label=\"t('pwa.later')\"\n * @update=\"updateServiceWorker(true)\"\n * @dismiss=\"needRefresh = false\"\n * />\n * ```\n */\ndefineProps<{\n open: boolean\n title: string\n body: string\n action: string\n /** The X's accessible name. An X on its own has none. */\n dismissLabel: string\n}>()\n\ndefineEmits<{ update: []; dismiss: [] }>()\n</script>\n\n<template>\n <Transition name=\"update\">\n <aside v-if=\"open\" class=\"update-card\" role=\"status\">\n <span class=\"update-icon\" aria-hidden=\"true\">\n <RefreshCw class=\"size-4\" />\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <p class=\"text-ink text-sm font-semibold\">{{ title }}</p>\n <p class=\"text-ink-soft text-xs leading-snug\">{{ body }}</p>\n </div>\n\n <BaseButton\n variant=\"primary\"\n pill\n size=\"xs\"\n class=\"shrink-0 font-semibold\"\n @click=\"$emit('update')\"\n >\n {{ action }}\n </BaseButton>\n\n <BaseButton\n variant=\"quiet\"\n icon\n pill\n size=\"sm\"\n class=\"shrink-0\"\n :aria-label=\"dismissLabel\"\n @click=\"$emit('dismiss')\"\n >\n <X class=\"size-4\" />\n </BaseButton>\n </aside>\n </Transition>\n</template>\n\n<style scoped>\n/* Sits above the tab bar and the action button, because it outranks both — but\n absolutely inside its container, so on a desktop-sized shell it does not\n float off into the page. Give the shell `relative`. */\n.update-card {\n border-color: var(--color-hair);\n background: color-mix(in srgb, var(--color-surface) 95%, transparent);\n border-radius: var(--radius-card);\n position: absolute;\n left: 50%;\n z-index: 50;\n display: flex;\n width: 100%;\n max-width: 360px;\n align-items: center;\n gap: 0.75rem;\n border-width: 1px;\n padding: 0.75rem;\n backdrop-filter: blur(12px);\n box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);\n transform: translateX(-50%);\n bottom: calc(1rem + env(safe-area-inset-bottom, 0px));\n}\n\n.update-icon {\n background: color-mix(in srgb, var(--color-primary) 15%, transparent);\n color: var(--color-primary);\n display: flex;\n height: 2.25rem;\n width: 2.25rem;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n border-radius: 0.75rem;\n}\n\n.update-enter-active,\n.update-leave-active {\n transition:\n opacity 250ms ease,\n transform 250ms cubic-bezier(0.32, 0.72, 0, 1);\n}\n\n.update-enter-from,\n.update-leave-to {\n opacity: 0;\n transform: translate(-50%, 1rem);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .update-enter-from,\n .update-leave-to {\n transform: translate(-50%, 0);\n }\n}\n</style>\n"],"mappings":"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"}
package/dist/styles.css CHANGED
@@ -25,6 +25,51 @@
25
25
  }
26
26
  }
27
27
 
28
+ .tour-enter-active[data-v-75292716],
29
+ .tour-leave-active[data-v-75292716] {
30
+ transition: opacity 220ms ease;
31
+ }
32
+ .tour-enter-from[data-v-75292716],
33
+ .tour-leave-to[data-v-75292716] {
34
+ opacity: 0;
35
+ }
36
+ .tour-forward-enter-active[data-v-75292716],
37
+ .tour-backward-enter-active[data-v-75292716] {
38
+ transition:
39
+ opacity 260ms ease-out,
40
+ transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
41
+ }
42
+ .tour-forward-leave-active[data-v-75292716],
43
+ .tour-backward-leave-active[data-v-75292716] {
44
+ transition:
45
+ opacity 130ms ease-in,
46
+ transform 130ms ease-in;
47
+ }
48
+ .tour-forward-enter-from[data-v-75292716] {
49
+ opacity: 0;
50
+ transform: translateX(1.25rem);
51
+ }
52
+ .tour-forward-leave-to[data-v-75292716] {
53
+ opacity: 0;
54
+ transform: translateX(-0.75rem);
55
+ }
56
+ .tour-backward-enter-from[data-v-75292716] {
57
+ opacity: 0;
58
+ transform: translateX(-1.25rem);
59
+ }
60
+ .tour-backward-leave-to[data-v-75292716] {
61
+ opacity: 0;
62
+ transform: translateX(0.75rem);
63
+ }
64
+ @media (prefers-reduced-motion: reduce) {
65
+ .tour-forward-enter-from[data-v-75292716],
66
+ .tour-forward-leave-to[data-v-75292716],
67
+ .tour-backward-enter-from[data-v-75292716],
68
+ .tour-backward-leave-to[data-v-75292716] {
69
+ transform: none;
70
+ }
71
+ }
72
+
28
73
  /* Movement is small and downward from the top, upward from the bottom — the
29
74
  direction it came from either way. */
30
75
  .toast-enter-active[data-v-f1a3439c],
@@ -359,4 +404,73 @@
359
404
  syntax: "*";
360
405
  inherits: false
361
406
  }
407
+
408
+ .install-enter-active[data-v-34c86300],
409
+ .install-leave-active[data-v-34c86300] {
410
+ transition:
411
+ opacity 200ms ease,
412
+ transform 200ms ease;
413
+ }
414
+ .install-enter-from[data-v-34c86300],
415
+ .install-leave-to[data-v-34c86300] {
416
+ opacity: 0;
417
+ transform: translateY(-4px);
418
+ }
419
+ @media (prefers-reduced-motion: reduce) {
420
+ .install-enter-from[data-v-34c86300],
421
+ .install-leave-to[data-v-34c86300] {
422
+ transform: none;
423
+ }
424
+ }
425
+
426
+ /* Sits above the tab bar and the action button, because it outranks both — but
427
+ absolutely inside its container, so on a desktop-sized shell it does not
428
+ float off into the page. Give the shell `relative`. */
429
+ .update-card[data-v-7cf60526] {
430
+ border-color: var(--color-hair);
431
+ background: color-mix(in srgb, var(--color-surface) 95%, transparent);
432
+ border-radius: var(--radius-card);
433
+ position: absolute;
434
+ left: 50%;
435
+ z-index: 50;
436
+ display: flex;
437
+ width: 100%;
438
+ max-width: 360px;
439
+ align-items: center;
440
+ gap: 0.75rem;
441
+ border-width: 1px;
442
+ padding: 0.75rem;
443
+ backdrop-filter: blur(12px);
444
+ box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
445
+ transform: translateX(-50%);
446
+ bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
447
+ }
448
+ .update-icon[data-v-7cf60526] {
449
+ background: color-mix(in srgb, var(--color-primary) 15%, transparent);
450
+ color: var(--color-primary);
451
+ display: flex;
452
+ height: 2.25rem;
453
+ width: 2.25rem;
454
+ flex-shrink: 0;
455
+ align-items: center;
456
+ justify-content: center;
457
+ border-radius: 0.75rem;
458
+ }
459
+ .update-enter-active[data-v-7cf60526],
460
+ .update-leave-active[data-v-7cf60526] {
461
+ transition:
462
+ opacity 250ms ease,
463
+ transform 250ms cubic-bezier(0.32, 0.72, 0, 1);
464
+ }
465
+ .update-enter-from[data-v-7cf60526],
466
+ .update-leave-to[data-v-7cf60526] {
467
+ opacity: 0;
468
+ transform: translate(-50%, 1rem);
469
+ }
470
+ @media (prefers-reduced-motion: reduce) {
471
+ .update-enter-from[data-v-7cf60526],
472
+ .update-leave-to[data-v-7cf60526] {
473
+ transform: translate(-50%, 0);
474
+ }
475
+ }
362
476
  /*$vite$:1*/