@tula-tech/contract 0.1.0-alpha.1 → 0.2.0
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 +2 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +1 -1
- package/dist/shared/{chunk-pcn6ax54.js → chunk-g0ddvjqg.js} +29 -29
- package/dist/theme.d.ts +6 -3
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,11 +7,10 @@ published as. The API validates with it and every Tula SDK is generated from it
|
|
|
7
7
|
against it, so it is the one place the protocol is written down.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
bun add @tula-tech/contract@
|
|
10
|
+
bun add @tula-tech/contract@latest # or: npm install @tula-tech/contract@latest
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
> **
|
|
14
|
-
> the next, and every `@tula-tech/*` package of a release shares one version, so install them at
|
|
13
|
+
> **Early release (0.x).** The protocol may change from one release to the next, and every `@tula-tech/*` package of a release shares one version, so install them at
|
|
15
14
|
> the same one. Everything else is in the
|
|
16
15
|
> [repository](https://github.com/Tula-Solutions/tula-auth-and-user-management#readme).
|
|
17
16
|
|
package/dist/index.d.ts
CHANGED
|
@@ -9393,13 +9393,16 @@ interface ThemeTokenDefinition {
|
|
|
9393
9393
|
*/
|
|
9394
9394
|
declare const THEME_TOKENS: readonly ThemeTokenDefinition[];
|
|
9395
9395
|
/**
|
|
9396
|
-
* The default theme
|
|
9396
|
+
* The default theme: Tula's own, "ink and paper". Warm neutrals from the brand kit (ink
|
|
9397
|
+
* `#1a1a18`, paper `#f1efe8`), a primary button that is ink in light and paper in dark (the
|
|
9398
|
+
* mark's two tones), and one restrained violet (`link`, `focus`) kept for interaction only.
|
|
9399
|
+
* Dark is ink surfaces with paper text. Every text colour has a contrast of at least 4.5:1 on the backgrounds it
|
|
9397
9400
|
* is drawn on, and control edges and the focus ring at least 3:1, in both schemes (WCAG 2.2
|
|
9398
9401
|
* AA); the contract's tests compute it.
|
|
9399
9402
|
*
|
|
9400
9403
|
* @example
|
|
9401
9404
|
* ```ts
|
|
9402
|
-
* DEFAULT_THEME.light.primary // '#
|
|
9405
|
+
* DEFAULT_THEME.light.primary // '#1a1a18'
|
|
9403
9406
|
* ```
|
|
9404
9407
|
*/
|
|
9405
9408
|
declare const DEFAULT_THEME: Theme;
|
|
@@ -9480,7 +9483,7 @@ declare function themeToCssVariables(theme: ThemeOverrides): Record<string, stri
|
|
|
9480
9483
|
*
|
|
9481
9484
|
* @example
|
|
9482
9485
|
* ```ts
|
|
9483
|
-
* contrastRatio('#
|
|
9486
|
+
* contrastRatio('#f1efe8', '#1a1a18') >= 4.5 // paper on the default primary (ink) passes AA
|
|
9484
9487
|
* ```
|
|
9485
9488
|
*/
|
|
9486
9489
|
declare function contrastRatio(foreground: string, background: string): number;
|
package/dist/index.js
CHANGED
|
@@ -35,44 +35,44 @@ var THEME_TOKENS2 = [
|
|
|
35
35
|
var DEFAULT_THEME2 = {
|
|
36
36
|
light: {
|
|
37
37
|
background: "#ffffff",
|
|
38
|
-
surface: "#
|
|
38
|
+
surface: "#f1efe8",
|
|
39
39
|
input: "#ffffff",
|
|
40
|
-
text: "#
|
|
41
|
-
textMuted: "#
|
|
42
|
-
primary: "#
|
|
43
|
-
primaryHover: "#
|
|
44
|
-
primaryText: "#
|
|
40
|
+
text: "#1a1a18",
|
|
41
|
+
textMuted: "#5f5e5a",
|
|
42
|
+
primary: "#1a1a18",
|
|
43
|
+
primaryHover: "#3a3935",
|
|
44
|
+
primaryText: "#f1efe8",
|
|
45
45
|
link: "#4a3bdc",
|
|
46
|
-
border: "#
|
|
46
|
+
border: "#d9d6cb",
|
|
47
47
|
borderStrong: "#8a877e",
|
|
48
48
|
danger: "#b42318",
|
|
49
|
-
dangerSurface: "#
|
|
49
|
+
dangerSurface: "#fcefec",
|
|
50
50
|
success: "#1a6b3c",
|
|
51
|
-
focus: "#
|
|
52
|
-
overlay: "rgba(
|
|
53
|
-
shadow: "0 1px 2px rgba(
|
|
51
|
+
focus: "#4a3bdc",
|
|
52
|
+
overlay: "rgba(26, 26, 24, 0.55)",
|
|
53
|
+
shadow: "0 1px 2px rgba(26, 26, 24, 0.05), 0 8px 24px rgba(26, 26, 24, 0.08)"
|
|
54
54
|
},
|
|
55
55
|
dark: {
|
|
56
|
-
background: "#
|
|
57
|
-
surface: "#
|
|
58
|
-
input: "#
|
|
59
|
-
text: "#
|
|
60
|
-
textMuted: "#
|
|
61
|
-
primary: "#
|
|
62
|
-
primaryHover: "#
|
|
63
|
-
primaryText: "#
|
|
64
|
-
link: "#
|
|
65
|
-
border: "#
|
|
66
|
-
borderStrong: "#
|
|
67
|
-
danger: "#
|
|
68
|
-
dangerSurface: "#
|
|
69
|
-
success: "#
|
|
70
|
-
focus: "#
|
|
56
|
+
background: "#1c1c19",
|
|
57
|
+
surface: "#232320",
|
|
58
|
+
input: "#141412",
|
|
59
|
+
text: "#f1efe8",
|
|
60
|
+
textMuted: "#b0ada2",
|
|
61
|
+
primary: "#f1efe8",
|
|
62
|
+
primaryHover: "#ffffff",
|
|
63
|
+
primaryText: "#141412",
|
|
64
|
+
link: "#a69dff",
|
|
65
|
+
border: "#34332e",
|
|
66
|
+
borderStrong: "#7a776d",
|
|
67
|
+
danger: "#ff8a7a",
|
|
68
|
+
dangerSurface: "#3a1f1b",
|
|
69
|
+
success: "#5fcb8a",
|
|
70
|
+
focus: "#a69dff",
|
|
71
71
|
overlay: "rgba(0, 0, 0, 0.65)",
|
|
72
|
-
shadow: "0 1px 2px rgba(0, 0, 0, 0.4), 0
|
|
72
|
+
shadow: "0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5)"
|
|
73
73
|
},
|
|
74
|
-
radius: "
|
|
75
|
-
radiusSmall: "
|
|
74
|
+
radius: "10px",
|
|
75
|
+
radiusSmall: "6px",
|
|
76
76
|
fontFamily: 'ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
77
77
|
fontFamilyMono: 'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',
|
|
78
78
|
fontSize: "0.9375rem",
|
package/dist/theme.d.ts
CHANGED
|
@@ -133,13 +133,16 @@ interface ThemeTokenDefinition {
|
|
|
133
133
|
*/
|
|
134
134
|
declare const THEME_TOKENS: readonly ThemeTokenDefinition[];
|
|
135
135
|
/**
|
|
136
|
-
* The default theme
|
|
136
|
+
* The default theme: Tula's own, "ink and paper". Warm neutrals from the brand kit (ink
|
|
137
|
+
* `#1a1a18`, paper `#f1efe8`), a primary button that is ink in light and paper in dark (the
|
|
138
|
+
* mark's two tones), and one restrained violet (`link`, `focus`) kept for interaction only.
|
|
139
|
+
* Dark is ink surfaces with paper text. Every text colour has a contrast of at least 4.5:1 on the backgrounds it
|
|
137
140
|
* is drawn on, and control edges and the focus ring at least 3:1, in both schemes (WCAG 2.2
|
|
138
141
|
* AA); the contract's tests compute it.
|
|
139
142
|
*
|
|
140
143
|
* @example
|
|
141
144
|
* ```ts
|
|
142
|
-
* DEFAULT_THEME.light.primary // '#
|
|
145
|
+
* DEFAULT_THEME.light.primary // '#1a1a18'
|
|
143
146
|
* ```
|
|
144
147
|
*/
|
|
145
148
|
declare const DEFAULT_THEME: Theme;
|
|
@@ -220,7 +223,7 @@ declare function themeToCssVariables(theme: ThemeOverrides): Record<string, stri
|
|
|
220
223
|
*
|
|
221
224
|
* @example
|
|
222
225
|
* ```ts
|
|
223
|
-
* contrastRatio('#
|
|
226
|
+
* contrastRatio('#f1efe8', '#1a1a18') >= 4.5 // paper on the default primary (ink) passes AA
|
|
224
227
|
* ```
|
|
225
228
|
*/
|
|
226
229
|
declare function contrastRatio(foreground: string, background: string): number;
|
package/dist/theme.js
CHANGED
package/package.json
CHANGED