@surrealdb/ui 2.0.5 → 2.1.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
@@ -2,69 +2,27 @@
2
2
 
3
3
  The SurrealDB UI Kit defines the design system and UI primitives for use throughout all frontend projects at SurrealDB.
4
4
 
5
- [DESIGN.md](./DESIGN.md) describes the design system. [MIGRATE.md](./MIGRATE.md) is the guide for porting a project from 1.x.
6
-
7
5
  ## Using the UI Kit
8
6
 
9
- First, import the styles and fonts:
10
-
11
- ```tsx
12
- import "@surrealdb/ui/styles.css";
13
- import "@surrealdb/ui/fonts.css";
14
- ```
15
-
16
- Then, configure the Mantine theme. The CSS variables resolver is required: it is what lets any subtree switch color scheme on its own.
17
-
18
- ```tsx
19
- import { MantineProvider } from "@mantine/core";
20
- import { MANTINE_THEME, surrealCssVariablesResolver } from "@surrealdb/ui";
21
-
22
- <MantineProvider
23
- theme={MANTINE_THEME}
24
- cssVariablesResolver={surrealCssVariablesResolver}
25
- >
26
- <App />
27
- </MantineProvider>;
28
- ```
29
-
30
- Finally, use the components:
7
+ The usage guide lives in the agent skills in [`skills/`](https://github.com/surrealdb/ui-kit/tree/main/skills), which install with:
31
8
 
32
- ```tsx
33
- import { Display, Eyebrow, Muted, Section } from "@surrealdb/ui";
34
-
35
- <Section
36
- tone="purple"
37
- size="lg"
38
- >
39
- <Eyebrow>Get started</Eyebrow>
40
- <Display size="xl">
41
- One engine. <Muted>Every data model.</Muted>
42
- </Display>
43
- </Section>;
9
+ ```bash
10
+ npx skills add surrealdb/ui-kit
44
11
  ```
45
12
 
46
- A region takes a product color by stamping it on any ancestor, which recolors
47
- everything inside including plain Mantine controls:
13
+ or, in Claude Code, as a plugin:
48
14
 
49
- ```tsx
50
- <Section accent="memory">…</Section>
51
15
  ```
52
-
53
- ## Markdown editing and rendering
54
-
55
- The UI Kit ships a markdown library built on a simplified, opinionated MDX variant (CommonMark + GFM + GFM-style callouts + `<PascalCase />` JSX components). It exposes two primitives that share one Lezer grammar: `MarkdownEditor`, a CodeMirror 6 live-preview editor, and `MarkdownViewer`, an SSR-safe read-only renderer. They can be used together (an editor beside a live preview) or entirely independently.
56
-
57
- ```tsx
58
- import { MarkdownEditor, MarkdownViewer } from "@surrealdb/ui";
59
-
60
- // Read-only rendering
61
- <MarkdownViewer content="# Hello\n\nSome **markdown**." />
62
-
63
- // Interactive editing
64
- <MarkdownEditor document={source} onChangeDocument={setSource} mode="preview" />
16
+ /plugin marketplace add surrealdb/ui-kit
17
+ /plugin install surrealdb-ui@surrealdb-ui
65
18
  ```
66
19
 
67
- See [`src/lib/markdown/SPEC.md`](./src/lib/markdown/SPEC.md) for the full specification.
20
+ - [Setup, core rules and component guide](https://github.com/surrealdb/ui-kit/blob/main/skills/ui-kit/SKILL.md)
21
+ - [Design system](https://github.com/surrealdb/ui-kit/blob/main/skills/ui-kit/references/design.md) and [glossary](https://github.com/surrealdb/ui-kit/blob/main/skills/ui-kit/references/glossary.md)
22
+ - [Component props](https://github.com/surrealdb/ui-kit/blob/main/skills/ui-kit/references/components.md)
23
+ - [Markdown dialect](https://github.com/surrealdb/ui-kit/blob/main/skills/ui-kit/references/markdown.md) for `MarkdownEditor` and `MarkdownViewer`
24
+ - [Migrating from 1.x](https://github.com/surrealdb/ui-kit/blob/main/skills/ui-kit/references/migrate.md)
25
+ - [Brand guide](https://github.com/surrealdb/ui-kit/blob/main/skills/brand-guide/SKILL.md), for work outside React
68
26
 
69
27
  ## Getting Started
70
28
 
package/dist/fonts.d.ts CHANGED
@@ -19,13 +19,6 @@ declare module "@mantine/core" {
19
19
  }
20
20
  }
21
21
 
22
- declare module "@mantine/core" {
23
- type ExtendedCustomColors = "pink" | "lilac" | "purple" | "violet" | "obsidian" | "slate" | import("@mantine/core").DefaultMantineColor;
24
- interface MantineThemeColorsOverride {
25
- colors: Record<ExtendedCustomColors, import("@mantine/core").MantineColorsTuple>;
26
- }
27
- }
28
-
29
22
  declare module "@mantine/core" {
30
23
  type ExtendedCustomSizes = import("@mantine/core").DefaultMantineSize | "2xl" | "3xl" | "4xl" | "5xl";
31
24
  interface MantineThemeSizesOverride {
@@ -33,3 +26,10 @@ declare module "@mantine/core" {
33
26
  fontSizes: Record<ExtendedCustomSizes, string>;
34
27
  }
35
28
  }
29
+
30
+ declare module "@mantine/core" {
31
+ type ExtendedCustomColors = "pink" | "lilac" | "purple" | "violet" | "obsidian" | "slate" | import("@mantine/core").DefaultMantineColor;
32
+ interface MantineThemeColorsOverride {
33
+ colors: Record<ExtendedCustomColors, import("@mantine/core").MantineColorsTuple>;
34
+ }
35
+ }
package/dist/icons.d.ts CHANGED
@@ -68,6 +68,8 @@ export declare const BroadcastOff: string;
68
68
 
69
69
  export declare const BroadcastOn: string;
70
70
 
71
+ export declare const Bucket: string;
72
+
71
73
  export declare const Bug: string;
72
74
 
73
75
  export declare const Bullhorn: string;
@@ -123,6 +125,8 @@ export { Comment_2 as Comment }
123
125
 
124
126
  export declare const Community: string;
125
127
 
128
+ export declare const Connection: string;
129
+
126
130
  declare const Console_2: string;
127
131
  export { Console_2 as Console }
128
132
 
@@ -156,6 +160,8 @@ export declare const Download: string;
156
160
 
157
161
  export declare const Drag: string;
158
162
 
163
+ export declare const Earth: string;
164
+
159
165
  export declare const Edit: string;
160
166
 
161
167
  export declare const Email: string;
@@ -251,6 +257,10 @@ export declare const LangRust: string;
251
257
 
252
258
  export declare const LangSwift: string;
253
259
 
260
+ export declare const Laptop: string;
261
+
262
+ export declare const Launch: string;
263
+
254
264
  export declare const List: string;
255
265
 
256
266
  export declare const Live: string;
@@ -281,6 +291,8 @@ export declare const Mute: string;
281
291
 
282
292
  export declare const Namespace: string;
283
293
 
294
+ export declare const Network: string;
295
+
284
296
  export declare const Newspaper: string;
285
297
 
286
298
  export declare const Office: string;
@@ -428,13 +440,6 @@ declare module "@mantine/core" {
428
440
  }
429
441
  }
430
442
 
431
- declare module "@mantine/core" {
432
- type ExtendedCustomColors = "pink" | "lilac" | "purple" | "violet" | "obsidian" | "slate" | import("@mantine/core").DefaultMantineColor;
433
- interface MantineThemeColorsOverride {
434
- colors: Record<ExtendedCustomColors, import("@mantine/core").MantineColorsTuple>;
435
- }
436
- }
437
-
438
443
  declare module "@mantine/core" {
439
444
  type ExtendedCustomSizes = import("@mantine/core").DefaultMantineSize | "2xl" | "3xl" | "4xl" | "5xl";
440
445
  interface MantineThemeSizesOverride {
@@ -442,3 +447,10 @@ declare module "@mantine/core" {
442
447
  fontSizes: Record<ExtendedCustomSizes, string>;
443
448
  }
444
449
  }
450
+
451
+ declare module "@mantine/core" {
452
+ type ExtendedCustomColors = "pink" | "lilac" | "purple" | "violet" | "obsidian" | "slate" | import("@mantine/core").DefaultMantineColor;
453
+ interface MantineThemeColorsOverride {
454
+ colors: Record<ExtendedCustomColors, import("@mantine/core").MantineColorsTuple>;
455
+ }
456
+ }