@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 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@alpha # or: npm install @tula-tech/contract@alpha
10
+ bun add @tula-tech/contract@latest # or: npm install @tula-tech/contract@latest
11
11
  ```
12
12
 
13
- > **Alpha.** Released under the `alpha` dist-tag: the protocol may change from one alpha to
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. Every text colour has a contrast of at least 4.5:1 on the backgrounds it
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 // '#5b4cf0'
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('#ffffff', '#5b4cf0') >= 4.5 // white text on the default primary passes AA
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
@@ -102,7 +102,7 @@ import {
102
102
  isValidThemeValue2,
103
103
  themeToCssVariables2,
104
104
  contrastRatio2
105
- } from "./shared/chunk-pcn6ax54.js";
105
+ } from "./shared/chunk-g0ddvjqg.js";
106
106
  import {
107
107
  WEBHOOK_ID_HEADER2,
108
108
  WEBHOOK_TIMESTAMP_HEADER2,
@@ -35,44 +35,44 @@ var THEME_TOKENS2 = [
35
35
  var DEFAULT_THEME2 = {
36
36
  light: {
37
37
  background: "#ffffff",
38
- surface: "#f5f4f0",
38
+ surface: "#f1efe8",
39
39
  input: "#ffffff",
40
- text: "#17171c",
41
- textMuted: "#5c5a55",
42
- primary: "#5b4cf0",
43
- primaryHover: "#4a3bdc",
44
- primaryText: "#ffffff",
40
+ text: "#1a1a18",
41
+ textMuted: "#5f5e5a",
42
+ primary: "#1a1a18",
43
+ primaryHover: "#3a3935",
44
+ primaryText: "#f1efe8",
45
45
  link: "#4a3bdc",
46
- border: "#e3e0d8",
46
+ border: "#d9d6cb",
47
47
  borderStrong: "#8a877e",
48
48
  danger: "#b42318",
49
- dangerSurface: "#fdecea",
49
+ dangerSurface: "#fcefec",
50
50
  success: "#1a6b3c",
51
- focus: "#5b4cf0",
52
- overlay: "rgba(23, 23, 28, 0.55)",
53
- shadow: "0 1px 2px rgba(23, 23, 28, 0.06), 0 12px 32px rgba(23, 23, 28, 0.1)"
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: "#17171c",
57
- surface: "#202128",
58
- input: "#101014",
59
- text: "#f4f4f6",
60
- textMuted: "#a9a9b4",
61
- primary: "#8f84ff",
62
- primaryHover: "#a59cff",
63
- primaryText: "#121117",
64
- link: "#aaa2ff",
65
- border: "#2e2f39",
66
- borderStrong: "#74758a",
67
- danger: "#ff8a80",
68
- dangerSurface: "#3a1a1c",
69
- success: "#6fd49a",
70
- focus: "#aaa2ff",
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 12px 32px rgba(0, 0, 0, 0.5)"
72
+ shadow: "0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5)"
73
73
  },
74
- radius: "12px",
75
- radiusSmall: "8px",
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. Every text colour has a contrast of at least 4.5:1 on the backgrounds it
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 // '#5b4cf0'
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('#ffffff', '#5b4cf0') >= 4.5 // white text on the default primary passes AA
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
@@ -5,7 +5,7 @@ import {
5
5
  isValidThemeValue2,
6
6
  themeToCssVariables2,
7
7
  contrastRatio2
8
- } from "./shared/chunk-pcn6ax54.js";
8
+ } from "./shared/chunk-g0ddvjqg.js";
9
9
  export {
10
10
  DEFAULT_THEME2 as DEFAULT_THEME,
11
11
  THEME_TOKENS2 as THEME_TOKENS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tula-tech/contract",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "description": "Tula's public, language-neutral contract: schemas, flow protocol, error codes, token claims, password policy.",