@ceebee/ui 1.4.1 → 1.5.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/dist/client.d.ts +39 -13
- package/dist/client.js +699 -5
- package/dist/index.d.ts +25 -1
- package/dist/index.js +684 -1
- package/dist/styles.css +111 -9
- package/package.json +7 -6
package/dist/client.d.ts
CHANGED
|
@@ -2,22 +2,42 @@ import { ThemeConfig } from 'antd';
|
|
|
2
2
|
export * from 'antd';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
+
import { createCache } from '@ant-design/cssinjs';
|
|
5
6
|
export { default as enUSLocale } from 'antd/locale/en_US.js';
|
|
6
7
|
export { default as enUSDatePickerLocale } from 'antd/lib/date-picker/locale/en_US.js';
|
|
7
8
|
export { default as idIDLocale } from 'antd/locale/id_ID.js';
|
|
8
9
|
export { default as zhCNLocale } from 'antd/locale/zh_CN.js';
|
|
9
10
|
import * as _base_ui_react from '@base-ui/react';
|
|
10
11
|
|
|
12
|
+
type CeebeeSkin = 'ceebee' | 'astra' | 'clarity' | 'moodboard';
|
|
13
|
+
type ThemeMode = 'light' | 'dark';
|
|
14
|
+
type ThemeContrast = 'normal' | 'more';
|
|
15
|
+
|
|
11
16
|
interface ThemeBridgeProps {
|
|
12
17
|
children: ReactNode;
|
|
13
|
-
mode:
|
|
18
|
+
mode: ThemeMode;
|
|
19
|
+
skin?: CeebeeSkin;
|
|
20
|
+
contrast?: ThemeContrast;
|
|
14
21
|
theme?: ThemeConfig;
|
|
15
22
|
}
|
|
16
23
|
/**
|
|
17
24
|
* Translates Ceebee's live CSS Tokens into Ant's theme seed. Ant still owns component geometry,
|
|
18
25
|
* interaction, accessibility, and derived tokens; Ceebee owns the active Skin and colour mode.
|
|
19
26
|
*/
|
|
20
|
-
declare function ThemeBridge({ children, mode, theme }: ThemeBridgeProps): react.JSX.Element;
|
|
27
|
+
declare function ThemeBridge({ children, mode, skin, contrast, theme, }: ThemeBridgeProps): react.JSX.Element;
|
|
28
|
+
|
|
29
|
+
type CeebeeAntStyleCache = ReturnType<typeof createCache>;
|
|
30
|
+
/** Creates the Ant CSS-in-JS cache shared by a framework adapter and CeeBee's Ant runtime. */
|
|
31
|
+
declare function createCeebeeAntStyleCache(): CeebeeAntStyleCache;
|
|
32
|
+
/** Extracts only rules not already emitted from a CeeBee-owned Ant style cache. */
|
|
33
|
+
declare function extractCeebeeAntStyles(cache: CeebeeAntStyleCache): string | undefined;
|
|
34
|
+
|
|
35
|
+
interface CeebeeAntStyleProviderProps {
|
|
36
|
+
cache: CeebeeAntStyleCache;
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
}
|
|
39
|
+
/** Binds Ant rendering to the cache owned by the consumer's framework adapter. */
|
|
40
|
+
declare function CeebeeAntStyleProvider({ cache, children }: CeebeeAntStyleProviderProps): react.JSX.Element;
|
|
21
41
|
|
|
22
42
|
/**
|
|
23
43
|
* Every string the library says out loud. They are here rather than inline because a component
|
|
@@ -92,6 +112,19 @@ interface MotionHelpers extends MotionSettings {
|
|
|
92
112
|
declare function useMotionSettings(): MotionHelpers;
|
|
93
113
|
|
|
94
114
|
type ThemeChoice = 'light' | 'dark' | 'system';
|
|
115
|
+
interface ThemeProviderProps {
|
|
116
|
+
children: ReactNode;
|
|
117
|
+
defaultChoice?: ThemeChoice;
|
|
118
|
+
/** Resolved mode read by the server, normally via readThemeModeCookie(request Cookie header). */
|
|
119
|
+
initialMode?: ThemeMode;
|
|
120
|
+
/** Must match the Skin stylesheet loaded by the application. */
|
|
121
|
+
skin?: CeebeeSkin;
|
|
122
|
+
/** Server-known contrast preference. Browsers still refresh from live CSS after mounting. */
|
|
123
|
+
contrast?: ThemeContrast;
|
|
124
|
+
persist?: boolean;
|
|
125
|
+
/** Optional Ant token/component overrides applied after the active Ceebee Skin. */
|
|
126
|
+
antdTheme?: ThemeConfig;
|
|
127
|
+
}
|
|
95
128
|
interface ThemeState {
|
|
96
129
|
choice: ThemeChoice;
|
|
97
130
|
setChoice: (choice: ThemeChoice) => void;
|
|
@@ -99,17 +132,10 @@ interface ThemeState {
|
|
|
99
132
|
resolved: 'light' | 'dark';
|
|
100
133
|
}
|
|
101
134
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* for anyone who never overrides the system setting.
|
|
135
|
+
* CSS remains the colour source of truth. This flips `data-theme` and gives Ant the generated seed
|
|
136
|
+
* for the server-known rendering; after mount ThemeBridge refreshes from the live CSS cascade.
|
|
105
137
|
*/
|
|
106
|
-
declare function ThemeProvider({ children, defaultChoice, persist, antdTheme, }:
|
|
107
|
-
children: ReactNode;
|
|
108
|
-
defaultChoice?: ThemeChoice;
|
|
109
|
-
persist?: boolean;
|
|
110
|
-
/** Optional Ant token/component overrides applied after the active Ceebee Skin. */
|
|
111
|
-
antdTheme?: ThemeConfig;
|
|
112
|
-
}): react.JSX.Element;
|
|
138
|
+
declare function ThemeProvider({ children, defaultChoice, initialMode, skin, contrast, persist, antdTheme, }: ThemeProviderProps): react.JSX.Element;
|
|
113
139
|
declare function useTheme(): ThemeState;
|
|
114
140
|
|
|
115
141
|
/** Command matching and ranking. Pure — search that ranks badly is a bug you can only see in a test. */
|
|
@@ -329,4 +355,4 @@ declare const PanZoomCanvas: typeof PanZoomCanvasRoot & {
|
|
|
329
355
|
Skeleton: typeof PanZoomCanvasSkeleton;
|
|
330
356
|
};
|
|
331
357
|
|
|
332
|
-
export { Checklist, type ChecklistProps, type ChecklistTask, type Command, CommandPalette, type CommandPaletteProps, DEFAULT_LABELS, type DurationToken, type Labels, LabelsProvider, type LabelsProviderProps, type MotionHelpers, MotionProvider, type MotionProviderProps, type MotionSettings, type NavItem, type NavSection, type PaletteCommand, PanZoomCanvas, type PanZoomCanvasProps, type PanZoomCanvasSkeletonProps, type RankedCommand, Reveal, type RevealProps, Sidebar, type SidebarProps, type SpringPreset, Stagger, type StaggerProps, StickerGroup, type StickerGroupProps, type StickerGroupSkeletonProps, type StickerItem, ThemeBridge, type ThemeBridgeProps, type ThemeChoice, ThemeProvider, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, TopBar, type TopBarProps, filterCommands, groupCommands, rankCommand, useLabels, useMotionSettings, useTheme, useToast };
|
|
358
|
+
export { type CeebeeAntStyleCache, CeebeeAntStyleProvider, type CeebeeAntStyleProviderProps, Checklist, type ChecklistProps, type ChecklistTask, type Command, CommandPalette, type CommandPaletteProps, DEFAULT_LABELS, type DurationToken, type Labels, LabelsProvider, type LabelsProviderProps, type MotionHelpers, MotionProvider, type MotionProviderProps, type MotionSettings, type NavItem, type NavSection, type PaletteCommand, PanZoomCanvas, type PanZoomCanvasProps, type PanZoomCanvasSkeletonProps, type RankedCommand, Reveal, type RevealProps, Sidebar, type SidebarProps, type SpringPreset, Stagger, type StaggerProps, StickerGroup, type StickerGroupProps, type StickerGroupSkeletonProps, type StickerItem, ThemeBridge, type ThemeBridgeProps, type ThemeChoice, ThemeProvider, type ThemeProviderProps, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, TopBar, type TopBarProps, createCeebeeAntStyleCache, extractCeebeeAntStyles, filterCommands, groupCommands, rankCommand, useLabels, useMotionSettings, useTheme, useToast };
|