@graview/core 0.1.15 → 0.1.17
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 +23 -5
- package/dist/app.d.ts +8 -8
- package/dist/app.d.ts.map +1 -1
- package/dist/arrangement.d.ts +2 -2
- package/dist/arrangement.d.ts.map +1 -1
- package/dist/arrangement.js +5 -5
- package/dist/arranging.js +3 -3
- package/dist/capabilities.js +1 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/city.d.ts +5 -5
- package/dist/city.js +3 -3
- package/dist/cli/check/beginnings.js +2 -2
- package/dist/cli/check/brand.d.ts.map +1 -1
- package/dist/cli/check/brand.js +15 -9
- package/dist/cli/check/brand.js.map +1 -1
- package/dist/cli/check/city.js +1 -1
- package/dist/cli/check/context.js +1 -1
- package/dist/cli/check/relations.js +2 -2
- package/dist/cli/check/relations.js.map +1 -1
- package/dist/cli/check/settings.js +8 -8
- package/dist/cli/check/settings.js.map +1 -1
- package/dist/cli/check/views.d.ts +1 -1
- package/dist/cli/check/views.js +1 -1
- package/dist/cli/create.d.ts +1 -1
- package/dist/cli/create.js +5 -5
- package/dist/cli/describe.d.ts +1 -1
- package/dist/cli/describe.js +2 -2
- package/dist/cli/describe.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/columns.d.ts +1 -1
- package/dist/columns.js +1 -1
- package/dist/compiled.d.ts.map +1 -1
- package/dist/compiled.js +6 -2
- package/dist/compiled.js.map +1 -1
- package/dist/conformance/fixtures.d.ts.map +1 -1
- package/dist/conformance/fixtures.js +194 -0
- package/dist/conformance/fixtures.js.map +1 -1
- package/dist/describe.d.ts +1 -1
- package/dist/describe.d.ts.map +1 -1
- package/dist/document/brand-check.d.ts +10 -0
- package/dist/document/brand-check.d.ts.map +1 -0
- package/dist/document/brand-check.js +33 -0
- package/dist/document/brand-check.js.map +1 -0
- package/dist/document/brand.d.ts +10 -0
- package/dist/document/brand.d.ts.map +1 -0
- package/dist/document/brand.js +49 -0
- package/dist/document/brand.js.map +1 -0
- package/dist/document/compile-checked.d.ts.map +1 -1
- package/dist/document/compile-checked.js +6 -2
- package/dist/document/compile-checked.js.map +1 -1
- package/dist/document/compile.d.ts +6 -0
- package/dist/document/compile.d.ts.map +1 -1
- package/dist/document/compile.js +4 -13
- package/dist/document/compile.js.map +1 -1
- package/dist/document/compiled.d.ts.map +1 -1
- package/dist/document/compiled.js +12 -4
- package/dist/document/compiled.js.map +1 -1
- package/dist/document/describe-place.d.ts +16 -0
- package/dist/document/describe-place.d.ts.map +1 -1
- package/dist/document/describe-place.js +14 -1
- package/dist/document/describe-place.js.map +1 -1
- package/dist/document/diff.d.ts +1 -1
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +52 -7
- package/dist/document/diff.js.map +1 -1
- package/dist/document/edit.d.ts +7 -2
- package/dist/document/edit.d.ts.map +1 -1
- package/dist/document/edit.js +188 -48
- package/dist/document/edit.js.map +1 -1
- package/dist/document/expr/analyze.d.ts +2 -2
- package/dist/document/expr/analyze.js +2 -2
- package/dist/document/expr/print.js +1 -1
- package/dist/document/index.d.ts +3 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +1 -0
- package/dist/document/index.js.map +1 -1
- package/dist/document/quote.d.ts +5 -0
- package/dist/document/quote.d.ts.map +1 -0
- package/dist/document/quote.js +17 -0
- package/dist/document/quote.js.map +1 -0
- package/dist/document/respell.d.ts +20 -0
- package/dist/document/respell.d.ts.map +1 -0
- package/dist/document/respell.js +66 -0
- package/dist/document/respell.js.map +1 -0
- package/dist/document/rules.d.ts +2 -2
- package/dist/document/rules.d.ts.map +1 -1
- package/dist/document/rules.js +2 -2
- package/dist/document/rules.js.map +1 -1
- package/dist/document/schema.d.ts +47 -2
- package/dist/document/schema.d.ts.map +1 -1
- package/dist/document/schema.js +27 -3
- package/dist/document/schema.js.map +1 -1
- package/dist/document/thumbnail.d.ts +9 -0
- package/dist/document/thumbnail.d.ts.map +1 -1
- package/dist/document/thumbnail.js +74 -12
- package/dist/document/thumbnail.js.map +1 -1
- package/dist/document/to-document.js +5 -5
- package/dist/document/to-document.js.map +1 -1
- package/dist/document/upgrade.d.ts +3 -1
- package/dist/document/upgrade.d.ts.map +1 -1
- package/dist/document/upgrade.js +6 -3
- package/dist/document/upgrade.js.map +1 -1
- package/dist/graph/graph.js +3 -3
- package/dist/graph/primitives.d.ts +2 -2
- package/dist/graph/primitives.js +2 -2
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/invariants/engine.js +1 -1
- package/dist/invariants/types.d.ts +3 -3
- package/dist/invariants/types.d.ts.map +1 -1
- package/dist/labels.d.ts +1 -1
- package/dist/modules.d.ts +1 -1
- package/dist/modules.js +1 -1
- package/dist/mutations/define-mutation.js +4 -4
- package/dist/mutations/define-mutation.js.map +1 -1
- package/dist/mutations/derive-edits.js +3 -3
- package/dist/mutations/node-ref.js +1 -1
- package/dist/mutations/types.d.ts +1 -1
- package/dist/mutations/words.js +3 -3
- package/dist/ops/types.d.ts +1 -1
- package/dist/ops/withheld.d.ts +3 -3
- package/dist/permissions/policy.d.ts +1 -1
- package/dist/permissions/policy.js +3 -3
- package/dist/permissions/types.d.ts +2 -2
- package/dist/places.d.ts +19 -2
- package/dist/places.d.ts.map +1 -1
- package/dist/places.js +41 -4
- package/dist/places.js.map +1 -1
- package/dist/scaffold/domain.js +3 -3
- package/dist/scaffold/index.d.ts +1 -1
- package/dist/scaffold/index.d.ts.map +1 -1
- package/dist/scaffold/names.d.ts +1 -1
- package/dist/scaffold/names.js +1 -1
- package/dist/scaffold/names.js.map +1 -1
- package/dist/scaffold/project.d.ts.map +1 -1
- package/dist/scaffold/project.js +4 -1
- package/dist/scaffold/project.js.map +1 -1
- package/dist/scene-districts.d.ts +1 -1
- package/dist/schema/define-node.d.ts +4 -4
- package/dist/schema/define-node.d.ts.map +1 -1
- package/dist/schema/define-node.js +8 -8
- package/dist/schema/define-node.js.map +1 -1
- package/dist/schema/figures.d.ts +1 -1
- package/dist/schema/figures.js +7 -7
- package/dist/schema/figures.js.map +1 -1
- package/dist/schema/types.d.ts +1 -1
- package/dist/search.d.ts +13 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +33 -14
- package/dist/search.js.map +1 -1
- package/dist/seen.d.ts +2 -2
- package/dist/seen.js +12 -12
- package/dist/seen.js.map +1 -1
- package/dist/settings.d.ts +1 -1
- package/dist/settings.js +3 -3
- package/dist/settings.js.map +1 -1
- package/dist/store.d.ts +2 -2
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +8 -8
- package/dist/store.js.map +1 -1
- package/dist/sync/google-calendar.js +1 -1
- package/dist/sync/types.d.ts +2 -2
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +2 -2
- package/dist/testing.js.map +1 -1
- package/dist/theme/accent.d.ts +37 -0
- package/dist/theme/accent.d.ts.map +1 -0
- package/dist/theme/accent.js +138 -0
- package/dist/theme/accent.js.map +1 -0
- package/dist/theme/contrast.d.ts +7 -7
- package/dist/theme/contrast.d.ts.map +1 -1
- package/dist/theme/contrast.js +14 -14
- package/dist/theme/contrast.js.map +1 -1
- package/dist/theme/derive.d.ts +4 -4
- package/dist/theme/derive.d.ts.map +1 -1
- package/dist/theme/derive.js +21 -22
- package/dist/theme/derive.js.map +1 -1
- package/dist/theme/fonts.d.ts +19 -0
- package/dist/theme/fonts.d.ts.map +1 -0
- package/dist/theme/fonts.js +74 -0
- package/dist/theme/fonts.js.map +1 -0
- package/dist/theme/identity.d.ts +83 -0
- package/dist/theme/identity.d.ts.map +1 -0
- package/dist/theme/identity.js +128 -0
- package/dist/theme/identity.js.map +1 -0
- package/dist/theme/kit.d.ts +9 -9
- package/dist/theme/kit.d.ts.map +1 -1
- package/dist/theme/kit.js +15 -15
- package/dist/theme/kit.js.map +1 -1
- package/dist/theme/layers.d.ts +2 -2
- package/dist/theme/layers.d.ts.map +1 -1
- package/dist/theme/layers.js +2 -2
- package/dist/theme/layers.js.map +1 -1
- package/dist/theme/look.d.ts +27 -7
- package/dist/theme/look.d.ts.map +1 -1
- package/dist/theme/look.js +30 -6
- package/dist/theme/look.js.map +1 -1
- package/dist/theme/marks.d.ts +28 -0
- package/dist/theme/marks.d.ts.map +1 -0
- package/dist/theme/marks.js +237 -0
- package/dist/theme/marks.js.map +1 -0
- package/dist/theme/palettes.d.ts +15 -7
- package/dist/theme/palettes.d.ts.map +1 -1
- package/dist/theme/palettes.js +61 -53
- package/dist/theme/palettes.js.map +1 -1
- package/dist/theme/types.d.ts +38 -6
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/types.js.map +1 -1
- package/dist/validate-graph.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/watched.js +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* GRAVIEW'S OWN IDENTITY, AS DATA (the design kit, revision 03).
|
|
3
|
+
*
|
|
4
|
+
* Three layers make a Graview app look the way it does, and this file is
|
|
5
|
+
* the first of them:
|
|
6
|
+
*
|
|
7
|
+
* 1. **The identity** (here): En Dash navy and turquoise, paper and ink,
|
|
8
|
+
* Montserrat and its three weights, and the shared-plane symbol. These
|
|
9
|
+
* are Graview's, and they reach an app only through the framework's own
|
|
10
|
+
* defaults (`LIGHT`, `DARK`, `TYPOGRAPHY`, `WEIGHTS`) — never into an
|
|
11
|
+
* app that declared its own brand, and never into a kind's district.
|
|
12
|
+
* 2. **The semantic tokens** (`ThemeTokens`, written as `--graview-*`):
|
|
13
|
+
* ground, panel, ink, accent, warn, edge, the weights and the shape. Every
|
|
14
|
+
* component reads these and nothing else, so it never has to know whose
|
|
15
|
+
* product it is drawing.
|
|
16
|
+
* 3. **The app's overrides** (`Brand`): its name, logo, favicon, palette,
|
|
17
|
+
* faces, weights, radius, density, a hue per kind and the kit.
|
|
18
|
+
*
|
|
19
|
+
* Nothing here touches a DOM, and nothing here is a font file: the faces are
|
|
20
|
+
* NAMED, and a host or a page loads them (`@graview/primitives/montserrat.css`
|
|
21
|
+
* is the framework's optional copy).
|
|
22
|
+
*/
|
|
23
|
+
/** The identity's colors, as the kit gives them. Not a palette: `LIGHT` and `DARK` are built from these. */
|
|
24
|
+
export const GRAVIEW_COLORS = Object.freeze({
|
|
25
|
+
/** En Dash navy: the primary ink of the identity, and the light scheme's accent. */
|
|
26
|
+
navy: "#001769",
|
|
27
|
+
/**
|
|
28
|
+
* En Dash turquoise: the symbol's point, and an accent FILL only. It is
|
|
29
|
+
* never text on paper (1.5:1); text on it is navy. Nothing the framework
|
|
30
|
+
* draws by default depends on it: a one-color mark is the whole mark.
|
|
31
|
+
*/
|
|
32
|
+
turquoise: "#00e5b9",
|
|
33
|
+
/** The warm surface the light scheme stands on. */
|
|
34
|
+
paper: "#f7f7f2",
|
|
35
|
+
/** Reading text. */
|
|
36
|
+
ink: "#18213a",
|
|
37
|
+
/** Secondary text: 5.8:1 on paper, 6.2:1 on white. */
|
|
38
|
+
muted: "#586174",
|
|
39
|
+
});
|
|
40
|
+
/** The family the identity is set in. Named in `TYPOGRAPHY`; loaded by the host, or by `@graview/primitives/montserrat.css`. */
|
|
41
|
+
export const GRAVIEW_FACE = "Montserrat";
|
|
42
|
+
/**
|
|
43
|
+
* The identity's three weights, for a variable face: large calm headlines,
|
|
44
|
+
* comfortable reading, and short action labels. A face without the
|
|
45
|
+
* in-between weights rounds them as CSS says (450 to 400, 550 to 600).
|
|
46
|
+
*/
|
|
47
|
+
export const WEIGHTS = Object.freeze({
|
|
48
|
+
display: 550,
|
|
49
|
+
body: 450,
|
|
50
|
+
label: 600,
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* The weights a brand that names its own faces gets when it names no
|
|
54
|
+
* weights: the conventional ones, since 450 and 550 only mean something in
|
|
55
|
+
* a variable face, and a static one would round them.
|
|
56
|
+
*/
|
|
57
|
+
export const PLAIN_WEIGHTS = Object.freeze({
|
|
58
|
+
display: 600,
|
|
59
|
+
body: 400,
|
|
60
|
+
label: 600,
|
|
61
|
+
});
|
|
62
|
+
/** Display tracking: large headlines are set a little tight. */
|
|
63
|
+
export const DISPLAY_TRACKING = "-0.025em";
|
|
64
|
+
/**
|
|
65
|
+
* How the symbol and the horizontal logo are used (the kit's handoff page).
|
|
66
|
+
* A size is the symbol's displayed height in CSS pixels.
|
|
67
|
+
*/
|
|
68
|
+
export const LOGO_RULES = Object.freeze({
|
|
69
|
+
/** The horizontal Graview logo is not drawn narrower than this. */
|
|
70
|
+
minWidth: 140,
|
|
71
|
+
/** Clear space on every side, as a share of the displayed symbol's height. */
|
|
72
|
+
clearSpace: 0.5,
|
|
73
|
+
/** At and under this, the optical micro symbol. */
|
|
74
|
+
microMax: 24,
|
|
75
|
+
/** At and over this, the regular symbol. */
|
|
76
|
+
regularMin: 32,
|
|
77
|
+
/**
|
|
78
|
+
* Between the two, the one that reads more clearly. Measured at 25–31 px
|
|
79
|
+
* at 1x and 2x: the micro's heavier strokes and wider gaps hold up to 27,
|
|
80
|
+
* the regular's finer geometry reads from 28.
|
|
81
|
+
*/
|
|
82
|
+
microBelow: 28,
|
|
83
|
+
});
|
|
84
|
+
/*
|
|
85
|
+
* THE SYMBOL, as the kit's outlined masters draw it: two open isometric
|
|
86
|
+
* planes joined by a point. These are the kit's own paths, unchanged, with
|
|
87
|
+
* their fixed colors turned into `currentColor` so an inline copy inherits
|
|
88
|
+
* the ink it stands in, and the point's fill left to `--graview-mark-point`
|
|
89
|
+
* (currentColor when unset: the one-color mark, which is the whole mark).
|
|
90
|
+
*/
|
|
91
|
+
const REGULAR = {
|
|
92
|
+
viewBox: "0 0 196 166",
|
|
93
|
+
body: '<g fill="none" stroke="currentColor" stroke-width="8.4" stroke-linejoin="round">' +
|
|
94
|
+
'<path d="M81 63 L15 49 L84 12 H181 L120 56"/>' +
|
|
95
|
+
'<path d="M60 100 L15 127 L101 150 L179 107 L123 98"/>' +
|
|
96
|
+
'<path d="M101 95 V125" stroke-linecap="round"/></g>' +
|
|
97
|
+
'<circle cx="101" cy="74" r="11.7" fill="var(--graview-mark-point, currentColor)"/>',
|
|
98
|
+
};
|
|
99
|
+
const MICRO = {
|
|
100
|
+
viewBox: "0 0 32 32",
|
|
101
|
+
body: '<g fill="none" stroke="currentColor" stroke-width="2.4" stroke-linejoin="round">' +
|
|
102
|
+
'<path d="M13 11 L3 8 L14 3 H29 L21 9"/>' +
|
|
103
|
+
'<path d="M10 18 L3 23 L16.5 28 L29 21 L22 19"/>' +
|
|
104
|
+
'<path d="M16.5 18.5 V23.5" stroke-linecap="round"/></g>' +
|
|
105
|
+
'<circle cx="16.5" cy="13.5" r="2" fill="var(--graview-mark-point, currentColor)"/>',
|
|
106
|
+
};
|
|
107
|
+
/** Which drawing of the symbol a displayed height takes. */
|
|
108
|
+
export function symbolCut(size) {
|
|
109
|
+
return size < LOGO_RULES.microBelow ? "micro" : "regular";
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The shared-plane symbol as an inline SVG string, in `currentColor`.
|
|
113
|
+
*
|
|
114
|
+
* Inline so it inherits the color it stands in (an `<img>` of an SVG file
|
|
115
|
+
* does not). Named with `aria-label` rather than a `<title id>`, so drawing
|
|
116
|
+
* it a hundred times on one page never repeats an id.
|
|
117
|
+
*/
|
|
118
|
+
export function graviewSymbol(options = {}) {
|
|
119
|
+
const size = options.size ?? 24;
|
|
120
|
+
const cut = symbolCut(size) === "micro" ? MICRO : REGULAR;
|
|
121
|
+
const [, , w, h] = cut.viewBox.split(" ").map(Number);
|
|
122
|
+
const width = Math.round((size * w) / h * 100) / 100;
|
|
123
|
+
const named = options.title
|
|
124
|
+
? `role="img" aria-label="${options.title.replace(/[&<>"]/g, (c) => `&#${c.charCodeAt(0)};`)}"`
|
|
125
|
+
: 'aria-hidden="true"';
|
|
126
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${cut.viewBox}" width="${width}" height="${size}" ${named} focusable="false">${cut.body}</svg>`;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/theme/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,oFAAoF;IACpF,IAAI,EAAE,SAAS;IACf;;;;OAIG;IACH,SAAS,EAAE,SAAS;IACpB,mDAAmD;IACnD,KAAK,EAAE,SAAS;IAChB,oBAAoB;IACpB,GAAG,EAAE,SAAS;IACd,sDAAsD;IACtD,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAEH,gIAAgI;AAChI,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;CACX,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;CACX,CAAC,CAAC;AAEH,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,mEAAmE;IACnE,QAAQ,EAAE,GAAG;IACb,8EAA8E;IAC9E,UAAU,EAAE,GAAG;IACf,mDAAmD;IACnD,QAAQ,EAAE,EAAE;IACZ,4CAA4C;IAC5C,UAAU,EAAE,EAAE;IACd;;;;OAIG;IACH,UAAU,EAA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AAoB,CAAC;IACzB,OAAO,oDAAoD,GAAG,CAAC,OAAO,YAAY,KAAK,aAAa,IAAI,KAAK,KAAK,sBAAsB,GAAG,CAAC,IAAI,QAAQ,CAAC;AAC3J,CAAC"}
|
package/dist/theme/kit.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export interface ConnectorKit {
|
|
|
9
9
|
readonly route: ConnectorRoute;
|
|
10
10
|
/** Drawn at all. An edge kind a brand keeps quiet is still selectable from the inspector. */
|
|
11
11
|
readonly visible: boolean;
|
|
12
|
-
/** An explicit CSS
|
|
13
|
-
readonly
|
|
12
|
+
/** An explicit CSS color; absent, the kind's own hue. */
|
|
13
|
+
readonly color?: string;
|
|
14
14
|
readonly pattern?: KitStrokePattern;
|
|
15
15
|
readonly width?: number;
|
|
16
16
|
readonly cap?: KitEndCap;
|
|
@@ -20,10 +20,10 @@ export interface Kit {
|
|
|
20
20
|
readonly connectors: {
|
|
21
21
|
/** Every edge kind, unless `byEdge` says otherwise. */
|
|
22
22
|
readonly all: ConnectorKit;
|
|
23
|
-
/** Per edge kind:
|
|
23
|
+
/** Per edge kind: color, visibility, pattern — whatever this kind wants differently. */
|
|
24
24
|
readonly byEdge: Readonly<Record<string, Partial<ConnectorKit>>>;
|
|
25
25
|
};
|
|
26
|
-
/** The words over a
|
|
26
|
+
/** The words over a neighborhood: the edge's own reading. */
|
|
27
27
|
readonly captions: {
|
|
28
28
|
readonly visible: boolean;
|
|
29
29
|
};
|
|
@@ -87,7 +87,7 @@ export declare function connectorKitFor(kit: Kit, edgeKind: string): ConnectorKi
|
|
|
87
87
|
export declare function kitVariables(kit: Kit): string;
|
|
88
88
|
export interface KitContrastFinding {
|
|
89
89
|
readonly edgeKind: string | "*";
|
|
90
|
-
readonly
|
|
90
|
+
readonly color: string;
|
|
91
91
|
readonly ratio: number;
|
|
92
92
|
readonly requires: number;
|
|
93
93
|
readonly unreadable?: string;
|
|
@@ -95,12 +95,12 @@ export interface KitContrastFinding {
|
|
|
95
95
|
readonly ground?: "ground" | "deep ground";
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
|
-
* A connector's
|
|
98
|
+
* A connector's color must be told from the ground it crosses: 3:1, the
|
|
99
99
|
* floor for graphics, on both the ground and the deeper ground the
|
|
100
|
-
* altitude view uses. Only explicit
|
|
100
|
+
* altitude view uses. Only explicit colors are judged — a kind's own hue
|
|
101
101
|
* is the theme's to keep readable.
|
|
102
102
|
*/
|
|
103
103
|
export declare function checkKitContrast(kit: Kit, tokens: ThemeTokens): readonly KitContrastFinding[];
|
|
104
|
-
/** The kind's own hue (degrees) as the theme paints a connector, for callers that want the same
|
|
105
|
-
export declare function
|
|
104
|
+
/** The kind's own hue (degrees) as the theme paints a connector, for callers that want the same color elsewhere. */
|
|
105
|
+
export declare function connectorHueColor(hue: number): Rgba;
|
|
106
106
|
//# sourceMappingURL=kit.d.ts.map
|
package/dist/theme/kit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit.d.ts","sourceRoot":"","sources":["../../src/theme/kit.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"kit.d.ts","sourceRoot":"","sources":["../../src/theme/kit.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgB9C,oDAAoD;AACpD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,CAAC;AACjE,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AACpF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,6FAA6F;I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CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,sFAAsF;IACtF,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;CAC5C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,kBAAkB,EAAE,CAoB7F;AAED,oHAAoH;AACpH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEnD"}
|
package/dist/theme/kit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { colorsIn, contrast, hsl } from "./contrast.js";
|
|
2
2
|
export const DEFAULT_KIT = {
|
|
3
3
|
connectors: { all: { route: "curve", visible: true }, byEdge: {} },
|
|
4
4
|
captions: { visible: true },
|
|
@@ -48,37 +48,37 @@ export function kitVariables(kit) {
|
|
|
48
48
|
].join("\n");
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* A connector's
|
|
51
|
+
* A connector's color must be told from the ground it crosses: 3:1, the
|
|
52
52
|
* floor for graphics, on both the ground and the deeper ground the
|
|
53
|
-
* altitude view uses. Only explicit
|
|
53
|
+
* altitude view uses. Only explicit colors are judged — a kind's own hue
|
|
54
54
|
* is the theme's to keep readable.
|
|
55
55
|
*/
|
|
56
56
|
export function checkKitContrast(kit, tokens) {
|
|
57
57
|
const findings = [];
|
|
58
58
|
const grounds = [["ground", tokens.ground], ["deep ground", tokens.groundDeep]]
|
|
59
|
-
.map(([name, value]) => ({ name,
|
|
60
|
-
.filter((one) => one.
|
|
61
|
-
const judge = (edgeKind,
|
|
62
|
-
if (!
|
|
59
|
+
.map(([name, value]) => ({ name, color: colorsIn(value)[0] }))
|
|
60
|
+
.filter((one) => one.color !== undefined);
|
|
61
|
+
const judge = (edgeKind, color) => {
|
|
62
|
+
if (!color)
|
|
63
63
|
return;
|
|
64
|
-
const ink =
|
|
64
|
+
const ink = colorsIn(color)[0];
|
|
65
65
|
if (!ink) {
|
|
66
|
-
findings.push({ edgeKind,
|
|
66
|
+
findings.push({ edgeKind, color, ratio: 0, requires: 3, unreadable: color });
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
for (const ground of grounds) {
|
|
70
|
-
const ratio = Math.round(contrast(ink, ground.
|
|
70
|
+
const ratio = Math.round(contrast(ink, ground.color) * 100) / 100;
|
|
71
71
|
if (ratio < 3)
|
|
72
|
-
findings.push({ edgeKind,
|
|
72
|
+
findings.push({ edgeKind, color, ratio, requires: 3, ground: ground.name });
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
judge("*", kit.connectors.all.
|
|
75
|
+
judge("*", kit.connectors.all.color);
|
|
76
76
|
for (const [edgeKind, connector] of Object.entries(kit.connectors.byEdge))
|
|
77
|
-
judge(edgeKind, connector.
|
|
77
|
+
judge(edgeKind, connector.color);
|
|
78
78
|
return findings;
|
|
79
79
|
}
|
|
80
|
-
/** The kind's own hue (degrees) as the theme paints a connector, for callers that want the same
|
|
81
|
-
export function
|
|
80
|
+
/** The kind's own hue (degrees) as the theme paints a connector, for callers that want the same color elsewhere. */
|
|
81
|
+
export function connectorHueColor(hue) {
|
|
82
82
|
return hsl(hue, 55, 62);
|
|
83
83
|
}
|
|
84
84
|
//# sourceMappingURL=kit.js.map
|
package/dist/theme/kit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/theme/kit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/theme/kit.ts"],"names":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AAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;YAClE,IAAI,KAAK,GAAG,CAAC;gBAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAC7F,CAAC;IACH,CAAC,CAAC;IACF,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrC,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5G,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,oHAAoH;AACpH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,OAAO,GAAG,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,CAAC"}
|
package/dist/theme/layers.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Every surface used to pick its own number in one stacking context: the
|
|
5
5
|
* profile and the problems at 20, the companion at 40, the altitude
|
|
6
6
|
* control at 5, the zoom at 8, a menu at 60, the studio at 100. Each was
|
|
7
|
-
* right the day it was written and wrong the day a
|
|
7
|
+
* right the day it was written and wrong the day a neighbor moved — on a
|
|
8
8
|
* hosted app the profile opened UNDER the seat's rail and could not be
|
|
9
9
|
* read. So there is one ladder, written once, here, and nothing else in
|
|
10
10
|
* the framework writes a number:
|
|
@@ -46,7 +46,7 @@ export type Layer = keyof typeof LAYERS;
|
|
|
46
46
|
export declare const SCENE_LAYERS: {
|
|
47
47
|
/** The ground's plots, under everything drawn on them. */
|
|
48
48
|
readonly plots: 0;
|
|
49
|
-
/** The cards' stage; a lit card over its unlit
|
|
49
|
+
/** The cards' stage; a lit card over its unlit neighbors. */
|
|
50
50
|
readonly stage: 1;
|
|
51
51
|
/** A district's tag and face, over its plate. */
|
|
52
52
|
readonly tag: 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../src/theme/layers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,MAAM;;;;;;;CAOT,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,MAAM,OAAO,MAAM,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;IACvB,0DAA0D;;IAE1D,
|
|
1
|
+
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../src/theme/layers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,MAAM;;;;;;;CAOT,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,MAAM,OAAO,MAAM,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;IACvB,0DAA0D;;IAE1D,6DAA6D;;IAE7D,iDAAiD;;IAEjD,8BAA8B;;IAE9B,uGAAuG;;IAEvG,wCAAwC;;IAExC,sCAAsC;;IAEtC,wCAAwC;;IAExC,+CAA+C;;IAE/C,iEAAiE;;IAEjE,+CAA+C;;CAEvC,CAAC;AAEX,6EAA6E;AAC7E,eAAO,MAAM,YAAY;;;;CAA4C,CAAC;AAEtE,gDAAgD;AAChD,eAAO,MAAM,aAAa,GAAI,MAAM,KAAK,KAAG,MAAmC,CAAC;AAEhF,8FAA8F;AAC9F,eAAO,MAAM,KAAK,GAAI,MAAM,KAAK,KAAG,MAAwD,CAAC;AAE7F,sEAAsE;AACtE,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
|
package/dist/theme/layers.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Every surface used to pick its own number in one stacking context: the
|
|
5
5
|
* profile and the problems at 20, the companion at 40, the altitude
|
|
6
6
|
* control at 5, the zoom at 8, a menu at 60, the studio at 100. Each was
|
|
7
|
-
* right the day it was written and wrong the day a
|
|
7
|
+
* right the day it was written and wrong the day a neighbor moved — on a
|
|
8
8
|
* hosted app the profile opened UNDER the seat's rail and could not be
|
|
9
9
|
* read. So there is one ladder, written once, here, and nothing else in
|
|
10
10
|
* the framework writes a number:
|
|
@@ -45,7 +45,7 @@ export const LAYERS = {
|
|
|
45
45
|
export const SCENE_LAYERS = {
|
|
46
46
|
/** The ground's plots, under everything drawn on them. */
|
|
47
47
|
plots: 0,
|
|
48
|
-
/** The cards' stage; a lit card over its unlit
|
|
48
|
+
/** The cards' stage; a lit card over its unlit neighbors. */
|
|
49
49
|
stage: 1,
|
|
50
50
|
/** A district's tag and face, over its plate. */
|
|
51
51
|
tag: 2,
|
package/dist/theme/layers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.js","sourceRoot":"","sources":["../../src/theme/layers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC;IACR,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;CACD,CAAC;AAIX;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,0DAA0D;IAC1D,KAAK,EAAE,CAAC;IACR,
|
|
1
|
+
{"version":3,"file":"layers.js","sourceRoot":"","sources":["../../src/theme/layers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EA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C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjH,CAAC"}
|
package/dist/theme/look.d.ts
CHANGED
|
@@ -9,8 +9,11 @@ import type { Brand, Scheme } from "./types.js";
|
|
|
9
9
|
* for how tight a product is, not five.
|
|
10
10
|
*/
|
|
11
11
|
export declare const SHAPE: Readonly<{
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* A panel's corner, in pixels. Modest, as the identity asks (the design
|
|
14
|
+
* kit, revision 03): a panel is a sheet with corners, not a capsule.
|
|
15
|
+
*/
|
|
16
|
+
radius: 8;
|
|
14
17
|
/** Padding multiplier. 1 is the framework's own spacing. */
|
|
15
18
|
density: 1;
|
|
16
19
|
/** A small corner (a chip, a field) as a share of the panel's, never under `radiusSmallFloor`. */
|
|
@@ -27,9 +30,14 @@ export declare const SHAPE: Readonly<{
|
|
|
27
30
|
* The framework's own type: the stacks a brand's `typography` overrides.
|
|
28
31
|
* The display face is the body face unless a brand names one — a brand with
|
|
29
32
|
* one font is not asked to name it twice.
|
|
33
|
+
*
|
|
34
|
+
* The body names Montserrat, the identity's face, and then the system's.
|
|
35
|
+
* The framework never fetches a font: where the host has not loaded
|
|
36
|
+
* Montserrat (`@graview/primitives/montserrat.css`, or its own copy), the
|
|
37
|
+
* words are set in the reader's system sans, as they always were.
|
|
30
38
|
*/
|
|
31
39
|
export declare const TYPOGRAPHY: Readonly<{
|
|
32
|
-
body: "ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", sans-serif";
|
|
40
|
+
body: "\"Montserrat\", ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", sans-serif";
|
|
33
41
|
mono: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, monospace";
|
|
34
42
|
}>;
|
|
35
43
|
/** A brand's shape, every pixel resolved: what `themeCss` writes as `--graview-radius`, `--graview-pad` and the rest. */
|
|
@@ -50,8 +58,20 @@ export interface ResolvedTypography {
|
|
|
50
58
|
readonly body: string;
|
|
51
59
|
readonly display: string;
|
|
52
60
|
readonly mono: string;
|
|
61
|
+
/** What `themeCss` writes as `--graview-weight-display`, `-body` and `-label`. */
|
|
62
|
+
readonly weights: {
|
|
63
|
+
readonly display: number;
|
|
64
|
+
readonly body: number;
|
|
65
|
+
readonly label: number;
|
|
66
|
+
};
|
|
53
67
|
}
|
|
54
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* The faces a brand sets its words in: its own where it named them, the
|
|
70
|
+
* framework's where it did not. The weights are the brand's where it named
|
|
71
|
+
* them; otherwise the identity's (550, 450, 600) on the framework's own
|
|
72
|
+
* face, and the plain ones (600, 400, 600) on a face the brand chose, since
|
|
73
|
+
* the in-between weights only mean something in a variable face.
|
|
74
|
+
*/
|
|
55
75
|
export declare function typographyOf(brand?: Pick<Brand, "typography">): ResolvedTypography;
|
|
56
76
|
/** One face of a block, as HSL without its hue: the kind supplies the hue. */
|
|
57
77
|
export interface IsoFace {
|
|
@@ -73,11 +93,11 @@ export interface IsoShade {
|
|
|
73
93
|
readonly right: IsoFace;
|
|
74
94
|
/** The wall away from it: darkest. */
|
|
75
95
|
readonly left: IsoFace;
|
|
76
|
-
/** The roof's lit edge, as a CSS
|
|
96
|
+
/** The roof's lit edge, as a CSS color. */
|
|
77
97
|
readonly roofEdge: string;
|
|
78
98
|
/** The district's plot: the ground the blocks stand on. */
|
|
79
99
|
readonly plot: IsoWash;
|
|
80
|
-
/** The plot's
|
|
100
|
+
/** The plot's curb. */
|
|
81
101
|
readonly plotEdge: IsoWash;
|
|
82
102
|
}
|
|
83
103
|
/**
|
|
@@ -90,7 +110,7 @@ export interface IsoShade {
|
|
|
90
110
|
* scene's. The lighting is not a brand's to set, because it is what makes
|
|
91
111
|
* a block read as a block on the shipped grounds in both schemes.
|
|
92
112
|
*
|
|
93
|
-
* `hsl(${hue} ${face.saturation}% ${face.lightness}%)` is a face's
|
|
113
|
+
* `hsl(${hue} ${face.saturation}% ${face.lightness}%)` is a face's color.
|
|
94
114
|
*/
|
|
95
115
|
export declare function isoShade(scheme: Scheme): IsoShade;
|
|
96
116
|
//# sourceMappingURL=look.d.ts.map
|
package/dist/theme/look.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"look.d.ts","sourceRoot":"","sources":["../../src/theme/look.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"look.d.ts","sourceRoot":"","sources":["../../src/theme/look.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAiBhD;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK;IAChB;;;OAGG;;IAEH,4DAA4D;;IAE5D,kGAAkG;;;IAGlG,iDAAiD;;IAEjD,oDAAoD;;IAEpD,6CAA6C;;EAE7C,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU;;;EAGrB,CAAC;AAEH,yHAAyH;AACzH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,aAAa,CAUnE;AAED,qHAAqH;AACrH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kFAAkF;IAClF,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/F;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,kBAAkB,CAgBlF;AAED,8EAA8E;AAC9E,MAAM,WAAW,OAAO;IACtB,sBAAsB;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sBAAsB;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,0GAA0G;AAC1G,MAAM,WAAW,OAAQ,SAAQ,OAAO;IACtC,WAAW;IACX,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,oFAAoF;AACpF,MAAM,WAAW,QAAQ;IACvB,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,uBAAuB;IACvB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AA0BD;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAEjD"}
|
package/dist/theme/look.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GRAVIEW_FACE, PLAIN_WEIGHTS, WEIGHTS } from "./identity.js";
|
|
1
2
|
/*
|
|
2
3
|
* THE LOOK, AS DATA (FR-73).
|
|
3
4
|
*
|
|
@@ -22,8 +23,11 @@
|
|
|
22
23
|
* for how tight a product is, not five.
|
|
23
24
|
*/
|
|
24
25
|
export const SHAPE = Object.freeze({
|
|
25
|
-
/**
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* A panel's corner, in pixels. Modest, as the identity asks (the design
|
|
28
|
+
* kit, revision 03): a panel is a sheet with corners, not a capsule.
|
|
29
|
+
*/
|
|
30
|
+
radius: 8,
|
|
27
31
|
/** Padding multiplier. 1 is the framework's own spacing. */
|
|
28
32
|
density: 1,
|
|
29
33
|
/** A small corner (a chip, a field) as a share of the panel's, never under `radiusSmallFloor`. */
|
|
@@ -40,9 +44,14 @@ export const SHAPE = Object.freeze({
|
|
|
40
44
|
* The framework's own type: the stacks a brand's `typography` overrides.
|
|
41
45
|
* The display face is the body face unless a brand names one — a brand with
|
|
42
46
|
* one font is not asked to name it twice.
|
|
47
|
+
*
|
|
48
|
+
* The body names Montserrat, the identity's face, and then the system's.
|
|
49
|
+
* The framework never fetches a font: where the host has not loaded
|
|
50
|
+
* Montserrat (`@graview/primitives/montserrat.css`, or its own copy), the
|
|
51
|
+
* words are set in the reader's system sans, as they always were.
|
|
43
52
|
*/
|
|
44
53
|
export const TYPOGRAPHY = Object.freeze({
|
|
45
|
-
body:
|
|
54
|
+
body: `"${GRAVIEW_FACE}", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif`,
|
|
46
55
|
mono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace',
|
|
47
56
|
});
|
|
48
57
|
/**
|
|
@@ -60,13 +69,28 @@ export function shapeOf(brand) {
|
|
|
60
69
|
gap: Math.round(SHAPE.gap * density),
|
|
61
70
|
});
|
|
62
71
|
}
|
|
63
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* The faces a brand sets its words in: its own where it named them, the
|
|
74
|
+
* framework's where it did not. The weights are the brand's where it named
|
|
75
|
+
* them; otherwise the identity's (550, 450, 600) on the framework's own
|
|
76
|
+
* face, and the plain ones (600, 400, 600) on a face the brand chose, since
|
|
77
|
+
* the in-between weights only mean something in a variable face.
|
|
78
|
+
*/
|
|
64
79
|
export function typographyOf(brand) {
|
|
65
80
|
const body = brand?.typography?.body ?? TYPOGRAPHY.body;
|
|
81
|
+
const display = brand?.typography?.display ?? body;
|
|
82
|
+
const own = body === TYPOGRAPHY.body && display === TYPOGRAPHY.body;
|
|
83
|
+
const base = own ? WEIGHTS : PLAIN_WEIGHTS;
|
|
84
|
+
const asked = brand?.typography?.weights;
|
|
66
85
|
return Object.freeze({
|
|
67
86
|
body,
|
|
68
|
-
display
|
|
87
|
+
display,
|
|
69
88
|
mono: brand?.typography?.mono ?? TYPOGRAPHY.mono,
|
|
89
|
+
weights: Object.freeze({
|
|
90
|
+
display: asked?.display ?? base.display,
|
|
91
|
+
body: asked?.body ?? base.body,
|
|
92
|
+
label: asked?.label ?? base.label,
|
|
93
|
+
}),
|
|
70
94
|
});
|
|
71
95
|
}
|
|
72
96
|
/*
|
|
@@ -102,7 +126,7 @@ const SHADES = Object.freeze({
|
|
|
102
126
|
* scene's. The lighting is not a brand's to set, because it is what makes
|
|
103
127
|
* a block read as a block on the shipped grounds in both schemes.
|
|
104
128
|
*
|
|
105
|
-
* `hsl(${hue} ${face.saturation}% ${face.lightness}%)` is a face's
|
|
129
|
+
* `hsl(${hue} ${face.saturation}% ${face.lightness}%)` is a face's color.
|
|
106
130
|
*/
|
|
107
131
|
export function isoShade(scheme) {
|
|
108
132
|
return SHADES[scheme];
|
package/dist/theme/look.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../src/theme/look.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"look.js","sourceRoot":"","sources":["../../src/theme/look.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGrE;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC;;;OAGG;IACH,MAAM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AE,KAAK,EAAE,IAAI,EAAE,CAAC;QACnE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;KACxE,CAAC;IACF,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;QACtD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;QACvD,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;QACtD,QAAQ,EAAE,wBAAwB;QAClC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;QAClE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;KACxE,CAAC;CACH,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAc;IACrC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** The most an inline SVG mark may be, in characters. */
|
|
2
|
+
export declare const MAX_INLINE_SVG: number;
|
|
3
|
+
/** Whether a mark is an SVG written inline, rather than a path to one. */
|
|
4
|
+
export declare function isInlineSvg(mark: string): boolean;
|
|
5
|
+
/** Why an SVG may not be drawn as it is: anything that could run, or reach outside the image. Null when it may. */
|
|
6
|
+
export declare function svgProblem(text: string): string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Why a mark may not be drawn, or null: an inline SVG under the rules
|
|
9
|
+
* above, or a path on the app's own host — under `/graview/assets/`, or
|
|
10
|
+
* relative to the page, never climbing out of either — and never another
|
|
11
|
+
* origin.
|
|
12
|
+
*/
|
|
13
|
+
export declare function markProblem(mark: string): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* A mark as an address an `<img>` or a `<link rel="icon">` can take: an
|
|
16
|
+
* inline SVG as a `data:` URI, a path, a web address or a `data:` image as
|
|
17
|
+
* given. Undefined for an inline SVG that could act, and for an address of
|
|
18
|
+
* any other scheme (`javascript:` among them). Which origins a mark may
|
|
19
|
+
* name is the checker's to judge (a document's only its own host; a
|
|
20
|
+
* TypeScript brand's wherever its author serves it); a face draws what it
|
|
21
|
+
* is given.
|
|
22
|
+
*/
|
|
23
|
+
export declare function markHref(mark: string | undefined): string | undefined;
|
|
24
|
+
/** The page icon a brand asks for, as an address (FR-124), or undefined. */
|
|
25
|
+
export declare function faviconHref(brand: {
|
|
26
|
+
readonly favicon?: string;
|
|
27
|
+
} | undefined): string | undefined;
|
|
28
|
+
//# sourceMappingURL=marks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../src/theme/marks.ts"],"names":[],"mappings":"AAsBA,yDAAyD;AACzD,eAAO,MAAM,cAAc,QAAY,CAAC;AAExC,0EAA0E;AAC1E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AA2ED,mHAAmH;AACnH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA+DtD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CASrE;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEhG"}
|