@mistriwork/engine 1.0.0-rc.57 → 1.0.0-rc.59
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/server/clientHttp.js +2 -2
- package/dist/server/clientSurface.js +1 -0
- package/dist/server/columnGrants.js +13 -9
- package/dist/server/seed/seed.js +14 -0
- package/dist/shared/builtInThemes.js +473 -18
- package/dist/shared/lookPalettes.d.ts +13 -10
- package/dist/shared/lookPalettes.js +95 -1
- package/dist/shared/model.js +10 -0
- package/dist/shared/page.js +1 -0
- package/dist/shared/pageAnatomy.d.ts +12 -0
- package/dist/shared/pageAnatomy.js +47 -2
- package/dist/shared/pageConfig.js +29 -1
- package/dist/shared/pageModel.d.ts +7 -0
- package/dist/shared/recordReads.js +19 -4
- package/dist/shared/relatedCreate.js +5 -3
- package/dist/shared/servedApp.d.ts +5 -0
- package/dist/shared/servedApp.js +3 -0
- package/dist/shared/themeLooks.js +370 -55
- package/dist/shared/themePresets.d.ts +0 -2
- package/dist/shared/themePresets.js +0 -4
- package/dist/shared/themeRecipeFamilies.d.ts +92 -0
- package/dist/shared/themeRecipeFamilies.js +60 -0
- package/dist/shared/themeRecipeWords.d.ts +15 -13
- package/dist/shared/themeRecipeWords.js +16 -14
- package/dist/shared/themeRecipes.d.ts +19 -10
- package/dist/shared/themeRecipes.js +37 -27
- package/dist/shared/themeTokens.d.ts +1 -1
- package/dist/shared/themeTokens.js +1 -1
- package/package.json +2 -1
- package/schema/theme.d.ts +37 -12
package/schema/theme.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Built-in structural styles. Custom themes inherit one without changing app layout. */
|
|
2
|
-
export type ThemeBase = 'workshop' | 'lumen' | 'mono' | 'sage' | 'ledger';
|
|
2
|
+
export type ThemeBase = 'workshop' | 'lumen' | 'mono' | 'sage' | 'ledger' | 'atelier' | 'graphite' | 'bloom';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* One mode's colors as a compiled theme holds them: `ThemeColors` flattened, each
|
|
@@ -296,21 +296,21 @@ export type ThemeDensity = 'compact' | 'comfortable' | 'spacious';
|
|
|
296
296
|
*/
|
|
297
297
|
export interface ThemeRecipes {
|
|
298
298
|
/** The side menu's current entry and its rows. */
|
|
299
|
-
nav?: 'tint' | 'inverted' | 'wash' | 'underline' | 'pill' | 'quiet' | 'slot';
|
|
299
|
+
nav?: 'tint' | 'inverted' | 'wash' | 'underline' | 'pill' | 'quiet' | 'slot' | 'float';
|
|
300
300
|
/** The top bar and its search. */
|
|
301
301
|
bar?: 'plain' | 'ruled' | 'dark' | 'airy' | 'soft';
|
|
302
302
|
/** A record's tabs and the selected tab. */
|
|
303
|
-
tabs?: 'pill' | 'inverted' | 'underline' | 'rule' | '
|
|
303
|
+
tabs?: 'pill' | 'inverted' | 'underline' | 'rule' | 'tint' | 'lifted';
|
|
304
304
|
/** A dashboard's window picker (7 days, 30 days). */
|
|
305
|
-
windows?: 'segmented' | 'lifted' | '
|
|
305
|
+
windows?: 'segmented' | 'lifted' | 'tint';
|
|
306
306
|
/** A stat card. */
|
|
307
|
-
stat?: 'plain' | 'framed' | 'topline' | 'ruled' | 'icon' | 'panel' | 'divided';
|
|
307
|
+
stat?: 'plain' | 'framed' | 'topline' | 'ruled' | 'icon' | 'panel' | 'divided' | 'bento';
|
|
308
308
|
/** A page section on a dashboard. */
|
|
309
309
|
section?: 'open' | 'card' | 'panel';
|
|
310
310
|
/** A record's field groups and forms; `rail` also sets an aside's cards open, as captioned groups between hairlines. */
|
|
311
311
|
fields?: 'open' | 'panel' | 'card' | 'rail';
|
|
312
312
|
/** A table's rows, hover and selection; `banded` lays every other row on the `band` color. */
|
|
313
|
-
table?: 'open' | 'tinted' | 'hairline' | 'card' | 'quiet' | 'banded';
|
|
313
|
+
table?: 'open' | 'tinted' | 'hairline' | 'card' | 'quiet' | 'banded' | 'rows';
|
|
314
314
|
/** A status value. */
|
|
315
315
|
status?: 'dot' | 'pill' | 'pill-dot' | 'quiet';
|
|
316
316
|
/** A board's lanes and cards. */
|
|
@@ -320,13 +320,13 @@ export interface ThemeRecipes {
|
|
|
320
320
|
/** The primary button. */
|
|
321
321
|
buttons?: 'accent' | 'raised' | 'keyed';
|
|
322
322
|
/** Links in text. */
|
|
323
|
-
links?: 'plain' | 'underline';
|
|
323
|
+
links?: 'plain' | 'underline' | 'name';
|
|
324
324
|
/** A page section's rule: in the ink, a hairline, or a hairline with ruled boxes and double-ruled table heads (Ledger's). */
|
|
325
325
|
rules?: 'ink' | 'hairline' | 'double';
|
|
326
326
|
/** A record's avatar. */
|
|
327
327
|
avatar?: 'plain' | 'large' | 'round';
|
|
328
328
|
/** A workflow's steps. */
|
|
329
|
-
workflow?: 'markers' | 'pills';
|
|
329
|
+
workflow?: 'markers' | 'pills' | 'segments';
|
|
330
330
|
/** A dashboard's banner note: a tint of the accent, a soft gradient across it, or plain on the ground. */
|
|
331
331
|
banner?: 'tint' | 'gradient' | 'plain';
|
|
332
332
|
/** A breakdown drawn as steps: cards on the surface with a hairline, each on a pale tint of its tone, or one strip of figures parted by hairlines, with no cards or marks. */
|
|
@@ -343,15 +343,31 @@ export interface ThemeRecipes {
|
|
|
343
343
|
/** A required field's mark: a red star after its label, or the word "(optional)" after the labels of the fields that
|
|
344
344
|
may be left empty (`aria-required` stays either way). The words are the form's, in the reader's language. */
|
|
345
345
|
required?: 'star' | 'optional-word';
|
|
346
|
-
/** A checkbox: the browser's own, or drawn as a square in the field's fill with the control's edge and corner, and
|
|
347
|
-
the accent with a check when on. */
|
|
348
|
-
checkbox?: 'native' | 'drawn';
|
|
349
346
|
/** A multi-step form's step header: plain, or ruled with a hairline under it. */
|
|
350
347
|
formStep?: 'plain' | 'ruled';
|
|
351
348
|
/** A form's sticky action bar: a hairline over the page, or raised on the surface with a soft lift. */
|
|
352
349
|
actionBar?: 'plain' | 'raised';
|
|
353
350
|
}
|
|
354
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Two words that each choose several parts at once, so a page's blocks agree without a theme saying each. A family
|
|
354
|
+
* sets the DEFAULT of its parts; a part the theme says itself still wins. They are a theme's to write, not a compiled
|
|
355
|
+
* theme's to carry: `defineTheme` resolves them into the parts (packages/engine/src/shared/themeRecipeFamilies.ts
|
|
356
|
+
* holds what each word picks).
|
|
357
|
+
*/
|
|
358
|
+
export interface ThemeRecipeFamilies {
|
|
359
|
+
/** How a page's blocks are held, whatever is in them: a dashboard's sections, a record's field groups, the stats,
|
|
360
|
+
a table and a breakdown's steps. `open` on the page, `ruled` off by rules as a printed page is, each a `card`,
|
|
361
|
+
each a `panel` on the surface, or each a soft `tile`. */
|
|
362
|
+
blocks?: 'open' | 'ruled' | 'card' | 'panel' | 'tile';
|
|
363
|
+
/** How the current one of several is shown: the menu's entry, a record's tab, a dashboard's window. On a `tint` of
|
|
364
|
+
the accent, `inverted` to the ink, `underline`d, a `pill`, or a key `lifted` out of a track. */
|
|
365
|
+
current?: 'tint' | 'inverted' | 'underline' | 'pill' | 'lifted';
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/** A theme's recipes as it writes them: a family or two, and the parts where it means something else. */
|
|
369
|
+
export type ThemeSpecRecipes = ThemeRecipes & ThemeRecipeFamilies;
|
|
370
|
+
|
|
355
371
|
/** A mode's colors, by what they are for. Hex `#rrggbb` only. Each is worn as the custom property of its path
|
|
356
372
|
(`ink` is `--ink`, `nav.ground` is `--nav-ground`), and `check` measures the pairs named here in light, dark
|
|
357
373
|
and every palette. */
|
|
@@ -516,6 +532,13 @@ interface ThemeSpecCommon {
|
|
|
516
532
|
/** Named color variations a reader may pick, each over the theme's own colors. */
|
|
517
533
|
palettes?: readonly { id: string; label: string; light?: ThemeColorsOver; dark?: ThemeColorsOver }[];
|
|
518
534
|
defaultPalette?: string;
|
|
535
|
+
/**
|
|
536
|
+
* The App's own color, said once: `brand: '#0b7a5c'`. With `extends`, it is the accent, links, the focus ring, the
|
|
537
|
+
* menu's mark and the first chart series, by day as written and by night lit until it reads; over Lumen, Sage and
|
|
538
|
+
* Bloom the raised ground, the menu's ground, hairlines and the muted inks take its hue as well, each as light as
|
|
539
|
+
* the look drew it. A color named under `colors` wins over the one worked out from it.
|
|
540
|
+
*/
|
|
541
|
+
brand?: string;
|
|
519
542
|
/**
|
|
520
543
|
* `'dark'`: worn dark until the reader picks a mode themselves, whatever their machine is set to; it still has
|
|
521
544
|
* light colors, which are held to a printed page's white paper. `'dark-only'`: no light colors at all — `colors`
|
|
@@ -560,7 +583,9 @@ interface ThemeSpecCommon {
|
|
|
560
583
|
motion?: ThemeMotion;
|
|
561
584
|
/** How far apart things stand: `house` (omitted), `tight` a quarter closer, or `airy` a quarter wider. */
|
|
562
585
|
rhythm?: ThemeRhythm;
|
|
563
|
-
|
|
586
|
+
/** A family or two (`blocks`, `current`) and each part's treatment where the theme means something else, from the
|
|
587
|
+
closed menu. Omitted parts take the family's pick, then the base's. */
|
|
588
|
+
recipes?: ThemeSpecRecipes;
|
|
564
589
|
/**
|
|
565
590
|
* Where the menu is drawn: beside the page or in the top bar. A suggestion: it holds when the theme is the App's
|
|
566
591
|
* own (`ui.theme.preset`) and `ui.shell.placement` says nothing; a reader who picks another theme keeps the App's
|