@phreshos/core 0.1.7 → 0.1.9
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/README.md +10 -7
- package/dist/main.d.ts +4 -4
- package/dist/permissions.d.ts +3 -3
- package/dist/process.d.ts +1 -1
- package/dist/program.d.ts +24 -16
- package/dist/service.d.ts +11 -8
- package/dist/theme.d.ts +36 -39
- package/dist/theme.js +16 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,22 +60,25 @@ the ordinary `Subscribable` capability with a `change` event; it has no
|
|
|
60
60
|
dedicated subscription shape of its own.
|
|
61
61
|
|
|
62
62
|
Theme properties are expressed as concrete values. `themeLimits` declares the
|
|
63
|
-
contractual customization bounds for spacing, corner radius,
|
|
64
|
-
|
|
63
|
+
contractual customization bounds for spacing, corner radius, and Surface
|
|
64
|
+
properties; implementing authorities validate replacements against those
|
|
65
65
|
bounds. Core defines one fixed numeric scale around any explicit number and one
|
|
66
66
|
fixed color scale around any explicit CSS color. `standardTheme` is the
|
|
67
67
|
canonical reusable default value for that contract, shared by systems,
|
|
68
68
|
interfaces, websites, and Programs that need the same baseline. It is not an
|
|
69
69
|
authoritative environment's mutable Theme state. Background, foreground, and
|
|
70
|
-
accent remain independent CSS color sources. Surface
|
|
71
|
-
grain intensity, animation rate, optional backdrop blur,
|
|
72
|
-
its standard backdrop is zero, so blur is opt-in.
|
|
73
|
-
range ends at `0.3`.
|
|
70
|
+
accent remain independent CSS color sources. Surface derives its color from
|
|
71
|
+
background and adds grain intensity, animation rate, optional backdrop blur,
|
|
72
|
+
and material opacity; its standard backdrop is zero, so blur is opt-in.
|
|
74
73
|
|
|
75
74
|
`createThemeSnapshot()` copies and freezes one complete value at the contract
|
|
76
75
|
boundary. An implementing authority remains responsible for validation,
|
|
77
76
|
persistence, and the current value; its own schema may derive its defaults from
|
|
78
|
-
`standardTheme` rather than duplicating them.
|
|
77
|
+
`standardTheme` rather than duplicating them. Its standard background is
|
|
78
|
+
`#fffff5`; both grain intensity and grain amount default to zero. Surface also
|
|
79
|
+
stores animation, material opacity, optional backdrop blur and three
|
|
80
|
+
displacement stages, plus neutral saturation and brightness. Effects whose
|
|
81
|
+
neutral value avoids rendering work remain neutral by default.
|
|
79
82
|
|
|
80
83
|
Derived variants are calculations, not persisted `Theme` state. `numericScale()`
|
|
81
84
|
produces `xsmall`, `small`, `medium`, `large`, and `xlarge`, preserving the
|
package/dist/main.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ export { type Message, type Cleanup, type Capture, type Captures, type EventMess
|
|
|
2
2
|
export { type Publishable } from "./publishable.js";
|
|
3
3
|
export { type Timeoutable } from "./timeout.js";
|
|
4
4
|
export { type Askable, type TimedAskable } from "./askable.js";
|
|
5
|
-
export { ClientServiceHandler, ServerServiceHandler, ServiceHandler, isServiceKey, type ClientServiceChannel, type ServerServiceChannel, type ServerServiceDefinition, type ServiceChannel, type ServiceDefinition, type ServiceKey, type ServiceLifecycleEvents } from "./service.js";
|
|
6
|
-
export { isPermissionName, permissionNames, type PermissionDecision, type PermissionDecisions, type PermissionName, type
|
|
5
|
+
export { ClientServiceHandler, ServerServiceHandler, ServiceHandler, isServiceKey, type ClientServiceChannel, type ServerServiceChannel, type ServerServiceDefinition, type ServiceChannel, type ServiceDefinition, type ServiceKey, type ServiceLifecycleEvents, type ServiceRegistryEvents } from "./service.js";
|
|
6
|
+
export { isPermissionName, permissionNames, type PermissionDecision, type PermissionDecisions, type PermissionName, type Permission, type ProgramPermission, type TimedPermission } from "./permissions.js";
|
|
7
7
|
export { type Outcome } from "./outcome.js";
|
|
8
8
|
export { type ServedFile } from "./served-file.js";
|
|
9
9
|
export { type DesktopWallpaper, type FileWallpaper, type WallpaperLaunch } from "./wallpaper.js";
|
|
10
10
|
export { isRelativeValue, parseRelativeValue, type RelativeValue, type Value } from "./value.js";
|
|
11
11
|
export { color, type ColorLevel, type ColorScale } from "./color.js";
|
|
12
12
|
export { isScaleLevel, numericScale, scale, scaleMultiplier, type NumericScale, type ScaleLevel } from "./scale.js";
|
|
13
|
-
export { createThemeSnapshot, standardTheme, themeLimits, type Colorable, type Elevatable, type Shapeable, type Sizable, type Theme, type ThemeEvents, type
|
|
13
|
+
export { createThemeSnapshot, standardTheme, themeLimits, type Colorable, type Elevatable, type Shapeable, type Sizable, type Theme, type ThemeEvents, type ThemeProperties, type ThemeRange, type ThemeSurface, type Variantable, type WritableTheme } from "./theme.js";
|
|
14
14
|
export { type DirectoryStat, type EntryStat, type FileStat, type OtherStat, type ProgramArea, type ProgramStore } from "./storage.js";
|
|
15
15
|
export { type LogKind, type LogRecord, type LogSource, type ProgramSql } from "./sql.js";
|
|
16
16
|
export { Endpoint, type AskCapture, type AskMessage, type AskObserver, type EndpointTraffic, type TrafficCapture, type TrafficEvents, type TrafficMessage } from "./endpoint.js";
|
|
@@ -18,7 +18,7 @@ export { type Channel, type ChannelCapture, type ChannelEvents, type ChannelMess
|
|
|
18
18
|
export { Server, type AnswerCapture, type AnswerMessage, type AnswerObserver, type ServerTraffic } from "./server.js";
|
|
19
19
|
export { Client, type ClientTraffic } from "./client.js";
|
|
20
20
|
export { Process, type Exit, type ProcessEvents } from "./process.js";
|
|
21
|
-
export { Program, type ClientDeclaration, type EndpointDeclaration, type ProgramEvents, type ProgramIconSize, type ProgramProcessExit } from "./program.js";
|
|
21
|
+
export { Program, type ClientDeclaration, type EndpointDeclaration, type ProgramEvents, type ProgramIconSize, type ProgramProcess, type ProgramProcessEvents, type ProgramProcessExit } from "./program.js";
|
|
22
22
|
export { type Window, type WindowEvents, type WindowGeometry, type WindowLayer, type WindowState } from "./window.js";
|
|
23
23
|
export { type LocalWindow, type LocalWindowSurface, type SurfaceSettings } from "./local-window.js";
|
|
24
24
|
export { type Easing, type Transaction } from "./transaction.js";
|
package/dist/permissions.d.ts
CHANGED
|
@@ -10,19 +10,19 @@ export declare function isPermissionName(value: unknown): value is PermissionNam
|
|
|
10
10
|
/** The effective decision for one permission, or `null` when none is known. */
|
|
11
11
|
export type PermissionDecision = boolean | null;
|
|
12
12
|
/** Permission requests using one caller-selected deadline. */
|
|
13
|
-
export interface
|
|
13
|
+
export interface TimedPermission {
|
|
14
14
|
/** Requests one permission, resolving `null` if the deadline expires. */
|
|
15
15
|
request(name: PermissionName): Promise<PermissionDecision>;
|
|
16
16
|
}
|
|
17
17
|
/** Client access to one Program's effective permission decisions. */
|
|
18
|
-
export interface
|
|
18
|
+
export interface Permission extends Timeoutable<TimedPermission> {
|
|
19
19
|
/** Reads the effective decision without prompting the user. */
|
|
20
20
|
granted(name: PermissionName): Promise<PermissionDecision>;
|
|
21
21
|
/** Requests a decision from the user. The default deadline is 30 seconds. */
|
|
22
22
|
request(name: PermissionName): Promise<PermissionDecision>;
|
|
23
23
|
}
|
|
24
24
|
/** Server-side management of one Program's persistent permission decisions. */
|
|
25
|
-
export interface
|
|
25
|
+
export interface ProgramPermission {
|
|
26
26
|
/** Reads one persistent decision, or `undefined` when none is stored. */
|
|
27
27
|
get(name: PermissionName): Promise<boolean | undefined>;
|
|
28
28
|
/** Returns an independent snapshot of every persistent decision. */
|
package/dist/process.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface Process<Events extends object = {}> extends Subscribable<Proces
|
|
|
38
38
|
/** Returns the Program that owns this Process. */
|
|
39
39
|
program(): Program;
|
|
40
40
|
/**
|
|
41
|
-
* Returns the Process whose `
|
|
41
|
+
* Returns the Process whose `program.process.create()` call created this Process.
|
|
42
42
|
*
|
|
43
43
|
* Returns `null` when this Process has no accessible parent handle. Rejects
|
|
44
44
|
* when this Process or its retained parent no longer exists. Client
|
package/dist/program.d.ts
CHANGED
|
@@ -28,16 +28,34 @@ export type ProgramProcessExit = Exit & Readonly<{
|
|
|
28
28
|
/** Process that ended. */
|
|
29
29
|
process: Process;
|
|
30
30
|
}>;
|
|
31
|
-
/**
|
|
32
|
-
export type
|
|
31
|
+
/** Process lifecycle events scoped to one Program. */
|
|
32
|
+
export type ProgramProcessEvents = {
|
|
33
33
|
/** One Process Endpoint entered a new live incarnation. */
|
|
34
34
|
endpointStart: Process["server"] | Process["client"];
|
|
35
35
|
/** One Process Endpoint incarnation ended. */
|
|
36
36
|
endpointStop: Process["server"] | Process["client"];
|
|
37
37
|
/** A Process entered this Program's runtime set. */
|
|
38
|
-
|
|
38
|
+
create: Process;
|
|
39
39
|
/** A Process left this Program's runtime set. */
|
|
40
|
-
|
|
40
|
+
exit: ProgramProcessExit;
|
|
41
|
+
};
|
|
42
|
+
/** Operations over the Processes belonging to one Program. */
|
|
43
|
+
export interface ProgramProcess extends Subscribable<ProgramProcessEvents, never> {
|
|
44
|
+
/** Returns every live Process of this Program available to this SDK. */
|
|
45
|
+
list(): Promise<Process[]>;
|
|
46
|
+
/** Returns the earliest-started live Process, or `null` when none exist. */
|
|
47
|
+
first(): Promise<Process | null>;
|
|
48
|
+
/** Returns the latest-started live Process, or `null` when none exist. */
|
|
49
|
+
last(): Promise<Process | null>;
|
|
50
|
+
/** Finds a live Process by identity or Program-local name. */
|
|
51
|
+
find(identityOrName: string): Promise<Process | null>;
|
|
52
|
+
/** Creates one Process of this Program. */
|
|
53
|
+
create(launch?: Launch): Promise<Process>;
|
|
54
|
+
/** Ends every live Process and returns their identities. */
|
|
55
|
+
exitAll(): Promise<string[]>;
|
|
56
|
+
}
|
|
57
|
+
/** Lifecycle events belonging to one Program entity. */
|
|
58
|
+
export type ProgramEvents = {
|
|
41
59
|
/** This Program left the runtime registry. */
|
|
42
60
|
forget: undefined;
|
|
43
61
|
/** This Program left the installed state. */
|
|
@@ -73,16 +91,8 @@ export interface Program<Events extends object = {}> extends Subscribable<Progra
|
|
|
73
91
|
readonly logs: ProgramSql;
|
|
74
92
|
/** Writable SQLite database owned by this Program. */
|
|
75
93
|
readonly database: ProgramSql;
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
/** Returns the earliest-started live Process, or `null` when none exist. */
|
|
79
|
-
firstProcess(): Promise<Process | null>;
|
|
80
|
-
/** Returns the latest-started live Process, or `null` when none exist. */
|
|
81
|
-
lastProcess(): Promise<Process | null>;
|
|
82
|
-
/** Finds a live Process by identity or Program-local name. */
|
|
83
|
-
getProcess(identityOrName: string): Promise<Process | null>;
|
|
84
|
-
/** Creates one Process of this Program. */
|
|
85
|
-
createProcess(launch?: Launch): Promise<Process>;
|
|
94
|
+
/** Operations and lifecycle observation for this Program's Processes. */
|
|
95
|
+
readonly process: ProgramProcess;
|
|
86
96
|
/**
|
|
87
97
|
* Returns one standard PNG representation of this Program's icon.
|
|
88
98
|
* Programs without an authored icon receive the system default.
|
|
@@ -96,6 +106,4 @@ export interface Program<Events extends object = {}> extends Subscribable<Progra
|
|
|
96
106
|
uninstall(everything?: boolean): Promise<void>;
|
|
97
107
|
/** Ends all Processes and removes this Program from the runtime registry. */
|
|
98
108
|
forget(): Promise<void>;
|
|
99
|
-
/** Ends every live Process and returns their identities. */
|
|
100
|
-
exitAll(): Promise<string[]>;
|
|
101
109
|
}
|
package/dist/service.d.ts
CHANGED
|
@@ -26,6 +26,13 @@ export type ServiceLifecycleEvents = {
|
|
|
26
26
|
/** The providing Endpoint stopped exposing this service. */
|
|
27
27
|
disable: undefined;
|
|
28
28
|
};
|
|
29
|
+
/** Lifecycle transitions across the authoritative service registry. */
|
|
30
|
+
export type ServiceRegistryEvents = {
|
|
31
|
+
/** A service entered the enabled registry. */
|
|
32
|
+
enable: ServiceKey;
|
|
33
|
+
/** A service left the enabled registry. */
|
|
34
|
+
disable: ServiceKey;
|
|
35
|
+
};
|
|
29
36
|
/** Application events emitted by one service. */
|
|
30
37
|
export interface ServiceChannel<Events extends object = {}> extends Subscribable<Events, keyof Events extends never ? unknown : never> {
|
|
31
38
|
}
|
|
@@ -40,23 +47,20 @@ export declare class ServiceHandler<Channel extends object = ServiceChannel> {
|
|
|
40
47
|
protected constructor();
|
|
41
48
|
}
|
|
42
49
|
export interface ServiceHandler<Channel extends object = ServiceChannel> extends Subscribable<ServiceLifecycleEvents, never> {
|
|
43
|
-
/** Program namespace of this service. */
|
|
44
|
-
readonly program: string;
|
|
45
|
-
/** Endpoint kind represented by this service. */
|
|
46
|
-
readonly endpoint: "server" | "client";
|
|
47
50
|
/** Program-authored service identity. */
|
|
48
51
|
readonly name: string;
|
|
49
52
|
/** Application communication, separate from service lifecycle. */
|
|
50
53
|
readonly channel: Channel;
|
|
51
|
-
/**
|
|
52
|
-
|
|
54
|
+
/** Reads whether a live Endpoint currently provides this service. */
|
|
55
|
+
enabled(): Promise<boolean>;
|
|
56
|
+
/** Waits until a live Endpoint provides this service. */
|
|
57
|
+
waitReady(timeout?: number): Promise<void>;
|
|
53
58
|
}
|
|
54
59
|
/** Stable handle for one Server-provided service. */
|
|
55
60
|
export declare class ServerServiceHandler<Events extends object = {}> extends ServiceHandler<ServerServiceChannel<Events>> {
|
|
56
61
|
protected constructor();
|
|
57
62
|
}
|
|
58
63
|
export interface ServerServiceHandler<Events extends object = {}> {
|
|
59
|
-
readonly endpoint: "server";
|
|
60
64
|
readonly channel: ServerServiceChannel<Events>;
|
|
61
65
|
/** Explicitly reads this live Server service's documentation, or `null`. */
|
|
62
66
|
docs(): Promise<string | null>;
|
|
@@ -66,7 +70,6 @@ export declare class ClientServiceHandler<Events extends object = {}> extends Se
|
|
|
66
70
|
protected constructor();
|
|
67
71
|
}
|
|
68
72
|
export interface ClientServiceHandler<Events extends object = {}> {
|
|
69
|
-
readonly endpoint: "client";
|
|
70
73
|
readonly channel: ClientServiceChannel<Events>;
|
|
71
74
|
}
|
|
72
75
|
/** Returns whether a boundary value is a complete service key. */
|
package/dist/theme.d.ts
CHANGED
|
@@ -6,29 +6,28 @@ export type ThemeRange = Readonly<{
|
|
|
6
6
|
/** Largest accepted value. */
|
|
7
7
|
maximum: number;
|
|
8
8
|
}>;
|
|
9
|
-
/** Bounded controls for the shared glass material. */
|
|
10
|
-
export type ThemeGlass = Readonly<{
|
|
11
|
-
/** Default strength of the refracted backdrop. */
|
|
12
|
-
distortion: number;
|
|
13
|
-
/** Default backdrop blur in CSS pixels. */
|
|
14
|
-
blur: number;
|
|
15
|
-
/** Default backdrop saturation multiplier. */
|
|
16
|
-
saturation: number;
|
|
17
|
-
/** Default backdrop brightness multiplier. */
|
|
18
|
-
brightness: number;
|
|
19
|
-
/** Default material opacity from zero to the system's glass cap. */
|
|
20
|
-
opacity: number;
|
|
21
|
-
}>;
|
|
22
9
|
/** Concrete defaults for the shared opaque Surface material. */
|
|
23
10
|
export type ThemeSurface = Readonly<{
|
|
24
11
|
/** Grain intensity from zero to one. */
|
|
25
12
|
grain: number;
|
|
13
|
+
/** Fraction of deterministic grain cells retained from zero to one. */
|
|
14
|
+
grainAmount: number;
|
|
26
15
|
/** Grain texture changes per second. */
|
|
27
16
|
animation: number;
|
|
28
17
|
/** Optional backdrop blur in CSS pixels. */
|
|
29
18
|
backdrop: number;
|
|
30
19
|
/** Material opacity from zero to one. */
|
|
31
20
|
opacity: number;
|
|
21
|
+
/** Organic backdrop displacement in CSS pixels. */
|
|
22
|
+
distortion: number;
|
|
23
|
+
/** Directional-wave backdrop displacement in CSS pixels. */
|
|
24
|
+
waves: number;
|
|
25
|
+
/** Ripple backdrop displacement in CSS pixels. */
|
|
26
|
+
ripples: number;
|
|
27
|
+
/** Backdrop saturation multiplier, neutral at one. */
|
|
28
|
+
saturation: number;
|
|
29
|
+
/** Backdrop brightness multiplier, neutral at one. */
|
|
30
|
+
brightness: number;
|
|
32
31
|
}>;
|
|
33
32
|
/** The complete set of system-defined Theme properties. */
|
|
34
33
|
export type ThemeProperties = Readonly<{
|
|
@@ -42,8 +41,6 @@ export type ThemeProperties = Readonly<{
|
|
|
42
41
|
spacing: number;
|
|
43
42
|
/** Default component corner radius expressed in CSS pixels. */
|
|
44
43
|
radius: number;
|
|
45
|
-
/** Default values for the shared glass material. */
|
|
46
|
-
glass: ThemeGlass;
|
|
47
44
|
/** Default values for the shared opaque Surface material. */
|
|
48
45
|
surface: ThemeSurface;
|
|
49
46
|
}>;
|
|
@@ -57,33 +54,15 @@ export declare const themeLimits: Readonly<{
|
|
|
57
54
|
minimum: 6;
|
|
58
55
|
maximum: 18;
|
|
59
56
|
}>;
|
|
60
|
-
glass: Readonly<{
|
|
61
|
-
distortion: Readonly<{
|
|
62
|
-
minimum: 48;
|
|
63
|
-
maximum: 92;
|
|
64
|
-
}>;
|
|
65
|
-
blur: Readonly<{
|
|
66
|
-
minimum: 2;
|
|
67
|
-
maximum: 8;
|
|
68
|
-
}>;
|
|
69
|
-
saturation: Readonly<{
|
|
70
|
-
minimum: 1.25;
|
|
71
|
-
maximum: 1.8;
|
|
72
|
-
}>;
|
|
73
|
-
brightness: Readonly<{
|
|
74
|
-
minimum: 1.02;
|
|
75
|
-
maximum: 1.1;
|
|
76
|
-
}>;
|
|
77
|
-
opacity: Readonly<{
|
|
78
|
-
minimum: 0;
|
|
79
|
-
maximum: 0.3;
|
|
80
|
-
}>;
|
|
81
|
-
}>;
|
|
82
57
|
surface: Readonly<{
|
|
83
58
|
grain: Readonly<{
|
|
84
59
|
minimum: 0;
|
|
85
60
|
maximum: 1;
|
|
86
61
|
}>;
|
|
62
|
+
grainAmount: Readonly<{
|
|
63
|
+
minimum: 0;
|
|
64
|
+
maximum: 1;
|
|
65
|
+
}>;
|
|
87
66
|
animation: Readonly<{
|
|
88
67
|
minimum: 0;
|
|
89
68
|
maximum: 16;
|
|
@@ -96,6 +75,26 @@ export declare const themeLimits: Readonly<{
|
|
|
96
75
|
minimum: 0;
|
|
97
76
|
maximum: 1;
|
|
98
77
|
}>;
|
|
78
|
+
distortion: Readonly<{
|
|
79
|
+
minimum: 0;
|
|
80
|
+
maximum: 140;
|
|
81
|
+
}>;
|
|
82
|
+
waves: Readonly<{
|
|
83
|
+
minimum: 0;
|
|
84
|
+
maximum: 40;
|
|
85
|
+
}>;
|
|
86
|
+
ripples: Readonly<{
|
|
87
|
+
minimum: 0;
|
|
88
|
+
maximum: 40;
|
|
89
|
+
}>;
|
|
90
|
+
saturation: Readonly<{
|
|
91
|
+
minimum: 1;
|
|
92
|
+
maximum: 2.6;
|
|
93
|
+
}>;
|
|
94
|
+
brightness: Readonly<{
|
|
95
|
+
minimum: 1;
|
|
96
|
+
maximum: 1.12;
|
|
97
|
+
}>;
|
|
99
98
|
}>;
|
|
100
99
|
}>;
|
|
101
100
|
/** Complete standard Theme available to every environment. */
|
|
@@ -110,8 +109,6 @@ export declare const standardTheme: Readonly<{
|
|
|
110
109
|
spacing: number;
|
|
111
110
|
/** Default component corner radius expressed in CSS pixels. */
|
|
112
111
|
radius: number;
|
|
113
|
-
/** Default values for the shared glass material. */
|
|
114
|
-
glass: ThemeGlass;
|
|
115
112
|
/** Default values for the shared opaque Surface material. */
|
|
116
113
|
surface: ThemeSurface;
|
|
117
114
|
}>;
|
package/dist/theme.js
CHANGED
|
@@ -2,46 +2,43 @@
|
|
|
2
2
|
export const themeLimits = Object.freeze({
|
|
3
3
|
spacing: Object.freeze({ minimum: 6, maximum: 18 }),
|
|
4
4
|
radius: Object.freeze({ minimum: 6, maximum: 18 }),
|
|
5
|
-
glass: Object.freeze({
|
|
6
|
-
distortion: Object.freeze({ minimum: 48, maximum: 92 }),
|
|
7
|
-
blur: Object.freeze({ minimum: 2, maximum: 8 }),
|
|
8
|
-
saturation: Object.freeze({ minimum: 1.25, maximum: 1.8 }),
|
|
9
|
-
brightness: Object.freeze({ minimum: 1.02, maximum: 1.1 }),
|
|
10
|
-
opacity: Object.freeze({ minimum: 0, maximum: 0.3 })
|
|
11
|
-
}),
|
|
12
5
|
surface: Object.freeze({
|
|
13
6
|
grain: Object.freeze({ minimum: 0, maximum: 1 }),
|
|
7
|
+
grainAmount: Object.freeze({ minimum: 0, maximum: 1 }),
|
|
14
8
|
animation: Object.freeze({ minimum: 0, maximum: 16 }),
|
|
15
9
|
backdrop: Object.freeze({ minimum: 0, maximum: 24 }),
|
|
16
|
-
opacity: Object.freeze({ minimum: 0, maximum: 1 })
|
|
10
|
+
opacity: Object.freeze({ minimum: 0, maximum: 1 }),
|
|
11
|
+
distortion: Object.freeze({ minimum: 0, maximum: 140 }),
|
|
12
|
+
waves: Object.freeze({ minimum: 0, maximum: 40 }),
|
|
13
|
+
ripples: Object.freeze({ minimum: 0, maximum: 40 }),
|
|
14
|
+
saturation: Object.freeze({ minimum: 1, maximum: 2.6 }),
|
|
15
|
+
brightness: Object.freeze({ minimum: 1, maximum: 1.12 })
|
|
17
16
|
})
|
|
18
17
|
});
|
|
19
18
|
/** Complete standard Theme available to every environment. */
|
|
20
19
|
export const standardTheme = createThemeSnapshot({
|
|
21
|
-
background: "#
|
|
20
|
+
background: "#fffff5",
|
|
22
21
|
foreground: "#183447",
|
|
23
22
|
accent: "#4c9cff",
|
|
24
23
|
spacing: 12,
|
|
25
24
|
radius: 10,
|
|
26
|
-
glass: {
|
|
27
|
-
distortion: 70,
|
|
28
|
-
blur: 4,
|
|
29
|
-
saturation: 1.8,
|
|
30
|
-
brightness: 1.06,
|
|
31
|
-
opacity: 0.12
|
|
32
|
-
},
|
|
33
25
|
surface: {
|
|
34
|
-
grain: 0
|
|
26
|
+
grain: 0,
|
|
27
|
+
grainAmount: 0,
|
|
35
28
|
animation: 0,
|
|
36
29
|
backdrop: 0,
|
|
37
|
-
opacity: 1
|
|
30
|
+
opacity: 1,
|
|
31
|
+
distortion: 0,
|
|
32
|
+
waves: 0,
|
|
33
|
+
ripples: 0,
|
|
34
|
+
saturation: 1,
|
|
35
|
+
brightness: 1
|
|
38
36
|
}
|
|
39
37
|
});
|
|
40
38
|
/** Creates a complete immutable Theme snapshot at the contract boundary. */
|
|
41
39
|
export function createThemeSnapshot(theme) {
|
|
42
40
|
return Object.freeze({
|
|
43
41
|
...theme,
|
|
44
|
-
glass: Object.freeze({ ...theme.glass }),
|
|
45
42
|
surface: Object.freeze({ ...theme.surface })
|
|
46
43
|
});
|
|
47
44
|
}
|