@trypattern/sdk 0.0.0-stage → 0.1.1
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 +127 -2
- package/dist/access.d.ts +31 -0
- package/dist/access.js +72 -0
- package/dist/actions.d.ts +57 -0
- package/dist/actions.js +198 -0
- package/dist/api.d.ts +30 -0
- package/dist/api.js +60 -0
- package/dist/app.d.ts +115 -0
- package/dist/app.js +266 -0
- package/dist/appInfo.d.ts +35 -0
- package/dist/appInfo.js +67 -0
- package/dist/appTitle.d.ts +6 -0
- package/dist/appTitle.js +3 -0
- package/dist/appearance.d.ts +7 -0
- package/dist/appearance.js +2 -0
- package/dist/auth/sessionApi.d.ts +41 -0
- package/dist/auth/sessionApi.js +158 -0
- package/dist/auth/sessionStore.d.ts +20 -0
- package/dist/auth/sessionStore.js +40 -0
- package/dist/auth/user.d.ts +11 -0
- package/dist/auth/user.js +9 -0
- package/dist/builtins/Account.d.ts +25 -0
- package/dist/builtins/Account.js +15 -0
- package/dist/builtins/AppSettings.d.ts +12 -0
- package/dist/builtins/AppSettings.js +31 -0
- package/dist/builtins/Palette.d.ts +29 -0
- package/dist/builtins/Palette.js +63 -0
- package/dist/builtins/SignIn.d.ts +28 -0
- package/dist/builtins/SignIn.js +60 -0
- package/dist/builtins/Toasts.d.ts +32 -0
- package/dist/builtins/Toasts.js +25 -0
- package/dist/builtins/actions.d.ts +2 -0
- package/dist/builtins/actions.js +45 -0
- package/dist/cache.d.ts +24 -0
- package/dist/cache.js +112 -0
- package/dist/cli/app.d.ts +2 -0
- package/dist/cli/app.js +1406 -0
- package/dist/cli/publishing.d.ts +21 -0
- package/dist/cli/publishing.js +493 -0
- package/dist/cli/screenshot.d.ts +1 -0
- package/dist/cli/screenshot.js +96 -0
- package/dist/cli/tools.d.ts +12 -0
- package/dist/cli/tools.js +35 -0
- package/dist/clock.d.ts +6 -0
- package/dist/clock.js +31 -0
- package/dist/components/AppFrame.d.ts +14 -0
- package/dist/components/AppFrame.js +64 -0
- package/dist/components/AppearancePicker.d.ts +1 -0
- package/dist/components/AppearancePicker.js +12 -0
- package/dist/components/Avatar.d.ts +9 -0
- package/dist/components/Avatar.js +63 -0
- package/dist/components/Badge.d.ts +11 -0
- package/dist/components/Badge.js +87 -0
- package/dist/components/Button.d.ts +24 -0
- package/dist/components/Button.js +252 -0
- package/dist/components/Card.d.ts +12 -0
- package/dist/components/Card.js +38 -0
- package/dist/components/CommandMenu.d.ts +23 -0
- package/dist/components/CommandMenu.js +214 -0
- package/dist/components/CommandPalette.d.ts +1 -0
- package/dist/components/CommandPalette.js +7 -0
- package/dist/components/Content.d.ts +7 -0
- package/dist/components/Content.js +24 -0
- package/dist/components/ContextMenu.d.ts +8 -0
- package/dist/components/ContextMenu.js +23 -0
- package/dist/components/CopyButton.d.ts +11 -0
- package/dist/components/CopyButton.js +16 -0
- package/dist/components/Dialog.d.ts +11 -0
- package/dist/components/Dialog.js +81 -0
- package/dist/components/Divider.d.ts +7 -0
- package/dist/components/Divider.js +30 -0
- package/dist/components/EmptyState.d.ts +8 -0
- package/dist/components/EmptyState.js +24 -0
- package/dist/components/Form.d.ts +9 -0
- package/dist/components/Form.js +23 -0
- package/dist/components/Icon.d.ts +10 -0
- package/dist/components/Icon.js +22 -0
- package/dist/components/IconButton.d.ts +14 -0
- package/dist/components/IconButton.js +53 -0
- package/dist/components/Kbd.d.ts +6 -0
- package/dist/components/Kbd.js +67 -0
- package/dist/components/Link.d.ts +14 -0
- package/dist/components/Link.js +44 -0
- package/dist/components/ListRow.d.ts +12 -0
- package/dist/components/ListRow.js +62 -0
- package/dist/components/LoadingRows.d.ts +5 -0
- package/dist/components/LoadingRows.js +6 -0
- package/dist/components/Menu.d.ts +12 -0
- package/dist/components/Menu.js +33 -0
- package/dist/components/MenuItems.d.ts +21 -0
- package/dist/components/MenuItems.js +32 -0
- package/dist/components/Placement.d.ts +21 -0
- package/dist/components/Placement.js +1 -0
- package/dist/components/Popup.d.ts +8 -0
- package/dist/components/Popup.js +43 -0
- package/dist/components/PopupItem.d.ts +8 -0
- package/dist/components/PopupItem.js +51 -0
- package/dist/components/PropertyRow.d.ts +7 -0
- package/dist/components/PropertyRow.js +23 -0
- package/dist/components/RadioGroup.d.ts +18 -0
- package/dist/components/RadioGroup.js +85 -0
- package/dist/components/Row.d.ts +16 -0
- package/dist/components/Row.js +27 -0
- package/dist/components/Screen.d.ts +13 -0
- package/dist/components/Screen.js +56 -0
- package/dist/components/Scrim.d.ts +8 -0
- package/dist/components/Scrim.js +40 -0
- package/dist/components/ScrollArea.d.ts +15 -0
- package/dist/components/ScrollArea.js +13 -0
- package/dist/components/SegmentedControl.d.ts +17 -0
- package/dist/components/SegmentedControl.js +68 -0
- package/dist/components/Select.d.ts +17 -0
- package/dist/components/Select.js +107 -0
- package/dist/components/SettingsRow.d.ts +8 -0
- package/dist/components/SettingsRow.js +32 -0
- package/dist/components/Sidebar.d.ts +20 -0
- package/dist/components/Sidebar.js +137 -0
- package/dist/components/SignInScreen.d.ts +1 -0
- package/dist/components/SignInScreen.js +40 -0
- package/dist/components/Size.d.ts +1 -0
- package/dist/components/Size.js +1 -0
- package/dist/components/Skeleton.d.ts +8 -0
- package/dist/components/Skeleton.js +48 -0
- package/dist/components/Spinner.d.ts +6 -0
- package/dist/components/Spinner.js +54 -0
- package/dist/components/Stack.d.ts +14 -0
- package/dist/components/Stack.js +19 -0
- package/dist/components/Switch.d.ts +10 -0
- package/dist/components/Switch.js +72 -0
- package/dist/components/Text.d.ts +21 -0
- package/dist/components/Text.js +77 -0
- package/dist/components/TextField.d.ts +25 -0
- package/dist/components/TextField.js +68 -0
- package/dist/components/Toaster.d.ts +1 -0
- package/dist/components/Toaster.js +83 -0
- package/dist/components/Tooltip.d.ts +8 -0
- package/dist/components/Tooltip.js +43 -0
- package/dist/components/controlLook.d.ts +70 -0
- package/dist/components/controlLook.js +80 -0
- package/dist/components/frame.d.ts +4 -0
- package/dist/components/frame.js +2 -0
- package/dist/components/icons.d.ts +59 -0
- package/dist/components/icons.js +111 -0
- package/dist/components/interaction.d.ts +12 -0
- package/dist/components/interaction.js +22 -0
- package/dist/components/spacing.d.ts +118 -0
- package/dist/components/spacing.js +46 -0
- package/dist/components/tones.d.ts +28 -0
- package/dist/components/tones.js +12 -0
- package/dist/entityStore.d.ts +46 -0
- package/dist/entityStore.js +160 -0
- package/dist/flows/accessFlows.d.ts +9 -0
- package/dist/flows/accessFlows.js +167 -0
- package/dist/flows/browser.d.ts +34 -0
- package/dist/flows/browser.js +167 -0
- package/dist/flows/contactSheet.d.ts +1 -0
- package/dist/flows/contactSheet.js +63 -0
- package/dist/flows/flowBrowser.d.ts +25 -0
- package/dist/flows/flowBrowser.js +23 -0
- package/dist/flows/flowSetup.d.ts +3 -0
- package/dist/flows/flowSetup.js +35 -0
- package/dist/flows/flows.d.ts +47 -0
- package/dist/flows/flows.js +175 -0
- package/dist/flows/screenshotName.d.ts +1 -0
- package/dist/flows/screenshotName.js +6 -0
- package/dist/gate.d.ts +8 -0
- package/dist/gate.js +52 -0
- package/dist/hooks/appContext.d.ts +15 -0
- package/dist/hooks/appContext.js +5 -0
- package/dist/hooks/appHooks.d.ts +21 -0
- package/dist/hooks/appHooks.js +24 -0
- package/dist/hooks/useAnimatesOnChange.d.ts +1 -0
- package/dist/hooks/useAnimatesOnChange.js +14 -0
- package/dist/hooks/useStoreState.d.ts +6 -0
- package/dist/hooks/useStoreState.js +5 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +21 -0
- package/dist/memoryApi.d.ts +19 -0
- package/dist/memoryApi.js +42 -0
- package/dist/model.d.ts +94 -0
- package/dist/model.js +243 -0
- package/dist/page.d.ts +11 -0
- package/dist/page.js +9 -0
- package/dist/platform.d.ts +1 -0
- package/dist/platform.js +5 -0
- package/dist/publishWire.d.ts +271 -0
- package/dist/publishWire.js +168 -0
- package/dist/react.d.ts +49 -0
- package/dist/react.js +40 -0
- package/dist/registered.d.ts +60 -0
- package/dist/registered.js +19 -0
- package/dist/routes.d.ts +38 -0
- package/dist/routes.js +21 -0
- package/dist/rules/checkAllFiles.d.ts +1 -0
- package/dist/rules/checkAllFiles.js +749 -0
- package/dist/rules/checkApiRouting.d.ts +1 -0
- package/dist/rules/checkApiRouting.js +112 -0
- package/dist/rules/lintPlugin.d.ts +252 -0
- package/dist/rules/lintPlugin.js +1159 -0
- package/dist/rules/messages.d.ts +48 -0
- package/dist/rules/messages.js +48 -0
- package/dist/rules/themeTokens.d.ts +6 -0
- package/dist/rules/themeTokens.js +64 -0
- package/dist/schema.d.ts +4 -0
- package/dist/schema.js +2 -0
- package/dist/server/auth.d.ts +115 -0
- package/dist/server/auth.js +134 -0
- package/dist/server/authService.d.ts +9 -0
- package/dist/server/authService.js +50 -0
- package/dist/server/createServer.d.ts +402 -0
- package/dist/server/createServer.js +82 -0
- package/dist/server/env.d.ts +15 -0
- package/dist/server/env.js +1 -0
- package/dist/server/index.d.ts +13 -0
- package/dist/server/index.js +9 -0
- package/dist/server/services.d.ts +9 -0
- package/dist/server/services.js +47 -0
- package/dist/server/session.d.ts +29 -0
- package/dist/server/session.js +65 -0
- package/dist/server/sessions.d.ts +92 -0
- package/dist/server/sessions.js +47 -0
- package/dist/server/settings.d.ts +49 -0
- package/dist/server/settings.js +25 -0
- package/dist/server/signInWire.d.ts +53 -0
- package/dist/server/signInWire.js +23 -0
- package/dist/server/tables.d.ts +242 -0
- package/dist/server/tables.js +246 -0
- package/dist/server/users.d.ts +189 -0
- package/dist/server/users.js +49 -0
- package/dist/serviceClients.d.ts +5 -0
- package/dist/serviceClients.js +70 -0
- package/dist/services.d.ts +53 -0
- package/dist/services.js +30 -0
- package/dist/shortcuts.d.ts +3 -0
- package/dist/shortcuts.js +40 -0
- package/dist/start.d.ts +20 -0
- package/dist/start.js +145 -0
- package/dist/state.d.ts +14 -0
- package/dist/state.js +17 -0
- package/dist/store.d.ts +45 -0
- package/dist/store.js +208 -0
- package/dist/subscribers.d.ts +5 -0
- package/dist/subscribers.js +13 -0
- package/dist/table.d.ts +143 -0
- package/dist/table.js +91 -0
- package/dist/tables.d.ts +77 -0
- package/dist/tables.js +216 -0
- package/dist/theme/reset.css +84 -0
- package/dist/theme/scales.d.ts +76 -0
- package/dist/theme/scales.js +82 -0
- package/dist/theme/tokens.stylex.d.ts +218 -0
- package/dist/theme/tokens.stylex.js +233 -0
- package/dist/vite/commandBridge.d.ts +2 -0
- package/dist/vite/commandBridge.js +46 -0
- package/dist/vite/designManifest.d.ts +25 -0
- package/dist/vite/designManifest.js +191 -0
- package/dist/vite/localWorker.d.ts +4 -0
- package/dist/vite/localWorker.js +60 -0
- package/dist/vite/projectFile.d.ts +9 -0
- package/dist/vite/projectFile.js +17 -0
- package/dist/vite/rootAlias.d.ts +2 -0
- package/dist/vite/rootAlias.js +15 -0
- package/dist/vite/vite.d.ts +8 -0
- package/dist/vite/vite.js +95 -0
- package/dist/wire.d.ts +7 -0
- package/dist/wire.js +1 -0
- package/package.json +103 -3
- package/presets/lintPlugin.js +7 -0
- package/presets/oxlint.json +167 -0
- package/presets/register.d.ts +21 -0
- package/presets/server.d.ts +2 -0
- package/presets/tsconfig.app.json +29 -0
- package/presets/tsconfig.server.json +27 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
export declare const breakpoints: {
|
|
3
|
+
compact: string;
|
|
4
|
+
reducedMotion: string;
|
|
5
|
+
coarsePointer: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const colors: stylex.VarGroup<Readonly<{
|
|
8
|
+
blackFill: string;
|
|
9
|
+
blackTransparent: string;
|
|
10
|
+
borderDefault: string;
|
|
11
|
+
borderInverted: string;
|
|
12
|
+
borderOnStandout: string;
|
|
13
|
+
borderStrong: string;
|
|
14
|
+
borderStrongSolid: string;
|
|
15
|
+
borderSubtle: string;
|
|
16
|
+
brandBorderDefault: string;
|
|
17
|
+
brandBorderFocus: string;
|
|
18
|
+
brandBorderSubtle: string;
|
|
19
|
+
brandGradientSubtle: string;
|
|
20
|
+
brandForeground: string;
|
|
21
|
+
brandSolid: string;
|
|
22
|
+
brandSolidActive: string;
|
|
23
|
+
brandSolidHover: string;
|
|
24
|
+
brandSubtle: string;
|
|
25
|
+
brandSubtleHover: string;
|
|
26
|
+
card: string;
|
|
27
|
+
component: string;
|
|
28
|
+
componentActive: string;
|
|
29
|
+
componentHover: string;
|
|
30
|
+
componentOnContainerStrong: string;
|
|
31
|
+
componentOnContainerStrongHover: string;
|
|
32
|
+
componentOnContainerSubtle: string;
|
|
33
|
+
componentOnContainerSubtleHover: string;
|
|
34
|
+
componentOnInverted: string;
|
|
35
|
+
componentOnSunken: string;
|
|
36
|
+
container: string;
|
|
37
|
+
containerRecessed: string;
|
|
38
|
+
dangerBorderDefault: string;
|
|
39
|
+
dangerBorderSubtle: string;
|
|
40
|
+
dangerForeground: string;
|
|
41
|
+
dangerSolid: string;
|
|
42
|
+
dangerSolidActive: string;
|
|
43
|
+
dangerSolidHover: string;
|
|
44
|
+
dangerSubtle: string;
|
|
45
|
+
dangerSubtleActive: string;
|
|
46
|
+
dangerSubtleHover: string;
|
|
47
|
+
disabled: string;
|
|
48
|
+
divider: string;
|
|
49
|
+
disabledForeground: string;
|
|
50
|
+
invertedSolid: string;
|
|
51
|
+
invertedSolidActive: string;
|
|
52
|
+
invertedSolidHover: string;
|
|
53
|
+
modal: string;
|
|
54
|
+
onBrandSolidForeground: string;
|
|
55
|
+
onBrandSubtleForeground: string;
|
|
56
|
+
onDangerSolidForeground: string;
|
|
57
|
+
onDangerSubtleForeground: string;
|
|
58
|
+
onInvertedForeground: string;
|
|
59
|
+
onPositiveSolidForeground: string;
|
|
60
|
+
onPositiveSubtleForeground: string;
|
|
61
|
+
onStandoutPrimaryForeground: string;
|
|
62
|
+
onStandoutSecondaryForeground: string;
|
|
63
|
+
onWarningSolidForeground: string;
|
|
64
|
+
onWarningSubtleForeground: string;
|
|
65
|
+
page: string;
|
|
66
|
+
positiveBorderDefault: string;
|
|
67
|
+
positiveForeground: string;
|
|
68
|
+
positiveSolid: string;
|
|
69
|
+
positiveSolidHover: string;
|
|
70
|
+
positiveSubtle: string;
|
|
71
|
+
positiveSubtleHover: string;
|
|
72
|
+
primaryForeground: string;
|
|
73
|
+
secondaryForeground: string;
|
|
74
|
+
secondaryForegroundSolid: string;
|
|
75
|
+
shell: string;
|
|
76
|
+
standout: string;
|
|
77
|
+
sunken: string;
|
|
78
|
+
tertiaryForeground: string;
|
|
79
|
+
transparent: string;
|
|
80
|
+
transparentActive: string;
|
|
81
|
+
transparentHover: string;
|
|
82
|
+
warningBorderDefault: string;
|
|
83
|
+
warningForeground: string;
|
|
84
|
+
warningSolid: string;
|
|
85
|
+
warningSolidHover: string;
|
|
86
|
+
warningSubtle: string;
|
|
87
|
+
warningSubtleHover: string;
|
|
88
|
+
whiteFill: string;
|
|
89
|
+
dangerText: string;
|
|
90
|
+
indicatorBorder: string;
|
|
91
|
+
overlay: string;
|
|
92
|
+
}>, symbol>;
|
|
93
|
+
export declare const space: stylex.VarGroup<Readonly<{
|
|
94
|
+
xxs: string;
|
|
95
|
+
xs: string;
|
|
96
|
+
sm: string;
|
|
97
|
+
md: string;
|
|
98
|
+
lg: string;
|
|
99
|
+
xl: string;
|
|
100
|
+
xxl: string;
|
|
101
|
+
xxxl: string;
|
|
102
|
+
}>, symbol>;
|
|
103
|
+
export declare const controls: stylex.VarGroup<Readonly<{
|
|
104
|
+
heightXs: string;
|
|
105
|
+
heightSm: string;
|
|
106
|
+
heightMd: string;
|
|
107
|
+
heightLg: string;
|
|
108
|
+
heightXl: string;
|
|
109
|
+
paddingXs: string;
|
|
110
|
+
paddingSm: string;
|
|
111
|
+
paddingMd: string;
|
|
112
|
+
paddingLg: string;
|
|
113
|
+
paddingXl: string;
|
|
114
|
+
gapXs: string;
|
|
115
|
+
gapSm: string;
|
|
116
|
+
gapMd: string;
|
|
117
|
+
gapLg: string;
|
|
118
|
+
gapXl: string;
|
|
119
|
+
}>, symbol>;
|
|
120
|
+
export declare const iconSizes: stylex.VarGroup<Readonly<{
|
|
121
|
+
xs: string;
|
|
122
|
+
sm: string;
|
|
123
|
+
md: string;
|
|
124
|
+
lg: string;
|
|
125
|
+
xl: string;
|
|
126
|
+
}>, symbol>;
|
|
127
|
+
export declare const borders: stylex.VarGroup<Readonly<{
|
|
128
|
+
hairline: string;
|
|
129
|
+
thin: string;
|
|
130
|
+
}>, symbol>;
|
|
131
|
+
export declare const widths: stylex.VarGroup<Readonly<{
|
|
132
|
+
contentXs: string;
|
|
133
|
+
contentSm: string;
|
|
134
|
+
contentMd: string;
|
|
135
|
+
contentLg: string;
|
|
136
|
+
sidebar: string;
|
|
137
|
+
toast: string;
|
|
138
|
+
}>, symbol>;
|
|
139
|
+
export declare const layers: {
|
|
140
|
+
scrim: string;
|
|
141
|
+
sidebar: string;
|
|
142
|
+
menu: string;
|
|
143
|
+
tooltip: string;
|
|
144
|
+
dialog: string;
|
|
145
|
+
toast: string;
|
|
146
|
+
};
|
|
147
|
+
export declare const radii: stylex.VarGroup<Readonly<{
|
|
148
|
+
xs: string;
|
|
149
|
+
sm: string;
|
|
150
|
+
md: string;
|
|
151
|
+
lg: string;
|
|
152
|
+
xl: string;
|
|
153
|
+
xxl: string;
|
|
154
|
+
xxxl: string;
|
|
155
|
+
xxxxl: string;
|
|
156
|
+
full: string;
|
|
157
|
+
}>, symbol>;
|
|
158
|
+
export declare const fontSizes: stylex.VarGroup<Readonly<{
|
|
159
|
+
captionXs: string;
|
|
160
|
+
captionSm: string;
|
|
161
|
+
captionBase: string;
|
|
162
|
+
captionLg: string;
|
|
163
|
+
bodySm: string;
|
|
164
|
+
bodyBase: string;
|
|
165
|
+
bodyLg: string;
|
|
166
|
+
heading6: string;
|
|
167
|
+
heading5: string;
|
|
168
|
+
heading4: string;
|
|
169
|
+
heading3: string;
|
|
170
|
+
heading2: string;
|
|
171
|
+
heading1: string;
|
|
172
|
+
}>, symbol>;
|
|
173
|
+
export declare const lineHeights: stylex.VarGroup<Readonly<{
|
|
174
|
+
captionXs: string;
|
|
175
|
+
caption: string;
|
|
176
|
+
title: string;
|
|
177
|
+
bodySm: string;
|
|
178
|
+
body: string;
|
|
179
|
+
heading6: string;
|
|
180
|
+
heading5: string;
|
|
181
|
+
heading4: string;
|
|
182
|
+
heading3: string;
|
|
183
|
+
heading2: string;
|
|
184
|
+
heading1: string;
|
|
185
|
+
}>, symbol>;
|
|
186
|
+
export declare const fonts: stylex.VarGroup<Readonly<{
|
|
187
|
+
sans: string;
|
|
188
|
+
mono: string;
|
|
189
|
+
}>, symbol>;
|
|
190
|
+
export declare const fontFeatures: stylex.VarGroup<Readonly<{
|
|
191
|
+
sans: string;
|
|
192
|
+
kbd: string;
|
|
193
|
+
}>, symbol>;
|
|
194
|
+
export declare const fontWeights: stylex.VarGroup<Readonly<{
|
|
195
|
+
normal: string;
|
|
196
|
+
semimedium: string;
|
|
197
|
+
medium: string;
|
|
198
|
+
semibold: string;
|
|
199
|
+
bold: string;
|
|
200
|
+
}>, symbol>;
|
|
201
|
+
export declare const shadows: stylex.VarGroup<Readonly<{
|
|
202
|
+
border: string;
|
|
203
|
+
default: string;
|
|
204
|
+
large: string;
|
|
205
|
+
extraLarge: string;
|
|
206
|
+
}>, symbol>;
|
|
207
|
+
export declare const motion: stylex.VarGroup<Readonly<{
|
|
208
|
+
easeOut: string;
|
|
209
|
+
easeInOut: string;
|
|
210
|
+
slideEasing: string;
|
|
211
|
+
instant: string;
|
|
212
|
+
exit: string;
|
|
213
|
+
fast: string;
|
|
214
|
+
base: string;
|
|
215
|
+
slide: string;
|
|
216
|
+
pulse: string;
|
|
217
|
+
spin: string;
|
|
218
|
+
}>, symbol>;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
export const breakpoints = stylex.defineConsts({
|
|
3
|
+
compact: '@media (max-width: 767px)',
|
|
4
|
+
reducedMotion: '@media (prefers-reduced-motion: reduce)',
|
|
5
|
+
coarsePointer: '@media (pointer: coarse)'
|
|
6
|
+
});
|
|
7
|
+
export const colors = stylex.defineVars({
|
|
8
|
+
blackFill: '#000',
|
|
9
|
+
blackTransparent: '#0000',
|
|
10
|
+
borderDefault: 'light-dark(#0000000f, #ffffff12)',
|
|
11
|
+
borderInverted: 'light-dark(#000, #fff)',
|
|
12
|
+
borderOnStandout: 'light-dark(#ffffff1a, #ffffff0d)',
|
|
13
|
+
borderStrong: 'light-dark(#00000026, #ffffff2c)',
|
|
14
|
+
borderStrongSolid: 'light-dark(#d9d9d9, #3a3a3a)',
|
|
15
|
+
borderSubtle: 'light-dark(#00000006, #ffffff09)',
|
|
16
|
+
brandBorderDefault: 'light-dark(#0088f653, #0f89fd7f)',
|
|
17
|
+
brandBorderFocus: 'light-dark(#0084e6a1, #0090ff)',
|
|
18
|
+
brandBorderSubtle: 'light-dark(#0093ff3d, #0081fd6b)',
|
|
19
|
+
brandGradientSubtle: 'linear-gradient(90deg, #ef5f0033 20%, #c2007a28 40%, #53009e25 60%, #0086f032 80%)',
|
|
20
|
+
brandForeground: 'light-dark(#0086f0fa, #3b9eff)',
|
|
21
|
+
brandSolid: '#0090ff',
|
|
22
|
+
brandSolidActive: 'light-dark(#0d74ce, #70b8ff)',
|
|
23
|
+
brandSolidHover: 'light-dark(#0588f0, #3b9eff)',
|
|
24
|
+
brandSubtle: 'light-dark(#008ff519, #0077ff3a)',
|
|
25
|
+
brandSubtleHover: 'light-dark(#009eff2a, #0075ff57)',
|
|
26
|
+
card: 'light-dark(#00000006, #ffffff09)',
|
|
27
|
+
component: 'light-dark(#0000000f, #ffffff12)',
|
|
28
|
+
componentActive: 'light-dark(#0000001f, #fff2)',
|
|
29
|
+
componentHover: 'light-dark(#00000017, #ffffff1b)',
|
|
30
|
+
componentOnContainerStrong: 'light-dark(#fff, #ffffff12)',
|
|
31
|
+
componentOnContainerStrongHover: 'light-dark(#f9f9f9, #ffffff1b)',
|
|
32
|
+
componentOnContainerSubtle: 'light-dark(#fff, #ffffff09)',
|
|
33
|
+
componentOnContainerSubtleHover: 'light-dark(#fff, #ffffff12)',
|
|
34
|
+
componentOnInverted: 'light-dark(#ffffff1a, #0000001a)',
|
|
35
|
+
componentOnSunken: 'light-dark(#fff, #2a2a2a)',
|
|
36
|
+
container: 'light-dark(#fff, #111)',
|
|
37
|
+
containerRecessed: 'light-dark(#fcfcfc, #111)',
|
|
38
|
+
dangerBorderDefault: 'light-dark(#f92d0050, #ff4f3864)',
|
|
39
|
+
dangerBorderSubtle: 'light-dark(#ff35002c, #fd201142)',
|
|
40
|
+
dangerForeground: 'light-dark(#d72400da, #ff6847eb)',
|
|
41
|
+
dangerSolid: '#e54d2e',
|
|
42
|
+
dangerSolidActive: 'light-dark(#d13415, #ff977d)',
|
|
43
|
+
dangerSolidHover: 'light-dark(#dd4425, #ec6142)',
|
|
44
|
+
dangerSubtle: 'light-dark(#ff200008, #ff55330f)',
|
|
45
|
+
dangerSubtleActive: 'light-dark(#ff2e003d, #fe332153)',
|
|
46
|
+
dangerSubtleHover: 'light-dark(#f52b0018, #ff35232b)',
|
|
47
|
+
disabled: 'light-dark(#0000000f, #ffffff09)',
|
|
48
|
+
divider: 'light-dark(#0000000f, #ffffff1f)',
|
|
49
|
+
disabledForeground: 'light-dark(#0004, #fff5)',
|
|
50
|
+
invertedSolid: 'light-dark(#000000f2, #fffffff2)',
|
|
51
|
+
invertedSolidActive: 'light-dark(#000000b3, #ffffffb3)',
|
|
52
|
+
invertedSolidHover: 'light-dark(#000c, #fffc)',
|
|
53
|
+
modal: 'light-dark(oklch(100% 0 0), oklch(25.2% 0 0))',
|
|
54
|
+
onBrandSolidForeground: '#fff',
|
|
55
|
+
onBrandSubtleForeground: 'light-dark(#0090ff, #70b8ff)',
|
|
56
|
+
onDangerSolidForeground: 'light-dark(#fffcfc, #fff)',
|
|
57
|
+
onDangerSubtleForeground: 'light-dark(#df2600d1, #ff977d)',
|
|
58
|
+
onInvertedForeground: 'light-dark(#fff, #000)',
|
|
59
|
+
onPositiveSolidForeground: 'light-dark(#fbfefc, #fff)',
|
|
60
|
+
onPositiveSubtleForeground: 'light-dark(#008f4acf, #46fea5d4)',
|
|
61
|
+
onStandoutPrimaryForeground: 'light-dark(#fff, #ffffffed)',
|
|
62
|
+
onStandoutSecondaryForeground: '#ffffff80',
|
|
63
|
+
onWarningSolidForeground: 'light-dark(#fefcfb, #fff)',
|
|
64
|
+
onWarningSubtleForeground: 'light-dark(#cc4e00, #ffa057)',
|
|
65
|
+
page: 'light-dark(#fff, oklch(15% 0 0))',
|
|
66
|
+
positiveBorderDefault: 'light-dark(#00963c52, #44ffaa4b)',
|
|
67
|
+
positiveForeground: 'light-dark(#008647d4, #43fea4ab)',
|
|
68
|
+
positiveSolid: '#30a46c',
|
|
69
|
+
positiveSolidHover: 'light-dark(#2b9a66, #33b074)',
|
|
70
|
+
positiveSubtle: 'light-dark(#00a43319, #22ff991e)',
|
|
71
|
+
positiveSubtleHover: 'light-dark(#00a83829, #11ff992d)',
|
|
72
|
+
primaryForeground: 'light-dark(#000000df, #ffffffed)',
|
|
73
|
+
secondaryForeground: 'light-dark(#0000009b, #ffffffaf)',
|
|
74
|
+
secondaryForegroundSolid: 'light-dark(#646464, #b4b4b4)',
|
|
75
|
+
shell: 'light-dark(oklch(97.3% 0 0), #000)',
|
|
76
|
+
standout: 'light-dark(#202020, #222)',
|
|
77
|
+
sunken: 'light-dark(#0000000d, #0006)',
|
|
78
|
+
tertiaryForeground: 'light-dark(#00000072, #ffffff64)',
|
|
79
|
+
transparent: '#0000',
|
|
80
|
+
transparentActive: 'light-dark(#0000000f, #ffffff12)',
|
|
81
|
+
transparentHover: 'light-dark(#0000000f, #ffffff1b)',
|
|
82
|
+
warningBorderDefault: 'light-dark(#ff81007d, #fd75045c)',
|
|
83
|
+
warningForeground: 'light-dark(#ef5f00, #ff801f)',
|
|
84
|
+
warningSolid: '#f76b15',
|
|
85
|
+
warningSolidHover: 'light-dark(#ef5f00, #ff801f)',
|
|
86
|
+
warningSubtle: 'light-dark(#ff9c0029, #fb6a0025)',
|
|
87
|
+
warningSubtleHover: 'light-dark(#ff91014a, #ff590039)',
|
|
88
|
+
whiteFill: '#fff',
|
|
89
|
+
dangerText: 'light-dark(#cd2200ea, #ff977d)',
|
|
90
|
+
indicatorBorder: 'light-dark(#d9d9d9, #484848)',
|
|
91
|
+
overlay: 'light-dark(#0006, #0009)'
|
|
92
|
+
});
|
|
93
|
+
export const space = stylex.defineVars({
|
|
94
|
+
xxs: '2px',
|
|
95
|
+
xs: '4px',
|
|
96
|
+
sm: '8px',
|
|
97
|
+
md: '12px',
|
|
98
|
+
lg: '16px',
|
|
99
|
+
xl: '24px',
|
|
100
|
+
xxl: '32px',
|
|
101
|
+
xxxl: '48px'
|
|
102
|
+
});
|
|
103
|
+
export const controls = stylex.defineVars({
|
|
104
|
+
heightXs: '20px',
|
|
105
|
+
heightSm: '24px',
|
|
106
|
+
heightMd: '28px',
|
|
107
|
+
heightLg: '32px',
|
|
108
|
+
heightXl: '40px',
|
|
109
|
+
paddingXs: '6px',
|
|
110
|
+
paddingSm: '8px',
|
|
111
|
+
paddingMd: '10px',
|
|
112
|
+
paddingLg: '12px',
|
|
113
|
+
paddingXl: '14px',
|
|
114
|
+
gapXs: '4px',
|
|
115
|
+
gapSm: '4px',
|
|
116
|
+
gapMd: '6px',
|
|
117
|
+
gapLg: '6px',
|
|
118
|
+
gapXl: '8px'
|
|
119
|
+
});
|
|
120
|
+
export const iconSizes = stylex.defineVars({
|
|
121
|
+
xs: '12px',
|
|
122
|
+
sm: '14px',
|
|
123
|
+
md: '16px',
|
|
124
|
+
lg: '16px',
|
|
125
|
+
xl: '20px'
|
|
126
|
+
});
|
|
127
|
+
export const borders = stylex.defineVars({
|
|
128
|
+
hairline: '0.5px',
|
|
129
|
+
thin: '1px'
|
|
130
|
+
});
|
|
131
|
+
export const widths = stylex.defineVars({
|
|
132
|
+
contentXs: '280px',
|
|
133
|
+
contentSm: '480px',
|
|
134
|
+
contentMd: '640px',
|
|
135
|
+
contentLg: '720px',
|
|
136
|
+
sidebar: '280px',
|
|
137
|
+
toast: '356px'
|
|
138
|
+
});
|
|
139
|
+
export const layers = stylex.defineConsts({
|
|
140
|
+
scrim: '15',
|
|
141
|
+
sidebar: '20',
|
|
142
|
+
menu: '20',
|
|
143
|
+
tooltip: '30',
|
|
144
|
+
dialog: '40',
|
|
145
|
+
toast: '40'
|
|
146
|
+
});
|
|
147
|
+
export const radii = stylex.defineVars({
|
|
148
|
+
xs: '2px',
|
|
149
|
+
sm: '4px',
|
|
150
|
+
md: '6px',
|
|
151
|
+
lg: '8px',
|
|
152
|
+
xl: '10px',
|
|
153
|
+
xxl: '12px',
|
|
154
|
+
xxxl: '16px',
|
|
155
|
+
xxxxl: '20px',
|
|
156
|
+
full: '9999px'
|
|
157
|
+
});
|
|
158
|
+
export const fontSizes = stylex.defineVars({
|
|
159
|
+
captionXs: '8px',
|
|
160
|
+
captionSm: '10px',
|
|
161
|
+
captionBase: '11px',
|
|
162
|
+
captionLg: '12px',
|
|
163
|
+
bodySm: '13px',
|
|
164
|
+
bodyBase: '15px',
|
|
165
|
+
bodyLg: '18px',
|
|
166
|
+
heading6: '20px',
|
|
167
|
+
heading5: '24px',
|
|
168
|
+
heading4: '28px',
|
|
169
|
+
heading3: '36px',
|
|
170
|
+
heading2: '44px',
|
|
171
|
+
heading1: '56px'
|
|
172
|
+
});
|
|
173
|
+
export const lineHeights = stylex.defineVars({
|
|
174
|
+
captionXs: '12px',
|
|
175
|
+
caption: '16px',
|
|
176
|
+
title: '18px',
|
|
177
|
+
bodySm: '20px',
|
|
178
|
+
body: '24px',
|
|
179
|
+
heading6: '24px',
|
|
180
|
+
heading5: '32px',
|
|
181
|
+
heading4: '36px',
|
|
182
|
+
heading3: '44px',
|
|
183
|
+
heading2: '56px',
|
|
184
|
+
heading1: '56px'
|
|
185
|
+
});
|
|
186
|
+
export const fonts = stylex.defineVars({
|
|
187
|
+
sans: '"Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
188
|
+
mono: 'ui-monospace, SFMono-Regular, Menlo, monospace'
|
|
189
|
+
});
|
|
190
|
+
export const fontFeatures = stylex.defineVars({
|
|
191
|
+
sans: '"ss03"',
|
|
192
|
+
kbd: '"ss02"'
|
|
193
|
+
});
|
|
194
|
+
export const fontWeights = stylex.defineVars({
|
|
195
|
+
normal: '400',
|
|
196
|
+
semimedium: '450',
|
|
197
|
+
medium: '500',
|
|
198
|
+
semibold: '600',
|
|
199
|
+
bold: '700'
|
|
200
|
+
});
|
|
201
|
+
export const shadows = stylex.defineVars({
|
|
202
|
+
border: '0 0 0 1px light-dark(#00000012, #ffffff12)',
|
|
203
|
+
default: '0 0 0 .5px light-dark(#0000, #ffffff12) inset, 0 0 0 .5px light-dark(#0000000f, #0000), 0 1px 1px -1px light-dark(#0000001a, #0000), 0 1px 2px 0px light-dark(#0000000d, #0000)',
|
|
204
|
+
large: '0 0 0 .5px light-dark(color-mix(in oklab, #0000000f, #f0f0f0 25%), #0000), 0 0 0 1px light-dark(#0000, color-mix(in oklab, #ffffff12, #3a3a3a 25%)), 0 2px 3px -2px light-dark(#0000000f, #00000026), 0 3px 12px -4px light-dark(#0000001a, #0000), 0 4px 16px -8px light-dark(#0000000d, #0000), 0 3px 8px -2px light-dark(#0000, #0006), 0 4px 12px -4px light-dark(#0000, #00000080)',
|
|
205
|
+
extraLarge: '0 0 0 .5px light-dark(#0000, #ffffff12) inset, 0 0 0 .5px light-dark(#0000000f, #0000), 0 8px 40px 0px #0000000d, 0 12px 32px -16px #00000026'
|
|
206
|
+
});
|
|
207
|
+
export const motion = stylex.defineVars({
|
|
208
|
+
easeOut: 'cubic-bezier(0, 0, .2, 1)',
|
|
209
|
+
easeInOut: 'cubic-bezier(.4, 0, .2, 1)',
|
|
210
|
+
slideEasing: 'cubic-bezier(0.32, 0.72, 0, 1)',
|
|
211
|
+
instant: {
|
|
212
|
+
default: '75ms',
|
|
213
|
+
'@media (prefers-reduced-motion: reduce)': '0ms'
|
|
214
|
+
},
|
|
215
|
+
exit: {
|
|
216
|
+
default: '120ms',
|
|
217
|
+
'@media (prefers-reduced-motion: reduce)': '0ms'
|
|
218
|
+
},
|
|
219
|
+
fast: {
|
|
220
|
+
default: '150ms',
|
|
221
|
+
'@media (prefers-reduced-motion: reduce)': '0ms'
|
|
222
|
+
},
|
|
223
|
+
base: {
|
|
224
|
+
default: '200ms',
|
|
225
|
+
'@media (prefers-reduced-motion: reduce)': '0ms'
|
|
226
|
+
},
|
|
227
|
+
slide: {
|
|
228
|
+
default: '300ms',
|
|
229
|
+
'@media (prefers-reduced-motion: reduce)': '0ms'
|
|
230
|
+
},
|
|
231
|
+
pulse: '2s',
|
|
232
|
+
spin: '1200ms'
|
|
233
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const COMMAND_EVENT = 'pattern:command';
|
|
2
|
+
const REPLY_EVENT = 'pattern:reply';
|
|
3
|
+
const REPLY_TIMEOUT_MS = 3000;
|
|
4
|
+
const NO_APP_OPEN = 'No Pattern app is open in a browser. Open the dev server URL (app start opens it), then send again.';
|
|
5
|
+
export function commandBridge() {
|
|
6
|
+
return {
|
|
7
|
+
name: 'pattern-command-bridge',
|
|
8
|
+
apply: 'serve',
|
|
9
|
+
configureServer(server) {
|
|
10
|
+
const waiting = new Map();
|
|
11
|
+
server.ws.on(REPLY_EVENT, (reply) => {
|
|
12
|
+
waiting.get(reply.id)?.(reply);
|
|
13
|
+
waiting.delete(reply.id);
|
|
14
|
+
});
|
|
15
|
+
server.middlewares.use('/__pattern/send', (request, response) => {
|
|
16
|
+
let body = '';
|
|
17
|
+
request.on('data', (chunk) => (body += chunk.toString()));
|
|
18
|
+
request.on('end', () => {
|
|
19
|
+
const id = crypto.randomUUID();
|
|
20
|
+
const respond = (status, payload) => {
|
|
21
|
+
response.statusCode = status;
|
|
22
|
+
response.setHeader('content-type', 'application/json');
|
|
23
|
+
response.end(JSON.stringify(payload));
|
|
24
|
+
};
|
|
25
|
+
let command;
|
|
26
|
+
try {
|
|
27
|
+
command = JSON.parse(body);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
respond(400, { error: `Command is not valid JSON: ${body}` });
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const timer = setTimeout(() => {
|
|
34
|
+
waiting.delete(id);
|
|
35
|
+
respond(503, { error: NO_APP_OPEN });
|
|
36
|
+
}, REPLY_TIMEOUT_MS);
|
|
37
|
+
waiting.set(id, (reply) => {
|
|
38
|
+
clearTimeout(timer);
|
|
39
|
+
respond(200, reply);
|
|
40
|
+
});
|
|
41
|
+
server.ws.send(COMMAND_EVENT, { id, command });
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type Counts = Record<string, number>;
|
|
2
|
+
type PrimitiveUse = {
|
|
3
|
+
uses: number;
|
|
4
|
+
props: Record<string, Counts>;
|
|
5
|
+
};
|
|
6
|
+
type TokenEntry = {
|
|
7
|
+
value: string;
|
|
8
|
+
isOverridden: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type DesignManifest = {
|
|
11
|
+
sdk: string;
|
|
12
|
+
tokens: Record<string, Record<string, TokenEntry>>;
|
|
13
|
+
primitives: Record<string, PrimitiveUse>;
|
|
14
|
+
customPieces: {
|
|
15
|
+
name: string;
|
|
16
|
+
file: string;
|
|
17
|
+
tokens: string[];
|
|
18
|
+
}[];
|
|
19
|
+
icons: {
|
|
20
|
+
builtIn: string[];
|
|
21
|
+
app: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function designManifest(root: string): DesignManifest;
|
|
25
|
+
export {};
|