@midsummer-ai/sdk 0.1.0-staging.4480 → 0.1.0-staging.4486
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/auth/contract.d.mts +1 -1
- package/auth/contract.mjs +2 -2
- package/auth/index.d.mts +1 -1
- package/auth/index.mjs +1 -1
- package/auth/password.mjs +1 -1
- package/auth/react.mjs +1 -1
- package/{auth-C7yU9QWZ.mjs → auth-BH2Lfguc.mjs} +49 -3
- package/calls/contract.d.mts +23 -0
- package/calls/contract.mjs +293 -0
- package/calls/index.d.mts +147 -0
- package/calls/index.mjs +1131 -0
- package/calls/protocol.d.mts +2 -0
- package/calls/protocol.mjs +33 -0
- package/calls/react.d.mts +56 -0
- package/calls/react.mjs +225 -0
- package/calls/stand-in.d.mts +22 -0
- package/calls/stand-in.mjs +390 -0
- package/calls/ui.d.mts +76 -0
- package/calls/ui.mjs +783 -0
- package/{engine-Be7yur9O.mjs → engine-CmTP59GT.mjs} +1 -1
- package/flows/contract.d.mts +1 -1
- package/flows/index.d.mts +1 -1
- package/{guard-Br3K8CVx.mjs → guard-VPI6xq4z.mjs} +1 -1
- package/here-C2jhTheQ.mjs +1 -1
- package/{index-CkyNDcba.d.mts → index-BmjcZfRb.d.mts} +8 -0
- package/index-c616Dbux.d.mts +343 -0
- package/package.json +43 -1
- package/protocol-BeBvbfKf.d.mts +185 -0
- package/queues/contract.d.mts +1 -1
- package/queues/index.d.mts +1 -342
- package/queues/stand-in.d.mts +1 -1
- package/queues/wire.d.mts +1 -1
- package/{style-BJzVvUKV.mjs → style-DXd-0Cxo.mjs} +1 -163
- package/tokens-BpV8U5E1.mjs +164 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
//#region src/auth/tokens.ts
|
|
2
|
+
/**
|
|
3
|
+
* Midsummer's design tokens that sign-in's screens use, copied from the design system's foundations
|
|
4
|
+
* (`ui/packages/ui/src/foundations`) so the SDK needs nothing of it at runtime. `test/auth-look.test.ts` reads those files
|
|
5
|
+
* and fails when a value here differs from its source, so a change to the design system is a change here too.
|
|
6
|
+
*
|
|
7
|
+
* Each map is one block of the source: `LIGHT` its light theme (`:root`), `DARK` its dark theme (`[data-theme="dark"]`),
|
|
8
|
+
* `MATERIAL` the button material every button carries (`.ms-button-material`), `FOUNDATION` its `@theme` values, and
|
|
9
|
+
* `TYPE` the text roles of `typography.css`. Names and values are the source's own, so `var()` between them still works.
|
|
10
|
+
*/
|
|
11
|
+
const LIGHT = {
|
|
12
|
+
"--ms-page": "oklch(0.992 0.001 255)",
|
|
13
|
+
"--ms-surface-primary": "oklch(1 0 0)",
|
|
14
|
+
"--ms-surface-secondary": "oklch(0.97 0.003 255)",
|
|
15
|
+
"--ms-surface-raised": "oklch(0.998 0.001 255)",
|
|
16
|
+
"--ms-text-primary": "oklch(0.19 0.004 255)",
|
|
17
|
+
"--ms-text-secondary": "oklch(0.44 0.007 255)",
|
|
18
|
+
"--ms-text-tertiary": "oklch(0.55 0.006 255)",
|
|
19
|
+
"--ms-border-subtle": "oklch(0.89 0.005 255)",
|
|
20
|
+
"--ms-border-strong": "oklch(0.82 0.006 255)",
|
|
21
|
+
"--ms-gray-3": "oklch(0.962 0.003 255)",
|
|
22
|
+
"--ms-gray-4": "oklch(0.942 0.004 255)",
|
|
23
|
+
"--ms-selection-fill": "var(--ms-gray-3)",
|
|
24
|
+
"--ms-accent-fill": "oklch(0.92 0.035 254)",
|
|
25
|
+
"--ms-accent-border-hover": "oklch(0.7 0.14 254)",
|
|
26
|
+
"--ms-accent-glyph": "#0d84f2",
|
|
27
|
+
"--ms-accent-solid": "#0d84f2",
|
|
28
|
+
"--ms-focus-ring": "color-mix(in oklab, var(--ms-accent) 58%, transparent)",
|
|
29
|
+
"--ms-danger-fill": "#ffebec",
|
|
30
|
+
"--ms-danger-border": "#ffc0c5",
|
|
31
|
+
"--ms-danger-glyph": "#fb3748",
|
|
32
|
+
"--ms-danger-solid": "#fb3748",
|
|
33
|
+
"--ms-danger-on-solid": "#ffffff",
|
|
34
|
+
"--ms-danger-text": "#d02533",
|
|
35
|
+
"--ms-depth-drop": "rgba(16, 24, 40, 0.09)",
|
|
36
|
+
"--ms-shadow-well": "inset 0 1px 2px oklch(0 0 0 / 0.06)",
|
|
37
|
+
"--ms-shadow-menu": "inset 0 1px 0 oklch(1 0 0 / 0.95), 0 0 0 1px oklch(0 0 0 / 0.075), 0 3px 6px -2px oklch(0 0 0 / 0.12), 0 12px 24px -8px oklch(0 0 0 / 0.18)",
|
|
38
|
+
"--ms-avatar-rim": "oklch(0 0 0 / 0.1)",
|
|
39
|
+
"--ms-avatar-highlight": "oklch(1 0 0 / 0.7)",
|
|
40
|
+
"--ms-button-primary": "oklch(0.305 0 0)",
|
|
41
|
+
"--ms-button-primary-hover": "oklch(0.335 0 0)",
|
|
42
|
+
"--ms-button-primary-pressed": "oklch(0.275 0 0)",
|
|
43
|
+
"--ms-button-primary-sheen": "linear-gradient(180deg, oklch(1 0 0 / 0.045), transparent 48%, oklch(0 0 0 / 0.06))",
|
|
44
|
+
"--ms-button-primary-foreground": "oklch(0.985 0.001 255)",
|
|
45
|
+
"--ms-button-primary-edge": "oklch(0.25 0 0)",
|
|
46
|
+
"--ms-button-secondary": "oklch(0.995 0.001 255)",
|
|
47
|
+
"--ms-button-secondary-hover": "oklch(0.972 0.003 255)",
|
|
48
|
+
"--ms-button-secondary-pressed": "oklch(0.945 0.004 255)",
|
|
49
|
+
"--ms-button-secondary-foreground": "var(--ms-text-primary)",
|
|
50
|
+
"--ms-button-secondary-edge": "oklch(0.885 0.005 255)",
|
|
51
|
+
"--ms-button-danger": "color-mix(in oklab, var(--ms-danger-solid) 86%, black)",
|
|
52
|
+
"--ms-button-danger-hover": "color-mix(in oklab, var(--ms-button-danger) 94%, white)",
|
|
53
|
+
"--ms-button-danger-pressed": "color-mix(in oklab, var(--ms-button-danger) 88%, black)",
|
|
54
|
+
"--ms-button-danger-foreground": "var(--ms-danger-on-solid)",
|
|
55
|
+
"--ms-button-danger-edge": "color-mix(in oklab, var(--ms-button-danger) 84%, black)",
|
|
56
|
+
"--ms-shadow-button-primary": "inset 0 0 0 1px oklch(1 0 0 / 0.09), inset 0 1px 1px oklch(1 0 0 / 0.22), inset 0 -2px 3px oklch(0 0 0 / 0.28), 0 1px 1px oklch(0 0 0 / 0.16), 0 3px 5px -1px oklch(0 0 0 / 0.19)",
|
|
57
|
+
"--ms-shadow-button-primary-hover": "inset 0 0 0 1px oklch(1 0 0 / 0.11), inset 0 1px 1px oklch(1 0 0 / 0.26), inset 0 -2px 3px oklch(0 0 0 / 0.28), 0 1px 1px oklch(0 0 0 / 0.16), 0 4px 7px -2px oklch(0 0 0 / 0.22)",
|
|
58
|
+
"--ms-shadow-button-primary-pressed": "inset 0 0 0 1px oklch(0 0 0 / 0.12), inset 0 1px 2px oklch(0 0 0 / 0.3), inset 0 -1px 1px oklch(1 0 0 / 0.06), 0 0 0 transparent, 0 1px 2px oklch(0 0 0 / 0.12)",
|
|
59
|
+
"--ms-card-lift": "inset 0 1px 0 oklch(1 0 0 / 0.85), 0 0 0 1px oklch(0 0 0 / 0.1), 0 2px 3px -1px oklch(0 0 0 / 0.09), 0 8px 16px -12px oklch(0 0 0 / 0.18)",
|
|
60
|
+
"--ms-frame-fill": "color-mix(in oklab, var(--ms-surface-secondary) 72%, var(--ms-surface-primary))",
|
|
61
|
+
"--ms-shadow-card": "var(--ms-card-lift), 0 0 0 4px var(--ms-frame-fill), 0 0 0 5px var(--ms-border-subtle)"
|
|
62
|
+
};
|
|
63
|
+
const DARK = {
|
|
64
|
+
"--ms-page": "oklch(0.17 0.003 255)",
|
|
65
|
+
"--ms-surface-primary": "oklch(0.21 0.004 255)",
|
|
66
|
+
"--ms-surface-secondary": "oklch(0.25 0.005 255)",
|
|
67
|
+
"--ms-surface-raised": "oklch(0.225 0.004 255)",
|
|
68
|
+
"--ms-text-primary": "oklch(0.965 0.002 255)",
|
|
69
|
+
"--ms-text-secondary": "oklch(0.74 0.006 255)",
|
|
70
|
+
"--ms-text-tertiary": "oklch(0.64 0.006 255)",
|
|
71
|
+
"--ms-border-subtle": "oklch(0.33 0.007 255)",
|
|
72
|
+
"--ms-border-strong": "oklch(0.41 0.008 255)",
|
|
73
|
+
"--ms-gray-3": "oklch(0.265 0.005 255)",
|
|
74
|
+
"--ms-gray-4": "oklch(0.3 0.006 255)",
|
|
75
|
+
"--ms-selection-fill": "var(--ms-gray-4)",
|
|
76
|
+
"--ms-accent-fill": "oklch(0.28 0.045 254)",
|
|
77
|
+
"--ms-accent-border-hover": "oklch(0.68 0.15 254)",
|
|
78
|
+
"--ms-accent-glyph": "#3b9bff",
|
|
79
|
+
"--ms-accent-solid": "#3b9bff",
|
|
80
|
+
"--ms-focus-ring": "color-mix(in oklab, var(--ms-accent) 64%, transparent)",
|
|
81
|
+
"--ms-danger-fill": "#fb374829",
|
|
82
|
+
"--ms-danger-border": "#fb37483d",
|
|
83
|
+
"--ms-danger-glyph": "#ff6875",
|
|
84
|
+
"--ms-danger-solid": "#e93544",
|
|
85
|
+
"--ms-danger-on-solid": "#ffffff",
|
|
86
|
+
"--ms-danger-text": "var(--ms-danger-glyph)",
|
|
87
|
+
"--ms-depth-drop": "rgba(0, 0, 0, 0.45)",
|
|
88
|
+
"--ms-shadow-well": "inset 0 1px 2px oklch(0 0 0 / 0.4)",
|
|
89
|
+
"--ms-shadow-menu": "inset 0 1px 0 oklch(1 0 0 / 0.075), 0 0 0 1px oklch(1 0 0 / 0.09), 0 3px 6px -2px oklch(0 0 0 / 0.3), 0 12px 24px -8px oklch(0 0 0 / 0.45)",
|
|
90
|
+
"--ms-avatar-rim": "oklch(1 0 0 / 0.1)",
|
|
91
|
+
"--ms-avatar-highlight": "oklch(1 0 0 / 0.12)",
|
|
92
|
+
"--ms-button-primary": "oklch(0.965 0.002 255)",
|
|
93
|
+
"--ms-button-primary-sheen": "linear-gradient(180deg, oklch(1 0 0 / 0.5), transparent 48%, oklch(0 0 0 / 0.025))",
|
|
94
|
+
"--ms-button-primary-hover": "oklch(1 0 0)",
|
|
95
|
+
"--ms-button-primary-pressed": "oklch(0.9 0.004 255)",
|
|
96
|
+
"--ms-button-primary-foreground": "oklch(0.18 0.004 255)",
|
|
97
|
+
"--ms-button-primary-edge": "oklch(0.985 0.001 255)",
|
|
98
|
+
"--ms-button-secondary": "oklch(1 0 0 / 0.16)",
|
|
99
|
+
"--ms-button-secondary-hover": "oklch(1 0 0 / 0.22)",
|
|
100
|
+
"--ms-button-secondary-pressed": "oklch(1 0 0 / 0.12)",
|
|
101
|
+
"--ms-button-secondary-foreground": "var(--ms-text-primary)",
|
|
102
|
+
"--ms-button-secondary-edge": "oklch(1 0 0 / 0.26)",
|
|
103
|
+
"--ms-shadow-button-primary": "inset 0 -1px 0 oklch(0 0 0 / 0.05), 0 0 0 transparent, 0 1px 2px oklch(0 0 0 / 0.3)",
|
|
104
|
+
"--ms-shadow-button-primary-hover": "inset 0 -1px 0 oklch(0 0 0 / 0.05), 0 0 0 transparent, 0 2px 4px -1px oklch(0 0 0 / 0.34)",
|
|
105
|
+
"--ms-shadow-button-primary-pressed": "inset 0 1px 2px oklch(0 0 0 / 0.14), 0 0 0 transparent, 0 0 0 transparent",
|
|
106
|
+
"--ms-button-secondary-material-shadow": "inset 0 1px 0 oklch(1 0 0 / 0.09), 0 0 0 transparent, 0 1px 2px oklch(0 0 0 / 0.28)",
|
|
107
|
+
"--ms-button-secondary-material-shadow-hover": "inset 0 1px 0 oklch(1 0 0 / 0.12), 0 0 0 transparent, 0 2px 4px -1px oklch(0 0 0 / 0.32)",
|
|
108
|
+
"--ms-button-secondary-material-shadow-pressed": "inset 0 1px 2px oklch(0 0 0 / 0.3), 0 0 0 transparent, 0 0 0 transparent",
|
|
109
|
+
"--ms-card-lift": "inset 0 1px 0 oklch(1 0 0 / 0.065), 0 0 0 1px oklch(1 0 0 / 0.085), 0 2px 4px -2px oklch(0 0 0 / 0.35)",
|
|
110
|
+
"--ms-frame-fill": "color-mix(in oklab, var(--ms-surface-secondary) 72%, var(--ms-surface-primary))",
|
|
111
|
+
"--ms-shadow-card": "var(--ms-card-lift), 0 0 0 4px var(--ms-frame-fill), 0 0 0 5px var(--ms-border-subtle)"
|
|
112
|
+
};
|
|
113
|
+
const MATERIAL = {
|
|
114
|
+
"--ms-button-accent-sheen": "linear-gradient(180deg, oklch(1 0 0 / 0.12), transparent 48%, oklch(0 0 0 / 0.06))",
|
|
115
|
+
"--ms-button-secondary-sheen": "linear-gradient(180deg, oklch(1 0 0 / 0.06), transparent 48%, oklch(0 0 0 / 0.025))",
|
|
116
|
+
"--ms-button-danger-sheen": "var(--ms-button-accent-sheen)",
|
|
117
|
+
"--ms-shadow-button-secondary": "var(--ms-button-secondary-material-shadow, inset 0 -1px 0 oklch(0 0 0 / 0.03), 0 0 0 transparent, 0 1px 2px oklch(0 0 0 / 0.05))",
|
|
118
|
+
"--ms-shadow-button-secondary-hover": "var(--ms-button-secondary-material-shadow-hover, inset 0 -1px 0 oklch(0 0 0 / 0.04), 0 0 0 transparent, 0 2px 4px -1px oklch(0 0 0 / 0.08))",
|
|
119
|
+
"--ms-shadow-button-secondary-pressed": "var(--ms-button-secondary-material-shadow-pressed, inset 0 1px 2px oklch(0 0 0 / 0.1), 0 0 0 transparent, 0 0 0 transparent)",
|
|
120
|
+
"--ms-shadow-button-danger": "inset 0 1px 0 oklch(1 0 0 / 0.22), inset 0 -1px 2px oklch(0 0 0 / 0.1), 0 1px 2px var(--ms-depth-drop)",
|
|
121
|
+
"--ms-shadow-button-danger-hover": "inset 0 1px 0 oklch(1 0 0 / 0.28), inset 0 -1px 2px oklch(0 0 0 / 0.1), 0 2px 4px -1px var(--ms-depth-drop)",
|
|
122
|
+
"--ms-shadow-button-danger-pressed": "inset 0 1px 2px oklch(0 0 0 / 0.22), 0 0 0 transparent, 0 0 0 transparent"
|
|
123
|
+
};
|
|
124
|
+
const FOUNDATION = {
|
|
125
|
+
"--font-sans": "\"Geist Variable\", \"Geist\", ui-sans-serif, system-ui, sans-serif",
|
|
126
|
+
"--font-weight-normal": "420",
|
|
127
|
+
"--font-weight-medium": "520",
|
|
128
|
+
"--radius-control": "0.5rem",
|
|
129
|
+
"--radius-action": "0.625rem",
|
|
130
|
+
"--radius-menu": "0.625rem",
|
|
131
|
+
"--radius-menu-item": "0.375rem",
|
|
132
|
+
"--radius-card": "0.75rem",
|
|
133
|
+
"--motion-duration-quick": "150ms",
|
|
134
|
+
"--motion-duration-control": "200ms",
|
|
135
|
+
"--motion-ease-out": "cubic-bezier(0.22, 1, 0.36, 1)"
|
|
136
|
+
};
|
|
137
|
+
const TYPE = {
|
|
138
|
+
heading: {
|
|
139
|
+
"font-size": "1.25rem",
|
|
140
|
+
"font-weight": "var(--font-weight-medium)",
|
|
141
|
+
"letter-spacing": "-0.02em",
|
|
142
|
+
"line-height": "1.25"
|
|
143
|
+
},
|
|
144
|
+
"body-medium": {
|
|
145
|
+
"font-size": "0.875rem",
|
|
146
|
+
"font-weight": "var(--font-weight-medium)",
|
|
147
|
+
"letter-spacing": "-0.01em",
|
|
148
|
+
"line-height": "1.25"
|
|
149
|
+
},
|
|
150
|
+
"body-small": {
|
|
151
|
+
"font-size": "0.875rem",
|
|
152
|
+
"font-weight": "var(--font-weight-normal)",
|
|
153
|
+
"letter-spacing": "-0.006em",
|
|
154
|
+
"line-height": "1.5"
|
|
155
|
+
},
|
|
156
|
+
caption: {
|
|
157
|
+
"font-size": "0.8125rem",
|
|
158
|
+
"font-weight": "var(--font-weight-normal)",
|
|
159
|
+
"letter-spacing": "-0.005em",
|
|
160
|
+
"line-height": "1.4"
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
export { TYPE as a, MATERIAL as i, FOUNDATION as n, LIGHT as r, DARK as t };
|