@astryxdesign/cli 0.7.17 → 0.7.18-canary.g6dfc0b6
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 +1 -1
- package/api/discover/_adapter.d.mts +7 -5
- package/api/discover/_adapter.mjs +12 -11
- package/api/doctor/_adapter.d.mts +11 -62
- package/api/doctor/_adapter.mjs +242 -472
- package/api/doctor/doctor.d.mts +1 -1
- package/api/doctor/doctor.mjs +1 -1
- package/api/doctor/theme-checks.mjs +37 -45
- package/api/error.d.mts +21 -0
- package/api/error.mjs +89 -0
- package/api/hook/list/list.d.mts +1 -1
- package/api/icon/icon.doc.mjs +1 -1
- package/api/icon/icon.type.mjs +1 -1
- package/api/icon/search/search.d.mts +4 -1
- package/api/icon/search/search.mjs +41 -4
- package/api/render/_adapter.mjs +233 -40
- package/api/render/render.type.d.mts +1 -1
- package/api/render/render.type.mjs +1 -1
- package/api/search/ORDERING.md +2 -2
- package/api/search/_candidate-score.mjs +32 -8
- package/api/search/_cards.json +1 -1
- package/api/search/_compound.d.mts +0 -1
- package/api/search/_compound.mjs +93 -2
- package/api/search/_lexical.mjs +177 -17
- package/api/search/_order.d.mts +3 -1
- package/api/search/_order.mjs +16 -5
- package/api/search/_result.d.mts +9 -0
- package/api/search/_result.mjs +10 -0
- package/api/search/_score.mjs +21 -3
- package/api/swizzle/_moduleGraph.d.mts +8 -0
- package/api/swizzle/_moduleGraph.mjs +61 -3
- package/api/template/copy/copy.mjs +5 -3
- package/api/theme/_adapter.mjs +48 -12
- package/api/theme/build/build.d.mts +4 -0
- package/api/theme/build/build.mjs +69 -18
- package/api/theme/build/style-keys.mjs +4 -5
- package/api/theme/build/theme-object.mjs +5 -0
- package/api/theme/palette/generate/color.d.mts +47 -0
- package/api/theme/palette/generate/color.mjs +58 -1
- package/api/theme/palette/generate/derive-look.d.mts +293 -0
- package/api/theme/palette/generate/derive-look.mjs +1362 -0
- package/api/theme/palette/generate/editor-look.d.mts +62 -0
- package/api/theme/palette/generate/editor-look.mjs +550 -0
- package/api/theme/palette/generate/mapping.d.mts +94 -9
- package/api/theme/palette/generate/mapping.mjs +94 -22
- package/api/theme-edit/_adapter.mjs +10 -1
- package/api/theme-edit/_catalog.d.mts +13 -13
- package/api/theme-edit/_catalog.mjs +38 -16
- package/api/theme-edit/_check.d.mts +82 -6
- package/api/theme-edit/_check.mjs +1230 -223
- package/api/theme-edit/_color.d.mts +74 -0
- package/api/theme-edit/_color.mjs +168 -3
- package/api/theme-edit/_compiler.d.mts +3 -5
- package/api/theme-edit/_compiler.mjs +122 -23
- package/api/theme-edit/_context.d.mts +46 -5
- package/api/theme-edit/_context.mjs +97 -49
- package/api/theme-edit/_css.d.mts +11 -0
- package/api/theme-edit/_css.mjs +40 -0
- package/api/theme-edit/_edit.d.mts +13 -0
- package/api/theme-edit/_edit.mjs +1450 -128
- package/api/theme-edit/_how-commands.d.mts +12 -0
- package/api/theme-edit/_how-commands.mjs +96 -14
- package/api/theme-edit/_how-question.d.mts +73 -29
- package/api/theme-edit/_how-question.mjs +8131 -1209
- package/api/theme-edit/_how-sides.d.mts +22 -0
- package/api/theme-edit/_how-sides.mjs +173 -0
- package/api/theme-edit/_how-steps.d.mts +42 -0
- package/api/theme-edit/_how-steps.mjs +208 -0
- package/api/theme-edit/_how-values.d.mts +29 -0
- package/api/theme-edit/_how-values.mjs +111 -0
- package/api/theme-edit/_how-words.d.mts +15 -0
- package/api/theme-edit/_how-words.mjs +239 -0
- package/api/theme-edit/_how.d.mts +1 -1
- package/api/theme-edit/_how.mjs +412 -37
- package/api/theme-edit/_missed.d.mts +2 -1
- package/api/theme-edit/_missed.mjs +125 -13
- package/api/theme-edit/_normal.d.mts +5 -3
- package/api/theme-edit/_normal.mjs +54 -14
- package/api/theme-edit/_palette.d.mts +204 -4
- package/api/theme-edit/_palette.mjs +901 -25
- package/api/theme-edit/_part-pieces.d.mts +54 -0
- package/api/theme-edit/_part-pieces.mjs +179 -0
- package/api/theme-edit/_part-words.mjs +33 -5
- package/api/theme-edit/_parts.d.mts +133 -0
- package/api/theme-edit/_parts.mjs +599 -10
- package/api/theme-edit/_picture-traits.d.mts +259 -0
- package/api/theme-edit/_picture-traits.mjs +1030 -0
- package/api/theme-edit/_preview.d.mts +84 -4
- package/api/theme-edit/_preview.mjs +260 -24
- package/api/theme-edit/_project.d.mts +14 -4
- package/api/theme-edit/_project.mjs +95 -26
- package/api/theme-edit/_set-line.d.mts +29 -0
- package/api/theme-edit/_set-line.mjs +100 -0
- package/api/theme-edit/_settings.d.mts +625 -28
- package/api/theme-edit/_settings.mjs +4587 -880
- package/api/theme-edit/_tables.d.mts +25 -1
- package/api/theme-edit/_tables.mjs +115 -11
- package/api/theme-edit/_text-looks.d.mts +78 -0
- package/api/theme-edit/_text-looks.mjs +376 -0
- package/api/theme-edit/_vet.d.mts +3 -26
- package/api/theme-edit/_vet.mjs +5 -89
- package/api/theme-edit/how/how.d.mts +1 -1
- package/api/theme-edit/how/how.mjs +1 -1
- package/api/theme-edit/theme-edit.type.d.mts +54 -1
- package/api/theme-edit/theme-edit.type.mjs +17 -2
- package/api/theme-edit/themeEditHow.doc.mjs +3 -3
- package/api/theme-edit/themeEditNew.doc.mjs +4 -0
- package/api/theme-edit/themeEditSet.doc.mjs +6 -2
- package/api/theme-edit/themeEditShow.doc.mjs +4 -0
- package/api/theme-edit/themeEditUndo.doc.mjs +4 -0
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/author-a-theme.doc.mjs +7 -4
- package/assets/docs/tree/export-pages.doc.mjs +1 -1
- package/assets/docs/tree/icon-sets.doc.mjs +1 -1
- package/assets/docs/use-a-theme.doc.mjs +89 -17
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/definitions/article.doc.mjs +9 -0
- package/assets/icons/template-icons.json +5 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Citation/CitationInlineText.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationInlineText.tsx +3 -1
- package/assets/templates/blocks/components/Citation/CitationShowcase.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationShowcase.tsx +3 -1
- package/assets/templates/blocks/components/Citation/CitationSourceList.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationSourceList.tsx +7 -3
- package/assets/templates/blocks/components/Markdown/MarkdownCitedContent.doc.mjs +1 -1
- package/assets/templates/blocks/components/Markdown/MarkdownCitedContent.tsx +5 -2
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ide/page.tsx +5 -10
- package/assets/templates/pages/payment-form/page.tsx +16 -60
- package/assets/templates/themes/neutral/neutralTheme.ts +4 -3
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/_schema.d.mts +13 -13
- package/authoring/gap-report/parse.d.mts +1 -1
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/ensure-core-built.mjs +17 -10
- package/clients/cli/commands/experimental/theme.mjs +46 -6
- package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +11 -3
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
- package/clients/cli/commands/hook.mjs +7 -0
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/index.mjs +6 -2
- package/clients/cli/lib/hook-format.mjs +41 -1
- package/clients/cli/lib/json-shim.mjs +34 -14
- package/clients/cli/lib/other-cli-words.mjs +7 -0
- package/clients/cli/lib/unknown-command.mjs +345 -46
- package/clients/cli/manifest.generated.json +1 -1
- package/foundation/agent-docs/agent-docs.d.mts +11 -2
- package/foundation/agent-docs/agent-docs.mjs +51 -8
- package/foundation/config/project.d.mts +11 -1
- package/foundation/config/project.mjs +11 -2
- package/foundation/discovery/component-replacement.d.mts +5 -8
- package/foundation/discovery/component-replacement.mjs +12 -14
- package/foundation/discovery/core-augmentation-points.d.mts +35 -0
- package/foundation/discovery/core-augmentation-points.mjs +410 -9
- package/foundation/discovery/core-elements.d.mts +6 -0
- package/foundation/discovery/core-elements.mjs +10 -2
- package/foundation/discovery/core-prop-types.d.mts +5 -0
- package/foundation/discovery/core-prop-types.mjs +10 -3
- package/foundation/discovery/core-props.d.mts +8 -0
- package/foundation/discovery/core-props.mjs +29 -13
- package/foundation/discovery/official-list.d.mts +17 -0
- package/foundation/discovery/official-list.mjs +77 -0
- package/foundation/discovery/unknown-core-props.d.mts +130 -0
- package/foundation/discovery/unknown-core-props.mjs +601 -0
- package/foundation/discovery/written-prop-values.d.mts +35 -0
- package/foundation/discovery/written-prop-values.mjs +258 -0
- package/foundation/fonts/fontsource-families.generated.d.mts +5 -0
- package/foundation/fonts/fontsource-families.generated.mjs +2110 -0
- package/foundation/fs/package-name.d.mts +10 -0
- package/foundation/fs/package-name.mjs +37 -0
- package/foundation/fs/project-source-files.d.mts +27 -0
- package/foundation/fs/project-source-files.mjs +115 -0
- package/foundation/fs/project-sources.d.mts +25 -0
- package/foundation/fs/project-sources.mjs +83 -0
- package/foundation/fs/read-record.d.mts +18 -0
- package/foundation/fs/read-record.mjs +36 -2
- package/foundation/integrations/integration-warnings.d.mts +39 -7
- package/foundation/integrations/integration-warnings.mjs +141 -19
- package/foundation/integrations/missing-dependency.d.mts +11 -0
- package/foundation/integrations/missing-dependency.mjs +20 -5
- package/foundation/release/folder-lock.d.mts +5 -2
- package/foundation/release/folder-lock.mjs +9 -3
- package/foundation/release/notices.mjs +2 -8
- package/foundation/render/cut-short.d.mts +8 -2
- package/foundation/render/cut-short.mjs +50 -5
- package/foundation/render/drawn-contrast.d.mts +38 -0
- package/foundation/render/drawn-contrast.mjs +237 -0
- package/foundation/render/file-header.mjs +4 -0
- package/foundation/render/layers.d.mts +2 -1
- package/foundation/render/layers.mjs +22 -1
- package/foundation/render/page-worker.mjs +83 -18
- package/foundation/render/part-boxes.d.mts +27 -0
- package/foundation/render/part-boxes.mjs +45 -0
- package/foundation/render/picture-chrome.mjs +36 -4
- package/foundation/render/picture-playwright.mjs +26 -2
- package/foundation/render/picture-window.d.mts +29 -2
- package/foundation/render/picture-window.mjs +99 -1
- package/foundation/render/render-page.d.mts +39 -6
- package/foundation/render/render-page.mjs +26 -10
- package/foundation/render/ts-paths.mjs +2 -1
- package/foundation/response/error-codes.doc.mjs +1 -1
- package/foundation/response/error-codes.mjs +1 -1
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/text/written-string.d.mts +4 -1
- package/foundation/text/written-string.mjs +4 -1
- package/package.json +8 -7
|
@@ -15,14 +15,6 @@ export function sameColor(a: unknown, b: unknown): boolean;
|
|
|
15
15
|
* @returns {number}
|
|
16
16
|
*/
|
|
17
17
|
export function ratio(a: ReadonlyArray<number>, b: ReadonlyArray<number>): number;
|
|
18
|
-
/**
|
|
19
|
-
* A color drawn at `alpha` over `under`, as the opaque color the eye sees.
|
|
20
|
-
* @param {ReadonlyArray<number>} over
|
|
21
|
-
* @param {number} alpha
|
|
22
|
-
* @param {ReadonlyArray<number>} under
|
|
23
|
-
* @returns {ColorTriple}
|
|
24
|
-
*/
|
|
25
|
-
export function compositeOver(over: ReadonlyArray<number>, alpha: number, under: ReadonlyArray<number>): ColorTriple;
|
|
26
18
|
/**
|
|
27
19
|
* The stop of a ramp whose shade is nearest a color, as the eye compares
|
|
28
20
|
* them; never an end stop (pure black or white, which every ramp shares).
|
|
@@ -74,6 +66,7 @@ export function paletteTools(candidate: TonalPaletteCandidate, context: PaletteM
|
|
|
74
66
|
at: (n: number) => number;
|
|
75
67
|
atInside: (n: number) => number;
|
|
76
68
|
ref: (id: string, m: PaletteMode, stop: number, alpha?: string) => StopRef;
|
|
69
|
+
colorIn: (value: string | undefined, m: PaletteMode) => string | null;
|
|
77
70
|
exactOf: (token: string, m: PaletteMode) => string | null;
|
|
78
71
|
settingOf: (token: string, m: PaletteMode) => string | undefined;
|
|
79
72
|
rawOf: (token: string, m: PaletteMode) => string | null;
|
|
@@ -87,6 +80,7 @@ export function paletteTools(candidate: TonalPaletteCandidate, context: PaletteM
|
|
|
87
80
|
otherR: number;
|
|
88
81
|
first: StopRef;
|
|
89
82
|
};
|
|
83
|
+
onChoices: (id: string, m: PaletteMode) => StopRef[];
|
|
90
84
|
page: (color: string, m: PaletteMode, id: string) => number;
|
|
91
85
|
neutral: boolean;
|
|
92
86
|
contrast: (a: string, b: string) => number;
|
|
@@ -168,6 +162,7 @@ export function mapPalette(candidate: TonalPaletteCandidate, dials: ReadonlyArra
|
|
|
168
162
|
* @returns {string[]}
|
|
169
163
|
*/
|
|
170
164
|
export function splitTopComma(value: string): string[];
|
|
165
|
+
export { compositeOver };
|
|
171
166
|
/** The color settings. Each one is a palette family of the same id. */
|
|
172
167
|
export const PALETTE_DIALS: readonly string[];
|
|
173
168
|
/** The generator's vibrancy when the theme sets none. */
|
|
@@ -258,12 +253,19 @@ export const ON_FILL: Record<PaletteMode, [number, number]>;
|
|
|
258
253
|
export const TOWARD_CONTRAST: Record<PaletteMode, 1 | -1>;
|
|
259
254
|
export function isGray(seed: string): boolean;
|
|
260
255
|
export function hex(rgb: ReadonlyArray<number>): string;
|
|
261
|
-
|
|
256
|
+
/** A ratio cut down to two decimals, never rounded up past a need. */
|
|
257
|
+
export const round: typeof ratioDown;
|
|
262
258
|
export function shade(s: number): string;
|
|
263
259
|
export function textName(r: StopRef): string;
|
|
264
260
|
export function fillAt(stop: number): PaletteFill;
|
|
261
|
+
export function isLookToken(token: string): boolean;
|
|
262
|
+
/** The text roles a rule block can set for what it draws. */
|
|
263
|
+
export const TEXT_PROPS: string[];
|
|
264
|
+
export function round2(n: number): number;
|
|
265
265
|
export type TonalPaletteCandidate = import("./types.mjs").TonalPaletteCandidate;
|
|
266
266
|
export type TonalPaletteGenerationInput = import("./types.mjs").TonalPaletteGenerationInput;
|
|
267
|
+
export type EditorLookResult = import("./editor-look.mjs").EditorLookResult;
|
|
268
|
+
export type PaletteEditorRules = import("./editor-look.mjs").PaletteEditorRules;
|
|
267
269
|
export type PaletteMode = "light" | "dark";
|
|
268
270
|
export type ColorTriple = [number, number, number];
|
|
269
271
|
/**
|
|
@@ -287,6 +289,10 @@ export type StopRef = {
|
|
|
287
289
|
* The stop holds the seed's exact color (an exact anchor).
|
|
288
290
|
*/
|
|
289
291
|
exact?: boolean | undefined;
|
|
292
|
+
/**
|
|
293
|
+
* The half is the base theme's own value in that mode (family `literal`): the generated module reads it from the base, so the mode follows the base theme.
|
|
294
|
+
*/
|
|
295
|
+
base?: boolean | undefined;
|
|
290
296
|
};
|
|
291
297
|
/**
|
|
292
298
|
* One contrast check behind a stop choice.
|
|
@@ -358,10 +364,18 @@ export type PaletteBase = {
|
|
|
358
364
|
*/
|
|
359
365
|
export type PaletteMappingContext = {
|
|
360
366
|
base?: PaletteBase | undefined;
|
|
367
|
+
/**
|
|
368
|
+
* * The theme editor's own rules, beyond `themePalette()`'s mapping: the colors a look grows (category and chart colors, the status roles a theme leaves unset, code colors) and a base theme's own pairs kept readable for those colors. They never change a token `themePalette()` maps. The editor passes its own rules module (editor-look) here, so an app that imports only `themePalette()` ships none of them.
|
|
369
|
+
*/
|
|
370
|
+
editor?: import("./editor-look.mjs").PaletteEditorRules | undefined;
|
|
361
371
|
/**
|
|
362
372
|
* Whether a token exists, so the mapping sets it.
|
|
363
373
|
*/
|
|
364
374
|
has: (token: string) => boolean;
|
|
375
|
+
/**
|
|
376
|
+
* Core's default value of each token, as written: a token the official theme leaves to Core follows the family at Core's lightness.
|
|
377
|
+
*/
|
|
378
|
+
defaults?: Readonly<Record<string, unknown>> | undefined;
|
|
365
379
|
reader: PaletteColorReader;
|
|
366
380
|
/**
|
|
367
381
|
* The value a token is set to exactly in a mode, as written.
|
|
@@ -379,6 +393,10 @@ export type PaletteMappingContext = {
|
|
|
379
393
|
* The line that sets a value, for a note that offers one; without it, the note offers none.
|
|
380
394
|
*/
|
|
381
395
|
setLine?: ((thing: string, value: string, mode?: PaletteMode) => string) | undefined;
|
|
396
|
+
/**
|
|
397
|
+
* The modes the theme shows: the derived colors' notes name only these.
|
|
398
|
+
*/
|
|
399
|
+
shown?: readonly PaletteMode[] | undefined;
|
|
382
400
|
};
|
|
383
401
|
/**
|
|
384
402
|
* One color setting: a palette family of the same id.
|
|
@@ -386,12 +404,20 @@ export type PaletteMappingContext = {
|
|
|
386
404
|
export type PaletteDial = {
|
|
387
405
|
id: string;
|
|
388
406
|
seed: string;
|
|
407
|
+
/**
|
|
408
|
+
* Set for one mode only (an accent token): the editor keeps the other mode as it was.
|
|
409
|
+
*/
|
|
410
|
+
only?: PaletteMode | undefined;
|
|
389
411
|
};
|
|
390
412
|
/**
|
|
391
413
|
* A family of a palette config: the generator's family input, and any key of the author's.
|
|
392
414
|
*/
|
|
393
415
|
export type ConfigFamily = {
|
|
394
416
|
id?: unknown;
|
|
417
|
+
/**
|
|
418
|
+
* The family's name, as a look's own family carries it.
|
|
419
|
+
*/
|
|
420
|
+
name?: unknown;
|
|
395
421
|
seed?: unknown;
|
|
396
422
|
anchors?: {
|
|
397
423
|
[key: string]: unknown;
|
|
@@ -427,6 +453,50 @@ export type PaletteMapping = {
|
|
|
427
453
|
* Lifted secondary text per background token of LIFT_PARTS, per mode; null without one.
|
|
428
454
|
*/
|
|
429
455
|
lift: Record<string, Partial<Record<PaletteMode, StopRef>>> | null;
|
|
456
|
+
/**
|
|
457
|
+
* Status fills someone red-weak or green-weak may not tell apart.
|
|
458
|
+
*/
|
|
459
|
+
cvd: {
|
|
460
|
+
a: string;
|
|
461
|
+
b: string;
|
|
462
|
+
vision: "red-weak" | "green-weak";
|
|
463
|
+
mode: PaletteMode;
|
|
464
|
+
colors: [string, string];
|
|
465
|
+
page?: string;
|
|
466
|
+
pages?: string[];
|
|
467
|
+
}[];
|
|
468
|
+
/**
|
|
469
|
+
* The code colors that keep the base theme's because none of their family's stops reads on the code background and the page.
|
|
470
|
+
*/
|
|
471
|
+
code: string[];
|
|
472
|
+
/**
|
|
473
|
+
* The look's colors kept at the base theme's in a mode, because a text/fill pair the base theme draws with them would not read.
|
|
474
|
+
*/
|
|
475
|
+
kept: {
|
|
476
|
+
token: string;
|
|
477
|
+
mode: PaletteMode;
|
|
478
|
+
pair: BasePair;
|
|
479
|
+
ratio: number;
|
|
480
|
+
}[];
|
|
481
|
+
/**
|
|
482
|
+
* The status roles the theme leaves unset, each derived from the look, what they gave up to stay written, and the roles that gave something up.
|
|
483
|
+
*/
|
|
484
|
+
statuses: {
|
|
485
|
+
roles: Record<string, "derived">;
|
|
486
|
+
why: string[];
|
|
487
|
+
short: string[];
|
|
488
|
+
};
|
|
489
|
+
/**
|
|
490
|
+
* Whether the category colors (Badge, Token, Card tints) and the chart colors follow the look, and what they gave up to stay written.
|
|
491
|
+
*/
|
|
492
|
+
categories: {
|
|
493
|
+
badges: "derived" | "none";
|
|
494
|
+
chart: "derived" | "none";
|
|
495
|
+
limits: string[];
|
|
496
|
+
moved: string[];
|
|
497
|
+
alike: boolean;
|
|
498
|
+
unread: boolean;
|
|
499
|
+
};
|
|
430
500
|
};
|
|
431
501
|
export type TableEntry = object | string | number | boolean | null | undefined;
|
|
432
502
|
export type PaletteTools = ReturnType<typeof paletteTools>;
|
|
@@ -454,3 +524,18 @@ export type PalettePlan = {
|
|
|
454
524
|
};
|
|
455
525
|
fills: Record<string, PaletteFill>;
|
|
456
526
|
};
|
|
527
|
+
export type BasePair = {
|
|
528
|
+
kind: "category";
|
|
529
|
+
hue: string;
|
|
530
|
+
} | {
|
|
531
|
+
kind: "status";
|
|
532
|
+
role: string;
|
|
533
|
+
tint: boolean;
|
|
534
|
+
} | {
|
|
535
|
+
kind: "part";
|
|
536
|
+
part: string;
|
|
537
|
+
block: string;
|
|
538
|
+
prop: string;
|
|
539
|
+
};
|
|
540
|
+
import { compositeOver } from './color.mjs';
|
|
541
|
+
import { ratioDown } from './color.mjs';
|
|
@@ -12,7 +12,14 @@
|
|
|
12
12
|
* settings. `themePalette()` runs it, and the CLI theme editor runs its
|
|
13
13
|
* generated copy
|
|
14
14
|
*/
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
compositeOver,
|
|
17
|
+
contrastRatio,
|
|
18
|
+
hexToOklch,
|
|
19
|
+
normalizeColor,
|
|
20
|
+
ratioDown,
|
|
21
|
+
} from './color.mjs';
|
|
22
|
+
export {compositeOver};
|
|
16
23
|
import {
|
|
17
24
|
PALETTE_BLACK,
|
|
18
25
|
PALETTE_WHITE,
|
|
@@ -24,6 +31,10 @@ import {
|
|
|
24
31
|
|
|
25
32
|
/** @typedef {import('./types.mjs').TonalPaletteGenerationInput} TonalPaletteGenerationInput */
|
|
26
33
|
|
|
34
|
+
/** @typedef {import('./editor-look.mjs').EditorLookResult} EditorLookResult */
|
|
35
|
+
|
|
36
|
+
/** @typedef {import('./editor-look.mjs').PaletteEditorRules} PaletteEditorRules */
|
|
37
|
+
|
|
27
38
|
/** @typedef {'light' | 'dark'} PaletteMode */
|
|
28
39
|
|
|
29
40
|
/** @typedef {[number, number, number]} ColorTriple */
|
|
@@ -36,6 +47,7 @@ import {
|
|
|
36
47
|
* @property {string} [alpha] Two hex digits of opacity.
|
|
37
48
|
* @property {string} [family] The family the stop is from when it is not the token's own: `neutral` for text on a fill, `black` or `white` for the palette's own ends, `literal` for a color outside the palette.
|
|
38
49
|
* @property {boolean} [exact] The stop holds the seed's exact color (an exact anchor).
|
|
50
|
+
* @property {boolean} [base] The half is the base theme's own value in that mode (family `literal`): the generated module reads it from the base, so the mode follows the base theme.
|
|
39
51
|
*/
|
|
40
52
|
|
|
41
53
|
/**
|
|
@@ -82,12 +94,15 @@ import {
|
|
|
82
94
|
* What the mapping reads around the palette.
|
|
83
95
|
* @typedef {object} PaletteMappingContext
|
|
84
96
|
* @property {PaletteBase} [base]
|
|
97
|
+
* @property {PaletteEditorRules} [editor] * The theme editor's own rules, beyond `themePalette()`'s mapping: the colors a look grows (category and chart colors, the status roles a theme leaves unset, code colors) and a base theme's own pairs kept readable for those colors. They never change a token `themePalette()` maps. The editor passes its own rules module (editor-look) here, so an app that imports only `themePalette()` ships none of them.
|
|
85
98
|
* @property {(token: string) => boolean} has Whether a token exists, so the mapping sets it.
|
|
99
|
+
* @property {Readonly<Record<string, unknown>>} [defaults] Core's default value of each token, as written: a token the official theme leaves to Core follows the family at Core's lightness.
|
|
86
100
|
* @property {PaletteColorReader} reader
|
|
87
101
|
* @property {(token: string, mode: PaletteMode) => string | undefined} [settingOf] The value a token is set to exactly in a mode, as written.
|
|
88
102
|
* @property {(value: string, mode: PaletteMode) => string | null} [colorIn] The fixed color a written value gives in a mode, or null.
|
|
89
103
|
* @property {(token: string) => boolean} [setExactly] Whether a token is set exactly in any mode.
|
|
90
104
|
* @property {(thing: string, value: string, mode?: PaletteMode) => string} [setLine] The line that sets a value, for a note that offers one; without it, the note offers none.
|
|
105
|
+
* @property {ReadonlyArray<PaletteMode>} [shown] The modes the theme shows: the derived colors' notes name only these.
|
|
91
106
|
*/
|
|
92
107
|
|
|
93
108
|
/**
|
|
@@ -95,12 +110,14 @@ import {
|
|
|
95
110
|
* @typedef {object} PaletteDial
|
|
96
111
|
* @property {string} id
|
|
97
112
|
* @property {string} seed
|
|
113
|
+
* @property {PaletteMode} [only] Set for one mode only (an accent token): the editor keeps the other mode as it was.
|
|
98
114
|
*/
|
|
99
115
|
|
|
100
116
|
/**
|
|
101
117
|
* A family of a palette config: the generator's family input, and any key of the author's.
|
|
102
118
|
* @typedef {object} ConfigFamily
|
|
103
119
|
* @property {unknown} [id]
|
|
120
|
+
* @property {unknown} [name] The family's name, as a look's own family carries it.
|
|
104
121
|
* @property {unknown} [seed]
|
|
105
122
|
* @property {{mode: string; stop: number; [key: string]: unknown}[]} [anchors]
|
|
106
123
|
*/
|
|
@@ -119,6 +136,11 @@ import {
|
|
|
119
136
|
* @property {Record<string, Partial<Record<PaletteMode, string>>>} exact Main tokens set exactly, per mode: the color's fill gives way to them.
|
|
120
137
|
* @property {Record<string, string>} unread Main tokens set exactly to a value that is not one readable color in some mode, as written.
|
|
121
138
|
* @property {Record<string, Partial<Record<PaletteMode, StopRef>>> | null} lift Lifted secondary text per background token of LIFT_PARTS, per mode; null without one.
|
|
139
|
+
* @property {{ a: string; b: string; vision: 'red-weak' | 'green-weak'; mode: PaletteMode; colors: [string, string]; page?: string; pages?: string[]; }[]} cvd Status fills someone red-weak or green-weak may not tell apart.
|
|
140
|
+
* @property {string[]} code The code colors that keep the base theme's because none of their family's stops reads on the code background and the page.
|
|
141
|
+
* @property {{token: string; mode: PaletteMode; pair: BasePair; ratio: number}[]} kept The look's colors kept at the base theme's in a mode, because a text/fill pair the base theme draws with them would not read.
|
|
142
|
+
* @property {{ roles: Record<string, 'derived'>; why: string[]; short: string[]; }} statuses The status roles the theme leaves unset, each derived from the look, what they gave up to stay written, and the roles that gave something up.
|
|
143
|
+
* @property {{ badges: 'derived' | 'none'; chart: 'derived' | 'none'; limits: string[]; moved: string[]; alike: boolean; unread: boolean; }} categories Whether the category colors (Badge, Token, Card tints) and the chart colors follow the look, and what they gave up to stay written.
|
|
122
144
|
*/
|
|
123
145
|
|
|
124
146
|
/** A value a mapping table holds. */
|
|
@@ -136,6 +158,13 @@ import {
|
|
|
136
158
|
* @property {Record<string, PaletteFill>} fills
|
|
137
159
|
*/
|
|
138
160
|
|
|
161
|
+
/**
|
|
162
|
+
* A text/fill pair a base theme draws: a category's text on its fill, a
|
|
163
|
+
* status's text on its fill or its tint, or the text a part's rule block
|
|
164
|
+
* sets on its fill. The editor words it.
|
|
165
|
+
*/
|
|
166
|
+
/** @typedef {| {kind: 'category'; hue: string} | {kind: 'status'; role: string; tint: boolean} | {kind: 'part'; part: string; block: string; prop: string}} BasePair */
|
|
167
|
+
|
|
139
168
|
/**
|
|
140
169
|
* A palette config as the generator's request. The generator checks every
|
|
141
170
|
* field it reads, and refuses a config it cannot run.
|
|
@@ -512,28 +541,10 @@ export const hex =
|
|
|
512
541
|
* @returns {number}
|
|
513
542
|
*/
|
|
514
543
|
export function ratio(a, b) {
|
|
515
|
-
|
|
516
|
-
return (x + 0.05) / (y + 0.05);
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* A color drawn at `alpha` over `under`, as the opaque color the eye sees.
|
|
520
|
-
* @param {ReadonlyArray<number>} over
|
|
521
|
-
* @param {number} alpha
|
|
522
|
-
* @param {ReadonlyArray<number>} under
|
|
523
|
-
* @returns {ColorTriple}
|
|
524
|
-
*/
|
|
525
|
-
export function compositeOver(over, alpha, under) {
|
|
526
|
-
return /** @type {ColorTriple} */ (
|
|
527
|
-
over.map((c, i) => c * alpha + under[i] * (1 - alpha))
|
|
528
|
-
);
|
|
544
|
+
return contrastRatio(hex(a), hex(b));
|
|
529
545
|
}
|
|
530
|
-
/** A ratio to two decimals. */
|
|
531
|
-
export const round =
|
|
532
|
-
/**
|
|
533
|
-
* @param {number} r
|
|
534
|
-
* @returns {number}
|
|
535
|
-
*/
|
|
536
|
-
r => Math.round(r * 100) / 100;
|
|
546
|
+
/** A ratio cut down to two decimals, never rounded up past a need. */
|
|
547
|
+
export const round = ratioDown;
|
|
537
548
|
/** A stop as text: a layout may hold 16.666666666666668. */
|
|
538
549
|
export const shade =
|
|
539
550
|
/**
|
|
@@ -899,6 +910,7 @@ export function paletteTools(candidate, context) {
|
|
|
899
910
|
at,
|
|
900
911
|
atInside,
|
|
901
912
|
ref,
|
|
913
|
+
colorIn,
|
|
902
914
|
exactOf,
|
|
903
915
|
settingOf,
|
|
904
916
|
rawOf,
|
|
@@ -906,6 +918,7 @@ export function paletteTools(candidate, context) {
|
|
|
906
918
|
solid,
|
|
907
919
|
surfaces,
|
|
908
920
|
onFor,
|
|
921
|
+
onChoices,
|
|
909
922
|
page,
|
|
910
923
|
neutral,
|
|
911
924
|
contrast,
|
|
@@ -1115,6 +1128,33 @@ export function planPaletteRequest(dials, options, context) {
|
|
|
1115
1128
|
}
|
|
1116
1129
|
return {config, fills};
|
|
1117
1130
|
}
|
|
1131
|
+
/**
|
|
1132
|
+
* Whether a token is one the look derives: a category color (Badge, Token,
|
|
1133
|
+
* Card tint), a chart color, a code color or the overlay scrim.
|
|
1134
|
+
*/
|
|
1135
|
+
export const isLookToken =
|
|
1136
|
+
/**
|
|
1137
|
+
* @param {string} token
|
|
1138
|
+
* @returns {boolean}
|
|
1139
|
+
*/
|
|
1140
|
+
token =>
|
|
1141
|
+
/^--color-(?:(?:background|text|icon|border)-(?:red|orange|yellow|green|teal|cyan|blue|purple|pink|gray)|data-[a-z0-9-]+|syntax-(?:keyword|string|comment|number|function|type|variable|operator|constant|tag|attribute|property|punctuation|background)|overlay)$/.test(
|
|
1142
|
+
token,
|
|
1143
|
+
);
|
|
1144
|
+
/** The text roles a rule block can set for what it draws. */
|
|
1145
|
+
export const TEXT_PROPS = [
|
|
1146
|
+
'color',
|
|
1147
|
+
'--color-text-primary',
|
|
1148
|
+
'--color-text-secondary',
|
|
1149
|
+
'--color-text-accent',
|
|
1150
|
+
];
|
|
1151
|
+
/** Two decimals. */
|
|
1152
|
+
export const round2 =
|
|
1153
|
+
/**
|
|
1154
|
+
* @param {number} n
|
|
1155
|
+
* @returns {number}
|
|
1156
|
+
*/
|
|
1157
|
+
n => Math.round(n * 100) / 100;
|
|
1118
1158
|
/**
|
|
1119
1159
|
* The token mapping of a generated palette: each color token's stop in
|
|
1120
1160
|
* light and dark, as the official Neutral theme maps its families, with the
|
|
@@ -1847,12 +1887,44 @@ export function mapPalette(candidate, dials, fills, context) {
|
|
|
1847
1887
|
lift = found;
|
|
1848
1888
|
}
|
|
1849
1889
|
}
|
|
1890
|
+
/**
|
|
1891
|
+
* @type {EditorLookResult}
|
|
1892
|
+
*/
|
|
1893
|
+
const {categories, statuses, code, cvd, keptAtBase} = context.editor
|
|
1894
|
+
? context.editor.growLook({
|
|
1895
|
+
candidate,
|
|
1896
|
+
dials,
|
|
1897
|
+
context,
|
|
1898
|
+
tokens,
|
|
1899
|
+
modes,
|
|
1900
|
+
setExactly,
|
|
1901
|
+
t,
|
|
1902
|
+
})
|
|
1903
|
+
: {
|
|
1904
|
+
categories: {
|
|
1905
|
+
badges: 'none',
|
|
1906
|
+
chart: 'none',
|
|
1907
|
+
limits: [],
|
|
1908
|
+
moved: [],
|
|
1909
|
+
alike: false,
|
|
1910
|
+
unread: false,
|
|
1911
|
+
},
|
|
1912
|
+
statuses: {roles: {}, why: [], short: []},
|
|
1913
|
+
code: [],
|
|
1914
|
+
cvd: [],
|
|
1915
|
+
keptAtBase: [],
|
|
1916
|
+
};
|
|
1850
1917
|
return {
|
|
1851
1918
|
tokens,
|
|
1852
1919
|
contrast: checks.filter(c => c.note !== ''),
|
|
1853
1920
|
exact,
|
|
1854
1921
|
unread,
|
|
1855
1922
|
lift,
|
|
1923
|
+
categories,
|
|
1924
|
+
statuses,
|
|
1925
|
+
cvd,
|
|
1926
|
+
code,
|
|
1927
|
+
kept: keptAtBase,
|
|
1856
1928
|
};
|
|
1857
1929
|
}
|
|
1858
1930
|
/**
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
baseInstalled,
|
|
48
48
|
installLine,
|
|
49
49
|
packageInstalled,
|
|
50
|
+
refusePlugAndPlay,
|
|
50
51
|
themeCacheRoot,
|
|
51
52
|
} from './_project.mjs';
|
|
52
53
|
import * as preview from './_preview-app.mjs';
|
|
@@ -71,7 +72,8 @@ import {
|
|
|
71
72
|
getCliInvocation,
|
|
72
73
|
quoteCommandArgument,
|
|
73
74
|
} from '../../foundation/env/package-manager.mjs';
|
|
74
|
-
import {LIKE, P} from './_tables.mjs';
|
|
75
|
+
import {LIKE, P, knowBuiltInThemes} from './_tables.mjs';
|
|
76
|
+
import {discoverBundledThemes} from '../../foundation/discovery/theme-discovery.mjs';
|
|
75
77
|
|
|
76
78
|
/** The preview command, as a person runs it. */
|
|
77
79
|
const PREVIEW_WORDS = P.replace(/ editor$/, ' preview');
|
|
@@ -148,6 +150,10 @@ export async function themeEditHow(subject, options = {}) {
|
|
|
148
150
|
});
|
|
149
151
|
}
|
|
150
152
|
|
|
153
|
+
// The built-in themes come from the installed packages: found here, in the
|
|
154
|
+
// adapter, and handed to the editor's tables.
|
|
155
|
+
knowBuiltInThemes(discoverBundledThemes().map(t => t.slug));
|
|
156
|
+
|
|
151
157
|
/** The built-in themes a theme can build on (`--like`). */
|
|
152
158
|
export const builtInThemes = () => [...LIKE];
|
|
153
159
|
|
|
@@ -301,6 +307,9 @@ async function withLock(root, name, fn, bestEffort = false, again = null) {
|
|
|
301
307
|
// A preview command, which holds the preview lock, suggests the list of
|
|
302
308
|
// previews (what the other command may be changing).
|
|
303
309
|
again ??= name === 'preview' ? 'experimental theme preview list' : null;
|
|
310
|
+
// A Plug'n'Play app has no node_modules to keep the lock in, and the editor
|
|
311
|
+
// refuses it: refuse before any lock folder, read-only commands included.
|
|
312
|
+
if (!isOutsideProject(root)) refusePlugAndPlay(root);
|
|
304
313
|
/** @type {string | null} */
|
|
305
314
|
let dir;
|
|
306
315
|
try {
|
|
@@ -98,6 +98,19 @@ export function h(name: string, props?: Record<string, unknown>, ...children: un
|
|
|
98
98
|
export const TOP_BAR_COMPONENTS: readonly string[];
|
|
99
99
|
/** The sample app page every preview shows. */
|
|
100
100
|
export const SAMPLE_PAGE: Tree;
|
|
101
|
+
/**
|
|
102
|
+
* The few fixed items of the sample search source a page hands a part that
|
|
103
|
+
* requires one (a typeahead): the editor's pages and the catalog the part
|
|
104
|
+
* data is read from use these same items.
|
|
105
|
+
*/
|
|
106
|
+
export const SAMPLE_SEARCH_ITEMS: readonly {
|
|
107
|
+
id: string;
|
|
108
|
+
label: string;
|
|
109
|
+
}[];
|
|
110
|
+
/** The prop value that stands for the page's sample search source. */
|
|
111
|
+
export const SAMPLE_SOURCE: Readonly<{
|
|
112
|
+
__code: "SAMPLE_SOURCE";
|
|
113
|
+
}>;
|
|
101
114
|
/**
|
|
102
115
|
* Overlays the overlays section draws open in a deeper state than their docs
|
|
103
116
|
* show: a menu with its submenu open, a popover that holds a form, a date and
|
|
@@ -112,19 +125,6 @@ export const OPEN_SCENES: ReadonlyArray<import("./_catalog.mjs").CatalogItem>;
|
|
|
112
125
|
/** Components first on the contact sheet, in this order. */
|
|
113
126
|
export const SHEET_ORDER: string[];
|
|
114
127
|
export function bindingFrom(b: Binding): string;
|
|
115
|
-
/**
|
|
116
|
-
* The few fixed items of the sample search source a page hands a part that
|
|
117
|
-
* requires one (a typeahead): the editor's pages and the catalog the part
|
|
118
|
-
* data is read from use these same items.
|
|
119
|
-
*/
|
|
120
|
-
export const SAMPLE_SEARCH_ITEMS: readonly {
|
|
121
|
-
id: string;
|
|
122
|
-
label: string;
|
|
123
|
-
}[];
|
|
124
|
-
/** The prop value that stands for the page's sample search source. */
|
|
125
|
-
export const SAMPLE_SOURCE: Readonly<{
|
|
126
|
-
__code: "SAMPLE_SOURCE";
|
|
127
|
-
}>;
|
|
128
128
|
/** The light and dark switches, and the contact sheet grid. */
|
|
129
129
|
export const SHEET_CSS: string;
|
|
130
130
|
export type Tree = {
|
|
@@ -166,9 +166,12 @@ export const SAMPLE_PAGE = h(
|
|
|
166
166
|
'VStack',
|
|
167
167
|
{gap: 3},
|
|
168
168
|
h('Heading', {level: 3}, 'This week'),
|
|
169
|
+
// Striped, so Core's row stripe, and a theme's stripe color, show on
|
|
170
|
+
// the page.
|
|
169
171
|
h('Table', {
|
|
170
172
|
data: ROWS,
|
|
171
173
|
idKey: 'id',
|
|
174
|
+
isStriped: true,
|
|
172
175
|
columns: [
|
|
173
176
|
{key: 'task', header: 'Task'},
|
|
174
177
|
{key: 'owner', header: 'Owner'},
|
|
@@ -191,6 +194,21 @@ export const SAMPLE_PAGE = h(
|
|
|
191
194
|
),
|
|
192
195
|
);
|
|
193
196
|
|
|
197
|
+
/**
|
|
198
|
+
* The few fixed items of the sample search source a page hands a part that
|
|
199
|
+
* requires one (a typeahead): the editor's pages and the catalog the part
|
|
200
|
+
* data is read from use these same items.
|
|
201
|
+
*/
|
|
202
|
+
export const SAMPLE_SEARCH_ITEMS = Object.freeze([
|
|
203
|
+
{id: 'design', label: 'Design'},
|
|
204
|
+
{id: 'engineering', label: 'Engineering'},
|
|
205
|
+
{id: 'research', label: 'Research'},
|
|
206
|
+
{id: 'marketing', label: 'Marketing'},
|
|
207
|
+
]);
|
|
208
|
+
|
|
209
|
+
/** The prop value that stands for the page's sample search source. */
|
|
210
|
+
export const SAMPLE_SOURCE = Object.freeze({__code: 'SAMPLE_SOURCE'});
|
|
211
|
+
|
|
194
212
|
/**
|
|
195
213
|
* Overlays the overlays section draws open in a deeper state than their docs
|
|
196
214
|
* show: a menu with its submenu open, a popover that holds a form, a date and
|
|
@@ -280,6 +298,19 @@ export const OPEN_SCENES = Object.freeze([
|
|
|
280
298
|
},
|
|
281
299
|
}),
|
|
282
300
|
},
|
|
301
|
+
{
|
|
302
|
+
name: 'CommandPalette',
|
|
303
|
+
label: 'highlighted',
|
|
304
|
+
// Its picker highlights the chosen item once its first results come,
|
|
305
|
+
// so it is drawn as the browser shows it after mounting.
|
|
306
|
+
mounted: true,
|
|
307
|
+
tree: h('CommandPalette', {
|
|
308
|
+
isOpen: true,
|
|
309
|
+
isInline: true,
|
|
310
|
+
searchSource: SAMPLE_SOURCE,
|
|
311
|
+
value: SAMPLE_SEARCH_ITEMS[1].id,
|
|
312
|
+
}),
|
|
313
|
+
},
|
|
283
314
|
{
|
|
284
315
|
name: 'MobileNav',
|
|
285
316
|
label: 'open',
|
|
@@ -398,21 +429,6 @@ export function elementNames(v, out = new Set()) {
|
|
|
398
429
|
/** The module a binding imports. @param {Binding} b */
|
|
399
430
|
export const bindingFrom = b => (typeof b === 'string' ? b : b.from);
|
|
400
431
|
|
|
401
|
-
/**
|
|
402
|
-
* The few fixed items of the sample search source a page hands a part that
|
|
403
|
-
* requires one (a typeahead): the editor's pages and the catalog the part
|
|
404
|
-
* data is read from use these same items.
|
|
405
|
-
*/
|
|
406
|
-
export const SAMPLE_SEARCH_ITEMS = Object.freeze([
|
|
407
|
-
{id: 'design', label: 'Design'},
|
|
408
|
-
{id: 'engineering', label: 'Engineering'},
|
|
409
|
-
{id: 'research', label: 'Research'},
|
|
410
|
-
{id: 'marketing', label: 'Marketing'},
|
|
411
|
-
]);
|
|
412
|
-
|
|
413
|
-
/** The prop value that stands for the page's sample search source. */
|
|
414
|
-
export const SAMPLE_SOURCE = Object.freeze({__code: 'SAMPLE_SOURCE'});
|
|
415
|
-
|
|
416
432
|
/**
|
|
417
433
|
* The page module source for a list of items. Each item renders on its own,
|
|
418
434
|
* so one component that throws leaves the rest of the page. With a theme,
|
|
@@ -750,6 +766,9 @@ export const SHEET_CSS = [
|
|
|
750
766
|
// An overlay shown in place is no wider than its cell (a popover that
|
|
751
767
|
// holds a form), so nothing it holds is cut at the cell's edge.
|
|
752
768
|
'.cs-cell [popover][data-astryx-layer-root]{display:block!important;position:relative!important;inset:auto!important;margin:8px 0 0!important;translate:none!important;transform:none!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}',
|
|
769
|
+
// A layer opened from inside another (a submenu's flyout) sits beside it.
|
|
770
|
+
'.cs-cell [data-astryx-layer-nest]{display:flex;align-items:flex-start;gap:4px}',
|
|
771
|
+
'.cs-cell [data-astryx-layer-nest] > [data-astryx-layer-root]{margin-top:8px!important}',
|
|
753
772
|
// A part shown for its open look that opened nothing has no cell.
|
|
754
773
|
'.cs-cell:has(.cs-open):not(:has(.cs-open [data-astryx-layer-root])){display:none}',
|
|
755
774
|
// The overlays section's own page (sheet-overlays.png): five to a row,
|
|
@@ -763,6 +782,9 @@ export const SHEET_CSS = [
|
|
|
763
782
|
'.cs-states-cell{min-width:0;overflow:clip;overflow-clip-margin:8px;padding:6px}',
|
|
764
783
|
// A panel wider than its cell (a narrow screen's navigation drawer) is
|
|
765
784
|
// drawn from its start, never cut at the start.
|
|
766
|
-
|
|
785
|
+
// A dialog drawn in place holds its panel in place too: a panel placed
|
|
786
|
+
// over the window (a navigation drawer at the window's edge) would leave
|
|
787
|
+
// the dialog with no height, and the cell empty.
|
|
788
|
+
'.cs-cell dialog > *{max-width:100%!important;position:relative!important;inset:auto!important}',
|
|
767
789
|
'.cs-cell dialog{display:block!important;position:relative!important;inset:auto!important;margin:0!important;max-width:100%!important;max-height:300px!important;translate:none!important;transform:none!important}',
|
|
768
790
|
].join('');
|