@allternit/gizzi-code 1.0.0 → 1.0.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/bin/gizzi +4 -0
- package/bin/gizzi-ink +5 -0
- package/package.json +137 -31
- package/src/Tool.ts +26 -0
- package/src/bootstrap/state.ts +165 -322
- package/src/commands.ts +209 -0
- package/src/context/QueuedMessageContext.tsx +63 -0
- package/src/context/fpsMetrics.tsx +30 -0
- package/src/context/mailbox.tsx +38 -0
- package/src/context/modalContext.tsx +58 -0
- package/src/context/notifications.tsx +240 -0
- package/src/context/overlayContext.tsx +151 -0
- package/src/context/promptOverlayContext.tsx +125 -0
- package/src/context/stats.tsx +220 -0
- package/src/context/voice.tsx +88 -0
- package/src/hooks/useCanUseTool.ts +11 -0
- package/src/hooks/useExitOnCtrlCD.ts +40 -187
- package/src/hooks/useExitOnCtrlCDWithKeybindings.ts +68 -0
- package/src/hooks/useKeybinding.ts +68 -209
- package/src/hooks/useTerminalSize.ts +31 -99
- package/src/hooks.ts +37 -0
- package/src/ink.ts +204 -0
- package/src/main.ts +7 -0
- package/src/types/command.ts +216 -0
- package/src/types/connectorText.ts +39 -0
- package/src/types/fileSuggestion.ts +15 -0
- package/src/types/generated/events_mono/claude_code/v1/claude_code_internal_event.ts +865 -0
- package/src/types/generated/events_mono/common/v1/auth.ts +100 -0
- package/src/types/generated/events_mono/growthbook/v1/growthbook_experiment_event.ts +223 -0
- package/src/types/generated/google/protobuf/timestamp.ts +187 -0
- package/src/types/hooks.ts +319 -0
- package/src/types/ids.ts +44 -0
- package/src/types/logs.ts +331 -0
- package/src/types/merged/index.ts +5 -0
- package/src/types/merged/message.ts +552 -0
- package/src/types/message.ts +927 -186
- package/src/types/messageQueueTypes.ts +21 -0
- package/src/types/notebook.ts +72 -0
- package/src/types/permissions.ts +447 -0
- package/src/types/plugin.ts +363 -0
- package/src/types/statusLine.ts +15 -0
- package/src/types/textInputTypes.ts +387 -0
- package/src/types/tools.ts +149 -0
- package/src/types/utils.ts +20 -0
- package/src/utils/advisor.ts +12 -0
- package/src/utils/api.ts +29 -0
- package/src/utils/array.ts +7 -0
- package/src/utils/attachments.ts +60 -0
- package/src/utils/auth.ts +3 -0
- package/src/utils/claudeInChrome/chromeNativeHost.ts +15 -0
- package/src/utils/claudeInChrome/common.ts +12 -0
- package/src/utils/claudeInChrome/mcpServer.ts +15 -0
- package/src/utils/computerUse/common.ts +19 -0
- package/src/utils/computerUse/mcpServer.ts +15 -0
- package/src/utils/config.ts +35 -0
- package/src/utils/context.ts +19 -0
- package/src/utils/cwd.ts +3 -0
- package/src/utils/debug.ts +3 -0
- package/src/utils/earlyInput.ts +7 -0
- package/src/utils/effort.ts +13 -0
- package/src/utils/embeddedTools.ts +12 -0
- package/src/utils/envUtils.ts +3 -0
- package/src/utils/errors.ts +3 -0
- package/src/utils/execFileNoThrow.ts +24 -0
- package/src/utils/feature-flags.ts +112 -0
- package/src/utils/file.ts +3 -0
- package/src/utils/fileHistory.ts +17 -0
- package/src/utils/fingerprint.ts +7 -0
- package/src/utils/format.ts +75 -305
- package/src/utils/frontmatterParser.ts +33 -0
- package/src/utils/fsOperations.ts +31 -0
- package/src/utils/fullscreen.ts +40 -350
- package/src/utils/git.ts +15 -0
- package/src/utils/imageResizer.ts +30 -0
- package/src/utils/lazySchema.ts +9 -0
- package/src/utils/log.ts +3 -0
- package/src/utils/markdownConfigLoader.ts +12 -0
- package/src/utils/messages.ts +13 -0
- package/src/utils/migration.ts +137 -0
- package/src/utils/model/providers.ts +15 -0
- package/src/utils/path.ts +3 -0
- package/src/utils/permissions/PermissionResult.ts +14 -0
- package/src/utils/permissions/autoModeState.ts +12 -0
- package/src/utils/permissions/filesystem.ts +12 -0
- package/src/utils/plugins/loadPluginOutputStyles.ts +12 -0
- package/src/utils/plugins/schemas.ts +25 -0
- package/src/utils/process.ts +16 -0
- package/src/utils/sandbox/sandbox-adapter.ts +19 -0
- package/src/utils/sessionStorage.ts +238 -472
- package/src/utils/settings/constants.ts +10 -0
- package/src/utils/settings/settings.ts +19 -0
- package/src/utils/settings/types.ts +18 -0
- package/src/utils/shell/shellToolUtils.ts +9 -0
- package/src/utils/sinks.ts +11 -0
- package/src/utils/sleep.ts +7 -0
- package/src/utils/sliceAnsi.ts +7 -0
- package/src/utils/slowOperations.ts +3 -0
- package/src/utils/startupProfiler.ts +11 -0
- package/src/utils/stringUtils.ts +106 -0
- package/src/utils/systemPromptType.ts +9 -0
- package/src/utils/teleport/api.ts +15 -0
- package/src/utils/textHighlighting.ts +16 -0
- package/src/utils/theme.ts +17 -0
- package/src/utils/thinking.ts +58 -0
- package/src/utils/tokens.ts +11 -0
- package/src/utils/toolResultStorage.ts +17 -0
- package/src/utils/worktreeModeEnabled.ts +7 -0
- package/WORKSPACE_INTEGRATION.md +0 -290
- package/chat-sessions/sessions-index.json +0 -98
- package/package.json.original +0 -31
- package/package.json.publish +0 -47
- package/src/bootstrap/state.d.ts +0 -169
- package/src/bootstrap/state.js +0 -261
- package/src/context/pack-builder.d.ts +0 -24
- package/src/context/pack-builder.js +0 -281
- package/src/hooks/useExitOnCtrlCD.d.ts +0 -86
- package/src/hooks/useExitOnCtrlCD.js +0 -130
- package/src/hooks/useKeybinding.d.ts +0 -89
- package/src/hooks/useKeybinding.js +0 -163
- package/src/hooks/useTerminalSize.d.ts +0 -41
- package/src/hooks/useTerminalSize.js +0 -90
- package/src/index.d.ts +0 -23
- package/src/index.js +0 -24
- package/src/runtime/brand/brand.d.ts +0 -488
- package/src/runtime/brand/brand.js +0 -464
- package/src/runtime/brand/brand.ts +0 -667
- package/src/runtime/services/tokenEstimation.d.ts +0 -187
- package/src/runtime/services/tokenEstimation.js +0 -423
- package/src/runtime/services/tokenEstimation.ts +0 -547
- package/src/runtime/tools/Tool.d.ts +0 -239
- package/src/runtime/tools/Tool.js +0 -285
- package/src/runtime/tools/Tool.ts +0 -524
- package/src/scheduler/TaskScheduler.d.ts +0 -98
- package/src/scheduler/TaskScheduler.js +0 -201
- package/src/scheduler/TaskScheduler.ts +0 -259
- package/src/state/AppStateStore.d.ts +0 -347
- package/src/state/AppStateStore.js +0 -439
- package/src/state/AppStateStore.ts +0 -658
- package/src/state/WorkspaceStateStore.d.ts +0 -43
- package/src/state/WorkspaceStateStore.js +0 -224
- package/src/state/WorkspaceStateStore.ts +0 -297
- package/src/types/message.d.ts +0 -190
- package/src/types/message.js +0 -77
- package/src/utils/format.d.ts +0 -126
- package/src/utils/format.js +0 -230
- package/src/utils/fullscreen.d.ts +0 -161
- package/src/utils/fullscreen.js +0 -277
- package/src/utils/sessionStorage.d.ts +0 -210
- package/src/utils/sessionStorage.js +0 -435
- package/src/watcher/WorkspaceWatcher.d.ts +0 -70
- package/src/watcher/WorkspaceWatcher.js +0 -191
- package/src/watcher/WorkspaceWatcher.ts +0 -251
- package/src/workspace/loader.d.ts +0 -30
- package/src/workspace/loader.js +0 -117
- package/src/workspace/types.d.ts +0 -91
- package/src/workspace/types.js +0 -7
- package/threads/thread_1775361175022.json +0 -9
- package/tsconfig.json +0 -14
|
@@ -1,488 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Branding utilities and configuration for gizzi-code
|
|
3
|
-
* @module runtime/brand/brand
|
|
4
|
-
*
|
|
5
|
-
* Provides centralized brand constants, color schemes, and theming
|
|
6
|
-
* configuration for the gizzi-code runtime environment.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Brand name constants
|
|
10
|
-
* @constant {Readonly<{FULL: string; SHORT: string; CODE: string; PACKAGE: string}>}
|
|
11
|
-
*/
|
|
12
|
-
export declare const Brand: {
|
|
13
|
-
/** Full brand name */
|
|
14
|
-
readonly FULL: "gizzi-code";
|
|
15
|
-
/** Short brand name */
|
|
16
|
-
readonly SHORT: "gizzi";
|
|
17
|
-
/** Code identifier */
|
|
18
|
-
readonly CODE: "gizzi-code";
|
|
19
|
-
/** Package name */
|
|
20
|
-
readonly PACKAGE: "@gizzi/code";
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Brand version information
|
|
24
|
-
* @constant {Readonly<{MAJOR: number; MINOR: number; PATCH: number; STRING: string}>}
|
|
25
|
-
*/
|
|
26
|
-
export declare const BrandVersion: {
|
|
27
|
-
/** Major version */
|
|
28
|
-
readonly MAJOR: 0;
|
|
29
|
-
/** Minor version */
|
|
30
|
-
readonly MINOR: 1;
|
|
31
|
-
/** Patch version */
|
|
32
|
-
readonly PATCH: 0;
|
|
33
|
-
/** Full version string */
|
|
34
|
-
readonly STRING: "0.1.0";
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Color hex value type
|
|
38
|
-
* @typedef {`#${string}`} HexColor
|
|
39
|
-
*/
|
|
40
|
-
export type HexColor = `#${string}`;
|
|
41
|
-
/**
|
|
42
|
-
* RGB color values
|
|
43
|
-
* @interface RGBColor
|
|
44
|
-
*/
|
|
45
|
-
export interface RGBColor {
|
|
46
|
-
readonly r: number;
|
|
47
|
-
readonly g: number;
|
|
48
|
-
readonly b: number;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* RGBA color values with alpha
|
|
52
|
-
* @interface RGBAColor
|
|
53
|
-
*/
|
|
54
|
-
export interface RGBAColor extends RGBColor {
|
|
55
|
-
readonly a: number;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Complete color palette for a theme variant
|
|
59
|
-
* @interface BrandColorPalette
|
|
60
|
-
*/
|
|
61
|
-
export interface BrandColorPalette {
|
|
62
|
-
/** Primary brand color */
|
|
63
|
-
readonly primary: HexColor;
|
|
64
|
-
/** Secondary brand color */
|
|
65
|
-
readonly secondary: HexColor;
|
|
66
|
-
/** Accent color for highlights */
|
|
67
|
-
readonly accent: HexColor;
|
|
68
|
-
/** Background color */
|
|
69
|
-
readonly background: HexColor;
|
|
70
|
-
/** Surface color for cards/elevated elements */
|
|
71
|
-
readonly surface: HexColor;
|
|
72
|
-
/** Primary text color */
|
|
73
|
-
readonly text: HexColor;
|
|
74
|
-
/** Secondary/muted text color */
|
|
75
|
-
readonly textMuted: HexColor;
|
|
76
|
-
/** Error color */
|
|
77
|
-
readonly error: HexColor;
|
|
78
|
-
/** Warning color */
|
|
79
|
-
readonly warning: HexColor;
|
|
80
|
-
/** Success color */
|
|
81
|
-
readonly success: HexColor;
|
|
82
|
-
/** Info color */
|
|
83
|
-
readonly info: HexColor;
|
|
84
|
-
/** Border color */
|
|
85
|
-
readonly border: HexColor;
|
|
86
|
-
/** Divider color */
|
|
87
|
-
readonly divider: HexColor;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Complete brand color scheme with all theme variants
|
|
91
|
-
* @interface BrandColorScheme
|
|
92
|
-
*/
|
|
93
|
-
export interface BrandColorScheme {
|
|
94
|
-
/** Light theme colors */
|
|
95
|
-
readonly light: BrandColorPalette;
|
|
96
|
-
/** Dark theme colors */
|
|
97
|
-
readonly dark: BrandColorPalette;
|
|
98
|
-
/** High contrast theme colors */
|
|
99
|
-
readonly highContrast: BrandColorPalette;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Theme mode options
|
|
103
|
-
* @typedef {'light' | 'dark' | 'high-contrast' | 'auto'} ThemeMode
|
|
104
|
-
*/
|
|
105
|
-
export type ThemeMode = 'light' | 'dark' | 'high-contrast' | 'auto';
|
|
106
|
-
/**
|
|
107
|
-
* Default light theme color palette
|
|
108
|
-
* @constant {Readonly<BrandColorPalette>}
|
|
109
|
-
*/
|
|
110
|
-
export declare const LightColors: BrandColorPalette;
|
|
111
|
-
/**
|
|
112
|
-
* Default dark theme color palette
|
|
113
|
-
* @constant {Readonly<BrandColorPalette>}
|
|
114
|
-
*/
|
|
115
|
-
export declare const DarkColors: BrandColorPalette;
|
|
116
|
-
/**
|
|
117
|
-
* High contrast theme for accessibility
|
|
118
|
-
* @constant {Readonly<BrandColorPalette>}
|
|
119
|
-
*/
|
|
120
|
-
export declare const HighContrastColors: BrandColorPalette;
|
|
121
|
-
/**
|
|
122
|
-
* Complete brand color scheme
|
|
123
|
-
* @constant {Readonly<BrandColorScheme>}
|
|
124
|
-
*/
|
|
125
|
-
export declare const BrandColors: BrandColorScheme;
|
|
126
|
-
/**
|
|
127
|
-
* Brand typography configuration
|
|
128
|
-
* @interface BrandTypography
|
|
129
|
-
*/
|
|
130
|
-
export interface BrandTypography {
|
|
131
|
-
/** Font family stack */
|
|
132
|
-
readonly fontFamily: string;
|
|
133
|
-
/** Monospace font family for code */
|
|
134
|
-
readonly fontFamilyMono: string;
|
|
135
|
-
/** Base font size in pixels */
|
|
136
|
-
readonly baseSize: number;
|
|
137
|
-
/** Line height ratio */
|
|
138
|
-
readonly lineHeight: number;
|
|
139
|
-
/** Font weights */
|
|
140
|
-
readonly weights: {
|
|
141
|
-
readonly normal: number;
|
|
142
|
-
readonly medium: number;
|
|
143
|
-
readonly semibold: number;
|
|
144
|
-
readonly bold: number;
|
|
145
|
-
};
|
|
146
|
-
/** Type scale sizes */
|
|
147
|
-
readonly scale: {
|
|
148
|
-
readonly xs: number;
|
|
149
|
-
readonly sm: number;
|
|
150
|
-
readonly base: number;
|
|
151
|
-
readonly lg: number;
|
|
152
|
-
readonly xl: number;
|
|
153
|
-
readonly '2xl': number;
|
|
154
|
-
readonly '3xl': number;
|
|
155
|
-
readonly '4xl': number;
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Default brand typography
|
|
160
|
-
* @constant {Readonly<BrandTypography>}
|
|
161
|
-
*/
|
|
162
|
-
export declare const BrandTypography: BrandTypography;
|
|
163
|
-
/**
|
|
164
|
-
* Brand spacing configuration (in rem units base)
|
|
165
|
-
* @constant {Readonly<Record<string, number>>}
|
|
166
|
-
*/
|
|
167
|
-
export declare const BrandSpacing: {
|
|
168
|
-
readonly none: 0;
|
|
169
|
-
readonly xs: 0.25;
|
|
170
|
-
readonly sm: 0.5;
|
|
171
|
-
readonly md: 1;
|
|
172
|
-
readonly lg: 1.5;
|
|
173
|
-
readonly xl: 2;
|
|
174
|
-
readonly '2xl': 3;
|
|
175
|
-
readonly '3xl': 4;
|
|
176
|
-
readonly '4xl': 6;
|
|
177
|
-
readonly '5xl': 8;
|
|
178
|
-
};
|
|
179
|
-
/**
|
|
180
|
-
* Brand border radius values
|
|
181
|
-
* @constant {Readonly<Record<string, string>>}
|
|
182
|
-
*/
|
|
183
|
-
export declare const BrandBorderRadius: {
|
|
184
|
-
readonly none: "0";
|
|
185
|
-
readonly sm: "0.125rem";
|
|
186
|
-
readonly md: "0.25rem";
|
|
187
|
-
readonly lg: "0.5rem";
|
|
188
|
-
readonly xl: "0.75rem";
|
|
189
|
-
readonly '2xl': "1rem";
|
|
190
|
-
readonly full: "9999px";
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* Brand shadow values
|
|
194
|
-
* @constant {Readonly<Record<string, string>>}
|
|
195
|
-
*/
|
|
196
|
-
export declare const BrandShadows: {
|
|
197
|
-
readonly none: "none";
|
|
198
|
-
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
199
|
-
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
200
|
-
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
201
|
-
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
202
|
-
readonly '2xl': "0 25px 50px -12px rgb(0 0 0 / 0.25)";
|
|
203
|
-
readonly inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)";
|
|
204
|
-
};
|
|
205
|
-
/**
|
|
206
|
-
* Brand breakpoints for responsive design
|
|
207
|
-
* @constant {Readonly<Record<string, number>>}
|
|
208
|
-
*/
|
|
209
|
-
export declare const BrandBreakpoints: {
|
|
210
|
-
readonly xs: 0;
|
|
211
|
-
readonly sm: 640;
|
|
212
|
-
readonly md: 768;
|
|
213
|
-
readonly lg: 1024;
|
|
214
|
-
readonly xl: 1280;
|
|
215
|
-
readonly '2xl': 1536;
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* Animation timing values
|
|
219
|
-
* @constant {Readonly<Record<string, number>>}
|
|
220
|
-
*/
|
|
221
|
-
export declare const BrandAnimation: {
|
|
222
|
-
readonly instant: 0;
|
|
223
|
-
readonly fast: 100;
|
|
224
|
-
readonly normal: 200;
|
|
225
|
-
readonly slow: 300;
|
|
226
|
-
readonly slower: 500;
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* Easing functions
|
|
230
|
-
* @constant {Readonly<Record<string, string>>}
|
|
231
|
-
*/
|
|
232
|
-
export declare const BrandEasing: {
|
|
233
|
-
readonly linear: "linear";
|
|
234
|
-
readonly ease: "ease";
|
|
235
|
-
readonly easeIn: "ease-in";
|
|
236
|
-
readonly easeOut: "ease-out";
|
|
237
|
-
readonly easeInOut: "ease-in-out";
|
|
238
|
-
readonly spring: "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
239
|
-
};
|
|
240
|
-
/**
|
|
241
|
-
* Complete brand configuration object
|
|
242
|
-
* @interface BrandConfig
|
|
243
|
-
*/
|
|
244
|
-
export interface BrandConfig {
|
|
245
|
-
readonly name: typeof Brand;
|
|
246
|
-
readonly version: typeof BrandVersion;
|
|
247
|
-
readonly colors: BrandColorScheme;
|
|
248
|
-
readonly typography: BrandTypography;
|
|
249
|
-
readonly spacing: typeof BrandSpacing;
|
|
250
|
-
readonly borderRadius: typeof BrandBorderRadius;
|
|
251
|
-
readonly shadows: typeof BrandShadows;
|
|
252
|
-
readonly breakpoints: typeof BrandBreakpoints;
|
|
253
|
-
readonly animation: typeof BrandAnimation;
|
|
254
|
-
readonly easing: typeof BrandEasing;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Complete brand configuration
|
|
258
|
-
* @constant {Readonly<BrandConfig>}
|
|
259
|
-
*/
|
|
260
|
-
export declare const BrandConfig: BrandConfig;
|
|
261
|
-
/**
|
|
262
|
-
* Get brand colors for a specific theme mode
|
|
263
|
-
*
|
|
264
|
-
* @param {ThemeMode} mode - Theme mode to get colors for
|
|
265
|
-
* @param {BrandColorScheme} colors - Color scheme to use (defaults to BrandColors)
|
|
266
|
-
* @returns {BrandColorPalette} Color palette for the specified mode
|
|
267
|
-
*
|
|
268
|
-
* @example
|
|
269
|
-
* ```typescript
|
|
270
|
-
* const darkColors = getBrandColors('dark');
|
|
271
|
-
* console.log(darkColors.background); // '#0f172a'
|
|
272
|
-
* ```
|
|
273
|
-
*/
|
|
274
|
-
export declare function getBrandColors(mode: ThemeMode, colors?: BrandColorScheme): BrandColorPalette;
|
|
275
|
-
/**
|
|
276
|
-
* Convert hex color to RGB values
|
|
277
|
-
*
|
|
278
|
-
* @param {HexColor} hex - Hex color value
|
|
279
|
-
* @returns {RGBColor | null} RGB values or null if invalid
|
|
280
|
-
*
|
|
281
|
-
* @example
|
|
282
|
-
* ```typescript
|
|
283
|
-
* const rgb = hexToRgb('#2563eb');
|
|
284
|
-
* console.log(rgb); // { r: 37, g: 99, b: 235 }
|
|
285
|
-
* ```
|
|
286
|
-
*/
|
|
287
|
-
export declare function hexToRgb(hex: HexColor): RGBColor | null;
|
|
288
|
-
/**
|
|
289
|
-
* Convert RGB values to hex color
|
|
290
|
-
*
|
|
291
|
-
* @param {number} r - Red value (0-255)
|
|
292
|
-
* @param {number} g - Green value (0-255)
|
|
293
|
-
* @param {number} b - Blue value (0-255)
|
|
294
|
-
* @returns {HexColor} Hex color value
|
|
295
|
-
*
|
|
296
|
-
* @example
|
|
297
|
-
* ```typescript
|
|
298
|
-
* const hex = rgbToHex(37, 99, 235);
|
|
299
|
-
* console.log(hex); // '#2563eb'
|
|
300
|
-
* ```
|
|
301
|
-
*/
|
|
302
|
-
export declare function rgbToHex(r: number, g: number, b: number): HexColor;
|
|
303
|
-
/**
|
|
304
|
-
* Convert hex color to RGBA with alpha
|
|
305
|
-
*
|
|
306
|
-
* @param {HexColor} hex - Hex color value
|
|
307
|
-
* @param {number} alpha - Alpha value (0-1)
|
|
308
|
-
* @returns {string} RGBA color string
|
|
309
|
-
*
|
|
310
|
-
* @example
|
|
311
|
-
* ```typescript
|
|
312
|
-
* const rgba = hexToRgba('#2563eb', 0.5);
|
|
313
|
-
* console.log(rgba); // 'rgba(37, 99, 235, 0.5)'
|
|
314
|
-
* ```
|
|
315
|
-
*/
|
|
316
|
-
export declare function hexToRgba(hex: HexColor, alpha: number): string;
|
|
317
|
-
/**
|
|
318
|
-
* Lighten a hex color by a percentage
|
|
319
|
-
*
|
|
320
|
-
* @param {HexColor} hex - Hex color value
|
|
321
|
-
* @param {number} percent - Percentage to lighten (0-100)
|
|
322
|
-
* @returns {HexColor} Lightened hex color
|
|
323
|
-
*
|
|
324
|
-
* @example
|
|
325
|
-
* ```typescript
|
|
326
|
-
* const lightBlue = lightenColor('#2563eb', 20);
|
|
327
|
-
* ```
|
|
328
|
-
*/
|
|
329
|
-
export declare function lightenColor(hex: HexColor, percent: number): HexColor;
|
|
330
|
-
/**
|
|
331
|
-
* Darken a hex color by a percentage
|
|
332
|
-
*
|
|
333
|
-
* @param {HexColor} hex - Hex color value
|
|
334
|
-
* @param {number} percent - Percentage to darken (0-100)
|
|
335
|
-
* @returns {HexColor} Darkened hex color
|
|
336
|
-
*
|
|
337
|
-
* @example
|
|
338
|
-
* ```typescript
|
|
339
|
-
* const darkBlue = darkenColor('#2563eb', 20);
|
|
340
|
-
* ```
|
|
341
|
-
*/
|
|
342
|
-
export declare function darkenColor(hex: HexColor, percent: number): HexColor;
|
|
343
|
-
/**
|
|
344
|
-
* Check if a color is light (for determining text contrast)
|
|
345
|
-
*
|
|
346
|
-
* @param {HexColor} hex - Hex color value
|
|
347
|
-
* @returns {boolean} True if the color is light
|
|
348
|
-
*
|
|
349
|
-
* @example
|
|
350
|
-
* ```typescript
|
|
351
|
-
* const isLight = isLightColor('#ffffff'); // true
|
|
352
|
-
* const isDark = isLightColor('#000000'); // false
|
|
353
|
-
* ```
|
|
354
|
-
*/
|
|
355
|
-
export declare function isLightColor(hex: HexColor): boolean;
|
|
356
|
-
/**
|
|
357
|
-
* Get the appropriate text color (light or dark) for contrast against a background
|
|
358
|
-
*
|
|
359
|
-
* @param {HexColor} backgroundColor - Background hex color
|
|
360
|
-
* @returns {{ light: HexColor; dark: HexColor }} Text colors for contrast
|
|
361
|
-
*
|
|
362
|
-
* @example
|
|
363
|
-
* ```typescript
|
|
364
|
-
* const textColors = getContrastText('#2563eb');
|
|
365
|
-
* console.log(textColors.light); // '#ffffff' (use this for dark backgrounds)
|
|
366
|
-
* ```
|
|
367
|
-
*/
|
|
368
|
-
export declare function getContrastText(backgroundColor: HexColor): {
|
|
369
|
-
light: HexColor;
|
|
370
|
-
dark: HexColor;
|
|
371
|
-
};
|
|
372
|
-
/**
|
|
373
|
-
* Get the best text color for contrast against a background
|
|
374
|
-
*
|
|
375
|
-
* @param {HexColor} backgroundColor - Background hex color
|
|
376
|
-
* @returns {HexColor} Best text color for contrast
|
|
377
|
-
*
|
|
378
|
-
* @example
|
|
379
|
-
* ```typescript
|
|
380
|
-
* const textColor = getBestContrastText('#0f172a'); // '#ffffff'
|
|
381
|
-
* ```
|
|
382
|
-
*/
|
|
383
|
-
export declare function getBestContrastText(backgroundColor: HexColor): HexColor;
|
|
384
|
-
/**
|
|
385
|
-
* CSS custom properties (variables) generator for brand colors
|
|
386
|
-
*
|
|
387
|
-
* @param {ThemeMode} mode - Theme mode
|
|
388
|
-
* @returns {Record<string, string>} CSS variable names and values
|
|
389
|
-
*
|
|
390
|
-
* @example
|
|
391
|
-
* ```typescript
|
|
392
|
-
* const cssVars = generateCSSVariables('dark');
|
|
393
|
-
* // { '--gizzi-primary': '#3b82f6', ... }
|
|
394
|
-
* ```
|
|
395
|
-
*/
|
|
396
|
-
export declare function generateCSSVariables(mode: ThemeMode): Record<string, string>;
|
|
397
|
-
declare const _default: {
|
|
398
|
-
Brand: {
|
|
399
|
-
/** Full brand name */
|
|
400
|
-
readonly FULL: "gizzi-code";
|
|
401
|
-
/** Short brand name */
|
|
402
|
-
readonly SHORT: "gizzi";
|
|
403
|
-
/** Code identifier */
|
|
404
|
-
readonly CODE: "gizzi-code";
|
|
405
|
-
/** Package name */
|
|
406
|
-
readonly PACKAGE: "@gizzi/code";
|
|
407
|
-
};
|
|
408
|
-
BrandVersion: {
|
|
409
|
-
/** Major version */
|
|
410
|
-
readonly MAJOR: 0;
|
|
411
|
-
/** Minor version */
|
|
412
|
-
readonly MINOR: 1;
|
|
413
|
-
/** Patch version */
|
|
414
|
-
readonly PATCH: 0;
|
|
415
|
-
/** Full version string */
|
|
416
|
-
readonly STRING: "0.1.0";
|
|
417
|
-
};
|
|
418
|
-
BrandColors: BrandColorScheme;
|
|
419
|
-
BrandConfig: BrandConfig;
|
|
420
|
-
LightColors: BrandColorPalette;
|
|
421
|
-
DarkColors: BrandColorPalette;
|
|
422
|
-
HighContrastColors: BrandColorPalette;
|
|
423
|
-
BrandTypography: BrandTypography;
|
|
424
|
-
BrandSpacing: {
|
|
425
|
-
readonly none: 0;
|
|
426
|
-
readonly xs: 0.25;
|
|
427
|
-
readonly sm: 0.5;
|
|
428
|
-
readonly md: 1;
|
|
429
|
-
readonly lg: 1.5;
|
|
430
|
-
readonly xl: 2;
|
|
431
|
-
readonly '2xl': 3;
|
|
432
|
-
readonly '3xl': 4;
|
|
433
|
-
readonly '4xl': 6;
|
|
434
|
-
readonly '5xl': 8;
|
|
435
|
-
};
|
|
436
|
-
BrandBorderRadius: {
|
|
437
|
-
readonly none: "0";
|
|
438
|
-
readonly sm: "0.125rem";
|
|
439
|
-
readonly md: "0.25rem";
|
|
440
|
-
readonly lg: "0.5rem";
|
|
441
|
-
readonly xl: "0.75rem";
|
|
442
|
-
readonly '2xl': "1rem";
|
|
443
|
-
readonly full: "9999px";
|
|
444
|
-
};
|
|
445
|
-
BrandShadows: {
|
|
446
|
-
readonly none: "none";
|
|
447
|
-
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
448
|
-
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
449
|
-
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
450
|
-
readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
451
|
-
readonly '2xl': "0 25px 50px -12px rgb(0 0 0 / 0.25)";
|
|
452
|
-
readonly inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)";
|
|
453
|
-
};
|
|
454
|
-
BrandBreakpoints: {
|
|
455
|
-
readonly xs: 0;
|
|
456
|
-
readonly sm: 640;
|
|
457
|
-
readonly md: 768;
|
|
458
|
-
readonly lg: 1024;
|
|
459
|
-
readonly xl: 1280;
|
|
460
|
-
readonly '2xl': 1536;
|
|
461
|
-
};
|
|
462
|
-
BrandAnimation: {
|
|
463
|
-
readonly instant: 0;
|
|
464
|
-
readonly fast: 100;
|
|
465
|
-
readonly normal: 200;
|
|
466
|
-
readonly slow: 300;
|
|
467
|
-
readonly slower: 500;
|
|
468
|
-
};
|
|
469
|
-
BrandEasing: {
|
|
470
|
-
readonly linear: "linear";
|
|
471
|
-
readonly ease: "ease";
|
|
472
|
-
readonly easeIn: "ease-in";
|
|
473
|
-
readonly easeOut: "ease-out";
|
|
474
|
-
readonly easeInOut: "ease-in-out";
|
|
475
|
-
readonly spring: "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
476
|
-
};
|
|
477
|
-
getBrandColors: typeof getBrandColors;
|
|
478
|
-
hexToRgb: typeof hexToRgb;
|
|
479
|
-
rgbToHex: typeof rgbToHex;
|
|
480
|
-
hexToRgba: typeof hexToRgba;
|
|
481
|
-
lightenColor: typeof lightenColor;
|
|
482
|
-
darkenColor: typeof darkenColor;
|
|
483
|
-
isLightColor: typeof isLightColor;
|
|
484
|
-
getContrastText: typeof getContrastText;
|
|
485
|
-
getBestContrastText: typeof getBestContrastText;
|
|
486
|
-
generateCSSVariables: typeof generateCSSVariables;
|
|
487
|
-
};
|
|
488
|
-
export default _default;
|