@adea-ai/app-framework 0.37.0 → 0.37.2
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/app/create-application.js +1 -1
- package/dist/appearance/appearance-host.js +3 -2
- package/dist/appearance/custom-theme-import.js +3 -1
- package/dist/appearance/custom-theme-library.d.ts +6 -185
- package/dist/appearance/custom-theme-library.js +3 -621
- package/dist/appearance/theme-library-mutation.d.ts +42 -0
- package/dist/appearance/theme-library-mutation.js +172 -0
- package/dist/appearance/theme-library-schema.d.ts +108 -0
- package/dist/appearance/theme-library-schema.js +189 -0
- package/dist/appearance/theme-library-store.d.ts +61 -0
- package/dist/appearance/theme-library-store.js +268 -0
- package/dist/appearance/theme-record-adapter.js +3 -1
- package/dist/appearance/theme-registry.js +2 -1
- package/dist/cli/framework-update-cli.js +1 -1
- package/dist/cli/macos-signing-cli.js +1 -1
- package/dist/cli/release-assets-plan-cli.js +1 -1
- package/dist/cli/release-cut-cli.js +2 -2
- package/dist/cli/release-descriptor-staging-cli.js +2 -2
- package/dist/cli/release-promote-cli.js +1 -1
- package/dist/cli/release-publish-cli.js +1 -1
- package/dist/cli/release-sign-cli.js +1 -1
- package/dist/cli/release-step-cli.js +1 -1
- package/dist/cli/update-helper-cli.js +1 -1
- package/dist/cli/windows-installer-build-cli.js +1 -1
- package/dist/cli/windows-runtime-patch-cli.js +1 -1
- package/dist/desktop/client-assets.js +1 -1
- package/dist/desktop/desktop-client.d.ts +1 -1
- package/dist/desktop/desktop-gateway.js +2 -2
- package/dist/desktop/desktop-host.js +6 -6
- package/dist/desktop/desktop-stream.js +1 -1
- package/dist/framework-source.json +1 -1
- package/dist/installer/command-qualification-command.js +2 -2
- package/dist/installer/installed-payload.js +4 -4
- package/dist/installer/{installer-archive.js → installer-archive-members.js} +2 -2
- package/dist/installer/installer-ci-worker.js +2 -2
- package/dist/installer/installer-extraction.js +3 -3
- package/dist/installer/installer-fetch-guard.d.ts +1 -1
- package/dist/installer/installer-identity.js +2 -2
- package/dist/installer/installer-observation.d.ts +1 -1
- package/dist/installer/installer-observation.js +5 -5
- package/dist/installer/installer-process-cleanup.js +1 -1
- package/dist/installer/installer-qualification-command.js +3 -3
- package/dist/installer/installer-renderer-evidence.js +1 -1
- package/dist/installer/installer-upgrade-command.d.ts +2 -2
- package/dist/installer/installer-upgrade-command.js +7 -7
- package/dist/installer/linux-process-group.js +1 -1
- package/dist/installer/upgrade-asset-download.d.ts +1 -1
- package/dist/installer/upgrade-asset-download.js +2 -2
- package/dist/native/desktop-build.js +1 -1
- package/dist/native/posix-tree-removal.d.ts +1 -1
- package/dist/native/secure-window.js +1 -1
- package/dist/native/windows-build-hook.js +1 -1
- package/dist/native/windows-extractor-build.js +1 -1
- package/dist/release/feed-release-cut.d.ts +1 -1
- package/dist/release/feed-state.d.ts +2 -2
- package/dist/release/feed-state.js +4 -4
- package/dist/release/github-release-cut.js +3 -3
- package/dist/release/github-release-promotion.js +2 -2
- package/dist/release/github-release-publisher.js +1 -1
- package/dist/release/github-release-qualification.js +1 -1
- package/dist/release/local-release.d.ts +2 -2
- package/dist/release/local-release.js +7 -7
- package/dist/release/qualification-run.js +1 -1
- package/dist/release/release-artifact.d.ts +1 -1
- package/dist/release/release-artifact.js +2 -2
- package/dist/release/release-assets-plan.js +2 -2
- package/dist/release/release-config.d.ts +1 -1
- package/dist/release/release-config.js +3 -3
- package/dist/release/release-cut-command.js +1 -1
- package/dist/release/release-descriptor-staging.js +5 -5
- package/dist/release/release-finalize.js +3 -3
- package/dist/release/release-promotion-command.js +2 -2
- package/dist/release/release-promotion.js +1 -1
- package/dist/release/release-publication.d.ts +1 -1
- package/dist/release/release-publication.js +3 -3
- package/dist/release/release-publish-command.js +4 -4
- package/dist/release/release-steps.js +2 -2
- package/dist/release/retained-release-build.js +2 -2
- package/dist/shell/app-utilities.js +2 -2
- package/dist/update-helper.bundle.js +18 -18
- package/dist/updates/channel-update-manager.d.ts +3 -3
- package/dist/updates/channel-update-manager.js +2 -2
- package/dist/updates/desktop-updater.d.ts +10 -83
- package/dist/updates/desktop-updater.js +16 -219
- package/dist/updates/{packaged-release-config.js → feed/packaged-release-config.js} +5 -5
- package/dist/updates/{release-feed.js → feed/release-feed.js} +2 -2
- package/dist/updates/{release-location.js → feed/release-location.js} +2 -2
- package/dist/updates/{release-version.js → feed/release-version.js} +1 -1
- package/dist/updates/{signed-release.js → feed/signed-release.js} +2 -2
- package/dist/updates/{update-discovery.js → feed/update-discovery.js} +3 -3
- package/dist/updates/helper/launch-gate-recovery.d.ts +8 -0
- package/dist/updates/{update-resume.js → helper/launch-gate-recovery.js} +13 -423
- package/dist/updates/helper/resume-staging.d.ts +22 -0
- package/dist/updates/helper/resume-staging.js +180 -0
- package/dist/updates/{update-helper.d.ts → helper/update-helper.d.ts} +1 -1
- package/dist/updates/{update-helper.js → helper/update-helper.js} +9 -9
- package/dist/updates/{update-resume.d.ts → helper/update-resume.d.ts} +4 -10
- package/dist/updates/helper/update-resume.js +252 -0
- package/dist/updates/{update-shutdown.js → helper/update-shutdown.js} +2 -2
- package/dist/updates/{update-arm.d.ts → install/update-arm.d.ts} +2 -2
- package/dist/updates/{update-arm.js → install/update-arm.js} +10 -10
- package/dist/updates/{update-download-cleanup.d.ts → install/update-download-cleanup.d.ts} +1 -1
- package/dist/updates/{update-download-cleanup.js → install/update-download-cleanup.js} +3 -3
- package/dist/updates/{update-download.d.ts → install/update-download.d.ts} +2 -2
- package/dist/updates/{update-download.js → install/update-download.js} +3 -3
- package/dist/updates/{update-extraction.d.ts → install/update-extraction.d.ts} +2 -2
- package/dist/updates/{update-extraction.js → install/update-extraction.js} +6 -6
- package/dist/updates/{update-handoff-plan.d.ts → install/update-handoff-plan.d.ts} +2 -2
- package/dist/updates/{update-handoff-plan.js → install/update-handoff-plan.js} +5 -5
- package/dist/updates/{update-marker.js → install/update-marker.js} +2 -2
- package/dist/updates/{update-swap-stage.d.ts → install/update-swap-stage.d.ts} +2 -2
- package/dist/updates/{update-swap-stage.js → install/update-swap-stage.js} +7 -6
- package/dist/updates/{update-swap.d.ts → install/update-swap.d.ts} +1 -1
- package/dist/updates/{update-swap.js → install/update-swap.js} +5 -5
- package/dist/updates/install-target.d.ts +8 -0
- package/dist/updates/install-target.js +27 -0
- package/dist/updates/{launch-environment.js → launch/launch-environment.js} +1 -1
- package/dist/updates/{packaged-launch-admission.js → launch/packaged-launch-admission.js} +4 -4
- package/dist/updates/{packaged-update-startup.d.ts → launch/packaged-update-startup.d.ts} +3 -3
- package/dist/updates/{packaged-update-startup.js → launch/packaged-update-startup.js} +10 -7
- package/dist/updates/{update-launch-gate.d.ts → launch/update-launch-gate.d.ts} +1 -1
- package/dist/updates/{update-launch-gate.js → launch/update-launch-gate.js} +9 -9
- package/dist/updates/{update-launch.d.ts → launch/update-launch.d.ts} +1 -1
- package/dist/updates/{update-launch.js → launch/update-launch.js} +2 -2
- package/dist/updates/{linux-process-state.js → locks/linux-process-state.js} +1 -1
- package/dist/updates/{native-file-lock.js → locks/native-file-lock.js} +1 -1
- package/dist/updates/{stable-file.js → locks/stable-file.js} +2 -2
- package/dist/updates/{update-download-lock.js → locks/update-download-lock.js} +1 -1
- package/dist/updates/{update-generation-lease.js → locks/update-generation-lease.js} +3 -3
- package/dist/updates/{update-inherited-launch-lease.d.ts → locks/update-inherited-launch-lease.d.ts} +1 -1
- package/dist/updates/{update-inherited-launch-lease.js → locks/update-inherited-launch-lease.js} +2 -2
- package/dist/updates/{update-instance-lease.js → locks/update-instance-lease.js} +2 -2
- package/dist/updates/{update-lock.js → locks/update-lock.js} +2 -2
- package/dist/updates/{update-process-fence.js → locks/update-process-fence.js} +3 -3
- package/dist/updates/{update-process-liveness.js → locks/update-process-liveness.js} +2 -2
- package/dist/updates/retained-client-assets.d.ts +60 -0
- package/dist/updates/retained-client-assets.js +116 -0
- package/dist/updates/retention/retention-cleanup.d.ts +103 -0
- package/dist/updates/retention/retention-cleanup.js +439 -0
- package/dist/updates/retention/retention-prune-progress.d.ts +27 -0
- package/dist/updates/retention/retention-prune-progress.js +203 -0
- package/dist/updates/retention/retirement-inventory.d.ts +93 -0
- package/dist/updates/retention/retirement-inventory.js +373 -0
- package/dist/updates/retention/retirement-records.d.ts +75 -0
- package/dist/updates/retention/retirement-records.js +309 -0
- package/dist/updates/{update-retention-marker.d.ts → retention/update-retention-marker.d.ts} +1 -1
- package/dist/updates/{update-retention-marker.js → retention/update-retention-marker.js} +3 -3
- package/dist/updates/{update-retention-plan.d.ts → retention/update-retention-plan.d.ts} +1 -1
- package/dist/updates/{update-retention-plan.js → retention/update-retention-plan.js} +2 -2
- package/dist/updates/{update-retention-sync.d.ts → retention/update-retention-sync.d.ts} +1 -1
- package/dist/updates/{update-retention-sync.js → retention/update-retention-sync.js} +2 -2
- package/dist/updates/retention/update-retirement.d.ts +26 -0
- package/dist/updates/retention/update-retirement.js +205 -0
- package/dist/updates/update-adapter.js +1 -1
- package/dist/updates/update-channel-store.d.ts +1 -1
- package/dist/updates/update-channel-store.js +3 -3
- package/dist/updates/update-manager.d.ts +4 -4
- package/dist/updates/update-manager.js +5 -5
- package/dist/updates/update-services.d.ts +15 -0
- package/dist/updates/update-services.js +77 -0
- package/dist/updates/update-state-store.d.ts +2 -2
- package/dist/updates/update-state-store.js +2 -2
- package/dist/views/appearance-surface.js +4 -2
- package/package.json +47 -47
- package/src/appearance/custom-theme-library.ts +42 -956
- package/src/appearance/theme-library-mutation.ts +288 -0
- package/src/appearance/theme-library-schema.ts +347 -0
- package/src/appearance/theme-library-store.ts +379 -0
- package/src/updates/update-adapter.ts +1 -1
- package/dist/updates/update-retirement.d.ts +0 -205
- package/dist/updates/update-retirement.js +0 -1485
- /package/dist/installer/{installer-archive.d.ts → installer-archive-members.d.ts} +0 -0
- /package/dist/updates/{packaged-release-config.d.ts → feed/packaged-release-config.d.ts} +0 -0
- /package/dist/updates/{release-feed.d.ts → feed/release-feed.d.ts} +0 -0
- /package/dist/updates/{release-location.d.ts → feed/release-location.d.ts} +0 -0
- /package/dist/updates/{release-version.d.ts → feed/release-version.d.ts} +0 -0
- /package/dist/updates/{signed-release.d.ts → feed/signed-release.d.ts} +0 -0
- /package/dist/updates/{update-discovery.d.ts → feed/update-discovery.d.ts} +0 -0
- /package/dist/updates/{update-shutdown.d.ts → helper/update-shutdown.d.ts} +0 -0
- /package/dist/updates/{update-marker.d.ts → install/update-marker.d.ts} +0 -0
- /package/dist/updates/{launch-environment.d.ts → launch/launch-environment.d.ts} +0 -0
- /package/dist/updates/{packaged-launch-admission.d.ts → launch/packaged-launch-admission.d.ts} +0 -0
- /package/dist/updates/{linux-process-state.d.ts → locks/linux-process-state.d.ts} +0 -0
- /package/dist/updates/{native-file-lock.d.ts → locks/native-file-lock.d.ts} +0 -0
- /package/dist/updates/{stable-file.d.ts → locks/stable-file.d.ts} +0 -0
- /package/dist/updates/{update-download-lock.d.ts → locks/update-download-lock.d.ts} +0 -0
- /package/dist/updates/{update-generation-lease.d.ts → locks/update-generation-lease.d.ts} +0 -0
- /package/dist/updates/{update-instance-lease.d.ts → locks/update-instance-lease.d.ts} +0 -0
- /package/dist/updates/{update-lock.d.ts → locks/update-lock.d.ts} +0 -0
- /package/dist/updates/{update-process-fence.d.ts → locks/update-process-fence.d.ts} +0 -0
- /package/dist/updates/{update-process-liveness.d.ts → locks/update-process-liveness.d.ts} +0 -0
- /package/src/updates/{release-version.ts → feed/release-version.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { errorCode } from "./value-guards.js";
|
|
2
2
|
import { createRendererProfile } from "../native/renderer-profile.js";
|
|
3
3
|
import { renameExclusive } from "../native/native-rename.js";
|
|
4
|
-
import { containsAsciiControl } from "../desktop/string-policy.js";
|
|
5
4
|
import { assertPortableAppName } from "../installer/installer-layout.js";
|
|
5
|
+
import { containsAsciiControl } from "../desktop/string-policy.js";
|
|
6
6
|
import { isPrivateGroup, readAccountDatabase } from "./private-group.js";
|
|
7
7
|
import { cp, lstat, mkdtemp, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
8
8
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { LEGACY_IMPORTED_THEME_TOKEN_PROJECTION } from "./legacy-imported-theme-token-projection.js";
|
|
2
1
|
import { appearanceThemeScript, createAppearancePersistence, selectionFromPreferences } from "./appearance-preferences.js";
|
|
3
|
-
import
|
|
2
|
+
import "./custom-theme-library.js";
|
|
3
|
+
import { customUiVariants, readCustomThemeLibrary, subscribeCustomThemes } from "./theme-library-store.js";
|
|
4
|
+
import { LEGACY_IMPORTED_THEME_TOKEN_PROJECTION } from "./legacy-imported-theme-token-projection.js";
|
|
4
5
|
import { createComponent, effect, mergeProps, template } from "solid-js/web";
|
|
5
6
|
import { createContext, createEffect, createSignal, useContext } from "solid-js";
|
|
6
7
|
import { ThemeProvider as ThemeProvider$1, useOptionalTheme } from "@adea-ai/ui/components/theme/lazy";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import "./custom-theme-library.js";
|
|
2
|
+
import { flatVariantTokens, validateThemeRegistry } from "./theme-library-schema.js";
|
|
3
|
+
import { mutateCustomThemeLibrary } from "./theme-library-mutation.js";
|
|
1
4
|
import { LEGACY_IMPORTED_THEME_TOKEN_PROJECTION } from "./legacy-imported-theme-token-projection.js";
|
|
2
|
-
import { flatVariantTokens, mutateCustomThemeLibrary, validateThemeRegistry } from "./custom-theme-library.js";
|
|
3
5
|
import { projectThemeTokens } from "@adea-ai/ui/components/theme/token-projection";
|
|
4
6
|
import { colorToHex, contrastRatio, ensureContrast, parseColor } from "@adea-ai/ui/lib/accent-roles";
|
|
5
7
|
import { defaultThemeRecord, editorRolesHex, oklchToHex, parseOklchColor, shadcnDestructiveProjection, shadcnVariables, syntaxRolesHex, toXtermTheme } from "@adea-ai/ui/lib/theme-projection";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { AdeaThemeRecord } from '@adea-ai/ui/lib/theme-records';
|
|
2
|
-
import type { ThemeVariant as UiThemeVariant } from '@adea-ai/ui/lib/themes';
|
|
3
1
|
/**
|
|
4
2
|
* The custom theme library: themes the user imported from a file, stored in
|
|
5
3
|
* `localStorage` and handed to the provider as extra variants. Import and
|
|
@@ -12,186 +10,9 @@ import type { ThemeVariant as UiThemeVariant } from '@adea-ai/ui/lib/themes';
|
|
|
12
10
|
* `flatTokens` stays the verbatim token map. Explicit entries remain authoritative;
|
|
13
11
|
* the sidebar projection recovers only absent source entries from `variant`.
|
|
14
12
|
*/
|
|
15
|
-
export
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/** The 16 xterm ANSI slots, in protocol order. */
|
|
22
|
-
ansi: readonly string[];
|
|
23
|
-
}>;
|
|
24
|
-
export type StoredThemeEditorRoles = Readonly<{
|
|
25
|
-
keyword: string;
|
|
26
|
-
string: string;
|
|
27
|
-
number: string;
|
|
28
|
-
comment: string;
|
|
29
|
-
function: string;
|
|
30
|
-
variable: string;
|
|
31
|
-
type: string;
|
|
32
|
-
tag: string;
|
|
33
|
-
attribute: string;
|
|
34
|
-
operator: string;
|
|
35
|
-
heading: string;
|
|
36
|
-
link: string;
|
|
37
|
-
diffAdd: string;
|
|
38
|
-
diffDelete: string;
|
|
39
|
-
diffHunk: string;
|
|
40
|
-
searchMatch: string;
|
|
41
|
-
}>;
|
|
42
|
-
export type StoredThemeChartRoles = Readonly<{
|
|
43
|
-
chart1: string;
|
|
44
|
-
chart2: string;
|
|
45
|
-
chart3: string;
|
|
46
|
-
chart4: string;
|
|
47
|
-
chart5: string;
|
|
48
|
-
chart6: string;
|
|
49
|
-
}>;
|
|
50
|
-
export type StoredThemeColors = Readonly<{
|
|
51
|
-
background: string;
|
|
52
|
-
foreground: string;
|
|
53
|
-
card: string;
|
|
54
|
-
cardForeground: string;
|
|
55
|
-
popover: string;
|
|
56
|
-
popoverForeground: string;
|
|
57
|
-
primary: string;
|
|
58
|
-
primaryForeground: string;
|
|
59
|
-
secondary: string;
|
|
60
|
-
secondaryForeground: string;
|
|
61
|
-
muted: string;
|
|
62
|
-
mutedForeground: string;
|
|
63
|
-
accent: string;
|
|
64
|
-
accentForeground: string;
|
|
65
|
-
destructive: string;
|
|
66
|
-
destructiveAction: string;
|
|
67
|
-
destructiveActionForeground: string;
|
|
68
|
-
success: string;
|
|
69
|
-
border: string;
|
|
70
|
-
input: string;
|
|
71
|
-
ring: string;
|
|
72
|
-
}>;
|
|
73
|
-
/** The variant shape the library has always stored for an imported theme. */
|
|
74
|
-
export type StoredThemeVariant = Readonly<{
|
|
75
|
-
id: string;
|
|
76
|
-
familyId: string;
|
|
77
|
-
familyName: string;
|
|
78
|
-
name: string;
|
|
79
|
-
appearance: StoredThemeAppearance;
|
|
80
|
-
colors: StoredThemeColors;
|
|
81
|
-
terminal: StoredThemeTerminal;
|
|
82
|
-
editor: StoredThemeEditorRoles;
|
|
83
|
-
charts: StoredThemeChartRoles;
|
|
84
|
-
}>;
|
|
85
|
-
export type CustomThemeStored = Readonly<{
|
|
86
|
-
/** Stable id, namespaced so it can never collide with a catalogue id. */
|
|
87
|
-
id: string;
|
|
88
|
-
name: string;
|
|
89
|
-
appearance: StoredThemeAppearance;
|
|
90
|
-
importedAt: string;
|
|
91
|
-
variant: StoredThemeVariant;
|
|
92
|
-
/** The verbatim imported map; projection may supply absent sources from `variant`. */
|
|
93
|
-
flatTokens: Readonly<Record<string, string>>;
|
|
94
|
-
/** Non-fatal adjustments made while normalizing the file, for the UI. */
|
|
95
|
-
notes: readonly string[];
|
|
96
|
-
}>;
|
|
97
|
-
export type AppearanceStorage = Pick<Storage, 'getItem' | 'setItem'>;
|
|
98
|
-
/** A cross-context lock used to serialize theme-library read/modify/write operations. */
|
|
99
|
-
export type ThemeLibraryAtomicLock = Readonly<{
|
|
100
|
-
withExclusiveLock<T>(name: string, operation: () => T): Promise<T>;
|
|
101
|
-
}>;
|
|
102
|
-
export type ThemeLibraryMutationOptions = Readonly<{
|
|
103
|
-
/** Override the browser lock provider in tests or embedder adapters. `null` means unavailable. */
|
|
104
|
-
lock?: ThemeLibraryAtomicLock | null;
|
|
105
|
-
}>;
|
|
106
|
-
export type ThemeLibraryMutation<T> = Readonly<{
|
|
107
|
-
themes: readonly CustomThemeStored[];
|
|
108
|
-
value: T;
|
|
109
|
-
/** Leave storage and subscribers untouched for rejected or idempotent operations. */
|
|
110
|
-
commit?: boolean;
|
|
111
|
-
}>;
|
|
112
|
-
export type ThemeLibraryMutationFailureReason = 'atomic_unavailable' | 'storage_failed' | 'recovery_unavailable' | 'changed_during_mutation';
|
|
113
|
-
export type ThemeLibraryMutationResult<T> = {
|
|
114
|
-
ok: true;
|
|
115
|
-
committed: boolean;
|
|
116
|
-
value: T;
|
|
117
|
-
} | {
|
|
118
|
-
ok: false;
|
|
119
|
-
reason: ThemeLibraryMutationFailureReason;
|
|
120
|
-
error: string;
|
|
121
|
-
};
|
|
122
|
-
export declare const CUSTOM_THEME_LIBRARY_STORAGE_KEY = "appearance.library";
|
|
123
|
-
/**
|
|
124
|
-
* Where an unreadable library is quarantined. It is its own key: the library and
|
|
125
|
-
* the appearance preference used to share `appearance.recovery`, so one could
|
|
126
|
-
* overwrite the other's capture.
|
|
127
|
-
*/
|
|
128
|
-
export declare const CUSTOM_THEME_LIBRARY_RECOVERY_KEY = "appearance.library.recovery";
|
|
129
|
-
/** Origin-wide lock name shared by all cooperating framework builds. */
|
|
130
|
-
export declare const CUSTOM_THEME_LIBRARY_LOCK_NAME = "adea:appearance.library:mutation:v1";
|
|
131
|
-
export declare const CUSTOM_THEME_ATOMIC_STORAGE_UNAVAILABLE = "This app cannot safely save theme changes in this environment. Your library was not changed.";
|
|
132
|
-
export declare const CUSTOM_THEME_LIBRARY_MUTATION_FAILED = "The theme could not be saved. Check your storage and try again.";
|
|
133
|
-
export type ValidationIssue = Readonly<{
|
|
134
|
-
variantId: string;
|
|
135
|
-
severity: 'error' | 'warning';
|
|
136
|
-
message: string;
|
|
137
|
-
}>;
|
|
138
|
-
export declare function validateThemeRegistry(registry: readonly StoredThemeVariant[]): ValidationIssue[];
|
|
139
|
-
/** The custom properties an imported variant owns, as a flat map. */
|
|
140
|
-
export declare function flatVariantTokens(variant: StoredThemeVariant): Record<string, string>;
|
|
141
|
-
/**
|
|
142
|
-
* The catalogue-shaped record for an imported variant. The editor reads only its
|
|
143
|
-
* surface, text, border and accent roles; warning and info are the ANSI yellow and
|
|
144
|
-
* blue because the stored variant has no such roles.
|
|
145
|
-
*/
|
|
146
|
-
export declare function storedVariantRecord(variant: StoredThemeVariant): AdeaThemeRecord;
|
|
147
|
-
/**
|
|
148
|
-
* The shared-provider variant for a stored theme: derived roles from the
|
|
149
|
-
* reconstructed record, missing sidebar projection sources from the stored variant,
|
|
150
|
-
* then every stored flat token verbatim.
|
|
151
|
-
*
|
|
152
|
-
* A record the shared projection cannot map falls back to the default theme of the
|
|
153
|
-
* same appearance under the stored identity, so an import that the projection
|
|
154
|
-
* rejects still paints from its tokens instead of vanishing.
|
|
155
|
-
*/
|
|
156
|
-
export declare function toUiVariant(stored: CustomThemeStored): UiThemeVariant;
|
|
157
|
-
/** The imported themes' stored variants, in import order. */
|
|
158
|
-
export declare function customThemeVariants(): readonly StoredThemeVariant[];
|
|
159
|
-
/** Find one stored variant without projecting the rest of the imported library. */
|
|
160
|
-
export declare function customThemeVariantById(id: string): StoredThemeVariant | undefined;
|
|
161
|
-
/** The imported themes as shared-provider variants: what the provider's `themes` takes. */
|
|
162
|
-
export declare function customUiVariants(): readonly UiThemeVariant[];
|
|
163
|
-
export declare function subscribeCustomThemes(listener: () => void): () => void;
|
|
164
|
-
/**
|
|
165
|
-
* Replace the in-memory imported-theme set and tell subscribers. Durable mutations
|
|
166
|
-
* must use `mutateCustomThemeLibrary`; this deprecated synchronous API fails closed
|
|
167
|
-
* when a storage adapter is supplied because it cannot acquire the shared lock.
|
|
168
|
-
*
|
|
169
|
-
* @deprecated Use `mutateCustomThemeLibrary` for persisted read/modify/write operations.
|
|
170
|
-
*/
|
|
171
|
-
export declare function setCustomThemes(themes: readonly CustomThemeStored[], storage: AppearanceStorage | undefined): boolean;
|
|
172
|
-
/**
|
|
173
|
-
* Read the stored library. A malformed document starts an empty library and
|
|
174
|
-
* quarantines the raw bytes into the library's own recovery key, mirroring the
|
|
175
|
-
* appearance-preference recovery contract; individual invalid records are dropped,
|
|
176
|
-
* not fatal.
|
|
177
|
-
*/
|
|
178
|
-
export declare function readCustomThemeLibrary(storage: AppearanceStorage | undefined): readonly CustomThemeStored[];
|
|
179
|
-
/**
|
|
180
|
-
* Coordinate a storage-backed library read/modify/write across cooperating contexts.
|
|
181
|
-
* The callback reads the current v1 record while holding an origin-wide IndexedDB
|
|
182
|
-
* read/write transaction (and a Web Lock where available), then writes and verifies
|
|
183
|
-
* the v1 record before updating this tab's in-memory registry. Older builds and
|
|
184
|
-
* direct `setCustomThemes` storage writes do not acquire these locks and can still
|
|
185
|
-
* race; this API does not claim cross-version atomicity. If IndexedDB is unavailable,
|
|
186
|
-
* durable mutations fail closed.
|
|
187
|
-
*/
|
|
188
|
-
export declare function mutateCustomThemeLibrary<T>(storage: AppearanceStorage | undefined, update: (themes: readonly CustomThemeStored[]) => ThemeLibraryMutation<T>, options?: ThemeLibraryMutationOptions): Promise<ThemeLibraryMutationResult<T>>;
|
|
189
|
-
/** Remove from the latest persisted snapshot, not a possibly stale UI snapshot. */
|
|
190
|
-
export declare function removeCustomThemeAtomically(id: string, storage: AppearanceStorage | undefined, options?: ThemeLibraryMutationOptions): Promise<ThemeLibraryMutationResult<boolean>>;
|
|
191
|
-
/**
|
|
192
|
-
* Synchronous legacy removal for the in-memory library. Passing storage fails closed;
|
|
193
|
-
* use `removeCustomThemeAtomically` for persisted removals.
|
|
194
|
-
*
|
|
195
|
-
* @deprecated Use `removeCustomThemeAtomically` for persisted removals.
|
|
196
|
-
*/
|
|
197
|
-
export declare function removeCustomTheme(id: string, storage: AppearanceStorage | undefined): boolean;
|
|
13
|
+
export { CUSTOM_THEME_LIBRARY_LOCK_NAME, CUSTOM_THEME_ATOMIC_STORAGE_UNAVAILABLE, CUSTOM_THEME_LIBRARY_MUTATION_FAILED, mutateCustomThemeLibrary, removeCustomThemeAtomically, } from './theme-library-mutation';
|
|
14
|
+
export type { ThemeLibraryAtomicLock, ThemeLibraryMutationOptions, ThemeLibraryMutation, ThemeLibraryMutationFailureReason, ThemeLibraryMutationResult, } from './theme-library-mutation';
|
|
15
|
+
export { validateThemeRegistry, flatVariantTokens, storedVariantRecord, toUiVariant, } from './theme-library-schema';
|
|
16
|
+
export type { StoredThemeAppearance, StoredThemeTerminal, StoredThemeEditorRoles, StoredThemeChartRoles, StoredThemeColors, StoredThemeVariant, CustomThemeStored, ValidationIssue, } from './theme-library-schema';
|
|
17
|
+
export { CUSTOM_THEME_LIBRARY_STORAGE_KEY, CUSTOM_THEME_LIBRARY_RECOVERY_KEY, customThemeVariants, customThemeVariantById, customUiVariants, subscribeCustomThemes, setCustomThemes, readCustomThemeLibrary, removeCustomTheme, } from './theme-library-store';
|
|
18
|
+
export type { AppearanceStorage } from './theme-library-store';
|