@surrealdb/ui 1.2.12 → 1.2.14

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.
Files changed (99) hide show
  1. package/.claude/launch.json +17 -0
  2. package/.oxfmtrc.json +27 -0
  3. package/.oxlintrc.json +23 -0
  4. package/.zed/settings.json +34 -34
  5. package/AGENTS.md +25 -19
  6. package/CLAUDE.md +111 -0
  7. package/README.md +15 -10
  8. package/dist/icons.d.ts +4 -0
  9. package/dist/icons.js +91 -89
  10. package/dist/icons.js.map +1 -1
  11. package/dist/ui.css +1 -1
  12. package/dist/ui.d.ts +259 -1
  13. package/dist/ui.js +9807 -12265
  14. package/dist/ui.js.map +1 -1
  15. package/doc/code-style.md +264 -0
  16. package/doc/release.md +102 -0
  17. package/doc/stacker-plan.md +219 -0
  18. package/package.json +120 -116
  19. package/release-notes.md +0 -0
  20. package/res/_mixins.scss +15 -11
  21. package/tests/_setup/e2e-helpers.tsx +85 -85
  22. package/tests/_setup/portable-stories.ts +11 -10
  23. package/tests/e2e/MarkdownEditor/content-blocks.test.tsx +140 -139
  24. package/tests/e2e/MarkdownEditor/edits.test.tsx +101 -100
  25. package/tests/e2e/MarkdownEditor/heading-fold.test.tsx +35 -34
  26. package/tests/e2e/MarkdownEditor/hybrid-widgets.test.tsx +178 -177
  27. package/tests/e2e/MarkdownEditor/image-on-image.test.tsx +50 -49
  28. package/tests/e2e/MarkdownEditor/jsx-block-content.test.tsx +195 -194
  29. package/tests/e2e/MarkdownEditor/jsx-highlight.test.tsx +47 -46
  30. package/tests/e2e/MarkdownEditor/jsx-inline-badges.test.tsx +35 -34
  31. package/tests/e2e/MarkdownEditor/jsx-inline-click.test.tsx +39 -38
  32. package/tests/e2e/MarkdownEditor/jsx-selection.test.tsx +28 -27
  33. package/tests/e2e/MarkdownEditor/link-placeholder.test.tsx +49 -48
  34. package/tests/e2e/MarkdownEditor/media-align.test.tsx +40 -39
  35. package/tests/e2e/MarkdownEditor/media-edit.test.tsx +49 -48
  36. package/tests/e2e/MarkdownEditor/media-sizing.test.tsx +108 -107
  37. package/tests/e2e/MarkdownEditor/modes.test.tsx +79 -78
  38. package/tests/e2e/MarkdownEditor/onimage-parity.test.tsx +29 -28
  39. package/tests/e2e/MarkdownEditor/regressions.test.tsx +194 -193
  40. package/tests/e2e/MarkdownEditor/slash-commands.test.tsx +81 -80
  41. package/tests/e2e/MarkdownEditor/table-click.test.tsx +36 -35
  42. package/tests/e2e/MarkdownEditor/table-controls.test.tsx +44 -43
  43. package/tests/e2e/MarkdownEditor/table-format.test.tsx +28 -27
  44. package/tests/e2e/MarkdownEditor/undo-redo.test.tsx +22 -21
  45. package/tests/e2e/MarkdownViewer/parity.test.tsx +144 -143
  46. package/tests/e2e/MarkdownViewer/render.test.tsx +20 -19
  47. package/tests/e2e/Stacker/stacker.test.tsx +304 -0
  48. package/tests/unit/Editor/helpers.test.ts +26 -26
  49. package/tests/unit/MarkdownConformance/error-isolation.test.tsx +26 -25
  50. package/tests/unit/MarkdownConformance/indentation.test.tsx +20 -19
  51. package/tests/unit/MarkdownConformance/inline-code-fuzz.test.tsx +255 -0
  52. package/tests/unit/MarkdownConformance/jsx-attributes.test.tsx +39 -38
  53. package/tests/unit/MarkdownConformance/jsx-fuzz.test.tsx +122 -122
  54. package/tests/unit/MarkdownConformance/links.test.tsx +78 -54
  55. package/tests/unit/MarkdownConformance/render-helpers.tsx +60 -60
  56. package/tests/unit/MarkdownEditor/code-info.test.ts +58 -58
  57. package/tests/unit/MarkdownEditor/decorations.test.ts +423 -421
  58. package/tests/unit/MarkdownEditor/editor-ready.test.ts +22 -22
  59. package/tests/unit/MarkdownEditor/html-descriptors.test.ts +70 -70
  60. package/tests/unit/MarkdownEditor/indented-fence.test.ts +80 -80
  61. package/tests/unit/MarkdownEditor/jsx-attr-scan.test.ts +87 -87
  62. package/tests/unit/MarkdownEditor/jsx-block-widget.test.ts +51 -51
  63. package/tests/unit/MarkdownEditor/jsx-tag-grammar.test.ts +63 -63
  64. package/tests/unit/MarkdownEditor/list-indent.test.ts +67 -67
  65. package/tests/unit/MarkdownEditor/slash-commands.test.ts +150 -150
  66. package/tests/unit/MarkdownEditor/table-format.test.ts +67 -67
  67. package/tests/unit/MarkdownEditor/table.test.ts +96 -96
  68. package/tests/unit/MarkdownEditor/triggers.test.ts +167 -167
  69. package/tests/unit/MarkdownEditor/widget-store.test.ts +90 -90
  70. package/tests/unit/MarkdownViewer/callout.test.tsx +42 -42
  71. package/tests/unit/MarkdownViewer/code-highlight.test.tsx +41 -41
  72. package/tests/unit/MarkdownViewer/code-title.test.tsx +45 -45
  73. package/tests/unit/MarkdownViewer/features.test.tsx +129 -129
  74. package/tests/unit/MarkdownViewer/headings.test.tsx +28 -28
  75. package/tests/unit/MarkdownViewer/indented-jsx-children.test.tsx +53 -53
  76. package/tests/unit/MarkdownViewer/jsx-block-nesting.test.tsx +137 -137
  77. package/tests/unit/MarkdownViewer/jsx.test.tsx +188 -188
  78. package/tests/unit/MarkdownViewer/list-bullets.test.tsx +31 -31
  79. package/tests/unit/MarkdownViewer/list-code.test.tsx +45 -45
  80. package/tests/unit/MarkdownViewer/preserve-newlines.test.tsx +109 -109
  81. package/tests/unit/MarkdownViewer/read-time.test.ts +13 -13
  82. package/tests/unit/MarkdownViewer/renderers.test.tsx +75 -75
  83. package/tests/unit/MarkdownViewer/runnable.test.tsx +51 -51
  84. package/tests/unit/MarkdownViewer/ssr.test.tsx +56 -55
  85. package/tests/unit/MarkdownViewer/syntax-highlighting.test.tsx +43 -42
  86. package/tests/unit/MarkdownViewer/tabs-fenced-code.test.tsx +120 -120
  87. package/tests/unit/MarkdownViewer/tabs.test.tsx +83 -82
  88. package/tests/unit/Stacker/drag.test.ts +21 -0
  89. package/tests/unit/Stacker/helpers.test.ts +105 -0
  90. package/tests/unit/Stacker/reducer.test.ts +107 -0
  91. package/tools/duplicate-vector-mappings.json +141 -141
  92. package/tools/glass-export-overrides.json +6 -6
  93. package/tools/icon-parser.ts +41 -40
  94. package/tools/integration-gradient-exports.json +55 -55
  95. package/tools/picto-compare.ts +32 -32
  96. package/tools/picto-merge-urls.ts +19 -19
  97. package/tools/picto-sync.ts +543 -543
  98. package/tools/picto-verify-gradients.ts +50 -50
  99. package/tools/vector-export-nodes.json +975 -975
@@ -0,0 +1,17 @@
1
+ {
2
+ "version": "0.0.1",
3
+ "configurations": [
4
+ {
5
+ "name": "storybook",
6
+ "runtimeExecutable": "npm",
7
+ "runtimeArgs": ["run", "storybook:dev"],
8
+ "port": 6006
9
+ },
10
+ {
11
+ "name": "storybook-preview",
12
+ "runtimeExecutable": "npx",
13
+ "runtimeArgs": ["storybook", "dev", "-p", "6019", "--ci", "--no-open"],
14
+ "port": 6019
15
+ }
16
+ ]
17
+ }
package/.oxfmtrc.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
+ "useTabs": true,
4
+ "tabWidth": 4,
5
+ "printWidth": 100,
6
+ "singleQuote": false,
7
+ "jsxSingleQuote": false,
8
+ "quoteProps": "as-needed",
9
+ "trailingComma": "all",
10
+ "semi": true,
11
+ "arrowParens": "always",
12
+ "bracketSameLine": false,
13
+ "bracketSpacing": true,
14
+ "singleAttributePerLine": true,
15
+ "sortImports": true,
16
+ "sortPackageJson": false,
17
+ "ignorePatterns": [
18
+ "**/.vscode",
19
+ "**/.github",
20
+ "**/.turbo",
21
+ "**/node_modules",
22
+ "**/dist",
23
+ "**/storybook-static",
24
+ "**/src/constants/icons.ts",
25
+ "**/src/constants/icons-pure.ts"
26
+ ]
27
+ }
package/.oxlintrc.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["react", "unicorn", "typescript", "oxc"],
4
+ "categories": {
5
+ "correctness": "warn"
6
+ },
7
+ "rules": {
8
+ "no-unused-vars": "warn",
9
+ "unicorn/no-thenable": "off",
10
+ "react/no-array-index-key": "off",
11
+ "react/exhaustive-deps": "off"
12
+ },
13
+ "ignorePatterns": [
14
+ "**/.vscode",
15
+ "**/.github",
16
+ "**/.turbo",
17
+ "**/node_modules",
18
+ "**/dist",
19
+ "**/storybook-static",
20
+ "**/src/constants/icons.ts",
21
+ "**/src/constants/icons-pure.ts"
22
+ ]
23
+ }
@@ -1,36 +1,36 @@
1
1
  {
2
- "languages": {
3
- "CSS": { "formatter": { "language_server": { "name": "biome" } } },
4
- "HTML": { "formatter": { "language_server": { "name": "biome" } } },
5
- "JSON": { "formatter": { "language_server": { "name": "biome" } } },
6
- "JSONC": { "formatter": { "language_server": { "name": "biome" } } },
7
- "JavaScript": {
8
- "formatter": { "language_server": { "name": "biome" } },
9
- "code_actions_on_format": {
10
- "source.fixAll.biome": true,
11
- "source.organizeImports.biome": true
12
- }
13
- },
14
- "TypeScript": {
15
- "formatter": { "language_server": { "name": "biome" } },
16
- "code_actions_on_format": {
17
- "source.fixAll.biome": true,
18
- "source.organizeImports.biome": true
19
- }
20
- },
21
- "TSX": {
22
- "formatter": { "language_server": { "name": "biome" } },
23
- "code_actions_on_format": {
24
- "source.fixAll.biome": true,
25
- "source.organizeImports.biome": true
26
- }
27
- }
28
- },
29
- "lsp": {
30
- "biome": {
31
- "settings": {
32
- "require_config_file": true
33
- }
34
- }
35
- }
2
+ "languages": {
3
+ "CSS": { "formatter": { "language_server": { "name": "biome" } } },
4
+ "HTML": { "formatter": { "language_server": { "name": "biome" } } },
5
+ "JSON": { "formatter": { "language_server": { "name": "biome" } } },
6
+ "JSONC": { "formatter": { "language_server": { "name": "biome" } } },
7
+ "JavaScript": {
8
+ "formatter": { "language_server": { "name": "biome" } },
9
+ "code_actions_on_format": {
10
+ "source.fixAll.biome": true,
11
+ "source.organizeImports.biome": true
12
+ }
13
+ },
14
+ "TypeScript": {
15
+ "formatter": { "language_server": { "name": "biome" } },
16
+ "code_actions_on_format": {
17
+ "source.fixAll.biome": true,
18
+ "source.organizeImports.biome": true
19
+ }
20
+ },
21
+ "TSX": {
22
+ "formatter": { "language_server": { "name": "biome" } },
23
+ "code_actions_on_format": {
24
+ "source.fixAll.biome": true,
25
+ "source.organizeImports.biome": true
26
+ }
27
+ }
28
+ },
29
+ "lsp": {
30
+ "biome": {
31
+ "settings": {
32
+ "require_config_file": true
33
+ }
34
+ }
35
+ }
36
36
  }
package/AGENTS.md CHANGED
@@ -15,22 +15,22 @@ This is `@surrealdb/ui` — the SurrealDB design system and UI component library
15
15
 
16
16
  ## Commands
17
17
 
18
- | Command | Description |
19
- |---|---|
20
- | `bun install` | Install dependencies |
21
- | `bun run build` | Production build (outputs to `dist/`) |
22
- | `bun run storybook:dev` | Start Storybook dev server on port 6006 |
23
- | `bun run storybook:build` | Build static Storybook site |
24
- | `bun qc` | Run Biome lint/format check |
25
- | `bun qa` | Auto-fix Biome lint/format issues |
26
- | `bun qau` | Auto-fix including unsafe fixes |
27
- | `bun qts` | TypeScript type check (`tsc --noEmit`) |
28
- | `bun run test` | Run all Vitest projects (unit + e2e + storybook). Use `bun run test`, not `bun test`, since `bun test` invokes Bun's own test runner. |
29
- | `bun run test:unit` | Run jsdom-based unit tests in `tests/unit/` |
30
- | `bun run test:e2e` | Run browser-driven E2E tests in `tests/e2e/` (Playwright + Chromium) |
31
- | `bun run test:storybook` | Run in-story `play` interaction tests via the Storybook Vitest plugin |
32
- | `bun run test:watch` | Watch all projects |
33
- | `bun run icons` | Regenerate icon constants from `icons.zip` (requires `picosvg`) |
18
+ | Command | Description |
19
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
20
+ | `bun install` | Install dependencies |
21
+ | `bun run build` | Production build (outputs to `dist/`) |
22
+ | `bun run storybook:dev` | Start Storybook dev server on port 6006 |
23
+ | `bun run storybook:build` | Build static Storybook site |
24
+ | `bun qc` | Run Biome lint/format check |
25
+ | `bun qa` | Auto-fix Biome lint/format issues |
26
+ | `bun qau` | Auto-fix including unsafe fixes |
27
+ | `bun qts` | TypeScript type check (`tsc --noEmit`) |
28
+ | `bun run test` | Run all Vitest projects (unit + e2e + storybook). Use `bun run test`, not `bun test`, since `bun test` invokes Bun's own test runner. |
29
+ | `bun run test:unit` | Run jsdom-based unit tests in `tests/unit/` |
30
+ | `bun run test:e2e` | Run browser-driven E2E tests in `tests/e2e/` (Playwright + Chromium) |
31
+ | `bun run test:storybook` | Run in-story `play` interaction tests via the Storybook Vitest plugin |
32
+ | `bun run test:watch` | Watch all projects |
33
+ | `bun run icons` | Regenerate icon constants from `icons.zip` (requires `picosvg`) |
34
34
 
35
35
  ## Path Aliases
36
36
 
@@ -40,8 +40,8 @@ This is `@surrealdb/ui` — the SurrealDB design system and UI component library
40
40
 
41
41
  - SCSS modules (`.module.scss`) with `dashesOnly` locals convention — access classes as `styles.myClass`, not `styles["my-class"]`
42
42
  - All `.scss` files auto-import `@surrealdb/ui/mixins` via Vite's `additionalData`, providing global access to theme-aware mixins:
43
- - `@include light { ... }` / `@include dark { ... }` — color scheme scoping
44
- - `@include sm-and-up { ... }`, `@include md-and-down { ... }`, etc. — responsive breakpoints
43
+ - `@include light { ... }` / `@include dark { ... }` — color scheme scoping
44
+ - `@include sm-and-up { ... }`, `@include md-and-down { ... }`, etc. — responsive breakpoints
45
45
  - Global CSS variables are defined in `src/assets/styles/global.scss` (prefixed `--surreal-*`)
46
46
  - Mantine design tokens available as `--mantine-color-*` CSS variables
47
47
  - Build output CSS is automatically wrapped in `@layer surreal` by a custom Vite plugin
@@ -49,6 +49,7 @@ This is `@surrealdb/ui` — the SurrealDB design system and UI component library
49
49
  ## Exports
50
50
 
51
51
  The package exposes three entry points:
52
+
52
53
  - `@surrealdb/ui` — all components, hooks, helpers, and constants (from `src/index.ts`)
53
54
  - `@surrealdb/ui/styles.css` — compiled CSS (wrapped in `@layer surreal`)
54
55
  - `@surrealdb/ui/mixins` — raw SCSS mixins (from `res/_mixins.scss`)
@@ -73,6 +74,7 @@ src/
73
74
  ```
74
75
 
75
76
  Other top-level directories:
77
+
76
78
  - `res/` — SCSS mixins exported as `@surrealdb/ui/mixins`
77
79
  - `tests/` — Vitest test suites: `tests/unit/<Feature>/` (jsdom) and `tests/e2e/<Feature>/` (Playwright + Chromium); shared mount/composeStories helpers live in `tests/_setup/`
78
80
  - `tools/` — Icon parser script (`icon-parser.ts`)
@@ -95,6 +97,10 @@ Consumers must provide: React 19, Mantine 8, CodeMirror 6 suite, and Slate. Thes
95
97
  - The `src/constants/icons.ts` file is auto-generated — do not edit it manually
96
98
  - Biome excludes: `.vscode/`, `.github/`, `.storybook/`, `src/constants/icons.ts`, `dist/`, and `*.js` files
97
99
 
100
+ ## Releasing
101
+
102
+ See [release.md](doc/release.md)
103
+
98
104
  ## Variants
99
105
 
100
106
  When adding new variants, take the following into consideration:
@@ -102,4 +108,4 @@ When adding new variants, take the following into consideration:
102
108
  - Styling is defined in `src/assets/styles/variants.scss`
103
109
  - Types are defined in `src/types/variants.ts`
104
110
  - The default variant is configured in `src/theme/mantine.ts`
105
- - Update the relevant storybook story to show the new variant
111
+ - Update the relevant storybook story to show the new variant
package/CLAUDE.md ADDED
@@ -0,0 +1,111 @@
1
+ # CLAUDE.md
2
+
3
+ This is `@surrealdb/ui` — the SurrealDB design system and UI component library, published to npm as a reusable package for all SurrealDB frontend projects.
4
+
5
+ ## Tooling
6
+
7
+ - **Runtime & package manager:** Bun (do NOT use npm, yarn, or pnpm)
8
+ - **Build:** Vite 7 in library mode, targeting ES2022 with source maps
9
+ - **Language:** TypeScript with `isolatedDeclarations` enabled — all exported types must be explicitly annotated
10
+ - **UI framework:** React 19 with JSX transform (`react-jsx`)
11
+ - **Component library:** Mantine v8 (peer dependency)
12
+ - **Linter/formatter:** Biome 2.x — 4-space indentation, 100-character line width
13
+ - **Storybook:** Storybook 10 with `@storybook/react-vite`
14
+ - **Testing:** Vitest with Playwright browser provider for Storybook integration tests
15
+
16
+ ## Commands
17
+
18
+ | Command | Description |
19
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
20
+ | `bun install` | Install dependencies |
21
+ | `bun run build` | Production build (outputs to `dist/`) |
22
+ | `bun run storybook:dev` | Start Storybook dev server on port 6006 |
23
+ | `bun run storybook:build` | Build static Storybook site |
24
+ | `bun qc` | Run Biome lint/format check |
25
+ | `bun qa` | Auto-fix Biome lint/format issues |
26
+ | `bun qau` | Auto-fix including unsafe fixes |
27
+ | `bun qts` | TypeScript type check (`tsc --noEmit`) |
28
+ | `bun run test` | Run all Vitest projects (unit + e2e + storybook). Use `bun run test`, not `bun test`, since `bun test` invokes Bun's own test runner. |
29
+ | `bun run test:unit` | Run jsdom-based unit tests in `tests/unit/` |
30
+ | `bun run test:e2e` | Run browser-driven E2E tests in `tests/e2e/` (Playwright + Chromium) |
31
+ | `bun run test:storybook` | Run in-story `play` interaction tests via the Storybook Vitest plugin |
32
+ | `bun run test:watch` | Watch all projects |
33
+ | `bun run icons` | Regenerate icon constants from `icons.zip` (requires `picosvg`) |
34
+
35
+ ## Path Aliases
36
+
37
+ `@src/*` maps to `./src/*` (configured in `tsconfig.json` and resolved by `vite-tsconfig-paths`).
38
+
39
+ ## Styling
40
+
41
+ - SCSS modules (`.module.scss`) with `dashesOnly` locals convention — access classes as `styles.myClass`, not `styles["my-class"]`
42
+ - All `.scss` files auto-import `@surrealdb/ui/mixins` via Vite's `additionalData`, providing global access to theme-aware mixins:
43
+ - `@include light { ... }` / `@include dark { ... }` — color scheme scoping
44
+ - `@include sm-and-up { ... }`, `@include md-and-down { ... }`, etc. — responsive breakpoints
45
+ - Global CSS variables are defined in `src/assets/styles/global.scss` (prefixed `--surreal-*`)
46
+ - Mantine design tokens available as `--mantine-color-*` CSS variables
47
+ - Build output CSS is automatically wrapped in `@layer surreal` by a custom Vite plugin
48
+
49
+ ## Exports
50
+
51
+ The package exposes three entry points:
52
+
53
+ - `@surrealdb/ui` — all components, hooks, helpers, and constants (from `src/index.ts`)
54
+ - `@surrealdb/ui/styles.css` — compiled CSS (wrapped in `@layer surreal`)
55
+ - `@surrealdb/ui/mixins` — raw SCSS mixins (from `res/_mixins.scss`)
56
+
57
+ ## Source Structure
58
+
59
+ ```
60
+ src/
61
+ ├── assets/ # Static assets: brand SVGs, picto WebPs, global SCSS styles
62
+ ├── constants/ # Generated/static constants (icons.ts, brands.ts, pictos.ts)
63
+ ├── editor/ # CodeMirror editor setup: extensions, keybinds, commands, theme
64
+ ├── helpers/ # Utility functions (clsx, CDN URL helper, ID generator)
65
+ ├── hooks/ # React hooks (useEditor, useStable, useLater, useSort, useSwitch)
66
+ ├── lib/
67
+ │ ├── editor/ # Custom Code Mirror editor configuration and extensions
68
+ │ └── markdown/ # Custom Code Mirror based markdown editor and renderer
69
+ ├── primitives/ # React UI components (Icon, CodeBlock, Spinner, VideoPlayer, etc.)
70
+ ├── stories/ # Storybook stories organized by category
71
+ ├── syntax/ # Syntax highlighting: language definitions, highlighter, theme
72
+ ├── theme/ # Mantine theme override (mantine.ts)
73
+ └── types/ # TypeScript module augmentations for Mantine (colors, variants, spacing)
74
+ ```
75
+
76
+ Other top-level directories:
77
+
78
+ - `res/` — SCSS mixins exported as `@surrealdb/ui/mixins`
79
+ - `tests/` — Vitest test suites: `tests/unit/<Feature>/` (jsdom) and `tests/e2e/<Feature>/` (Playwright + Chromium); shared mount/composeStories helpers live in `tests/_setup/`
80
+ - `tools/` — Icon parser script (`icon-parser.ts`)
81
+ - `.storybook/` — Storybook configuration (main, preview, vitest setup)
82
+ - `.github/workflows/` — CI (`check.yml`) and publish (`publish.yml`) workflows
83
+ - `dist/` — Build output (gitignored)
84
+
85
+ ## Peer Dependencies
86
+
87
+ Consumers must provide: React 19, Mantine 8, CodeMirror 6 suite, and Slate. These are externalized during build.
88
+
89
+ ## CI/CD
90
+
91
+ - **check.yml** — Runs on push/PR to `main`: Biome lint, TypeScript check, build, and three independent test jobs (`test-unit`, `test-e2e`, `test-storybook`) on Bun 1.2.23. The two browser jobs install Playwright Chromium with `bunx playwright install --with-deps chromium`.
92
+ - **publish.yml** — Triggered by GitHub release: asserts `package.json` version matches git tag, builds, packs, and publishes to npm
93
+
94
+ ## Conventions
95
+
96
+ - `useStable` hook is configured as returning a stable reference in Biome's `useExhaustiveDependencies` rule — do not list its return value in dependency arrays
97
+ - The `src/constants/icons.ts` file is auto-generated — do not edit it manually
98
+ - Biome excludes: `.vscode/`, `.github/`, `.storybook/`, `src/constants/icons.ts`, `dist/`, and `*.js` files
99
+
100
+ ## Releasing
101
+
102
+ See [release.md](doc/release.md)
103
+
104
+ ## Variants
105
+
106
+ When adding new variants, take the following into consideration:
107
+
108
+ - Styling is defined in `src/assets/styles/variants.scss`
109
+ - Types are defined in `src/types/variants.ts`
110
+ - The default variant is configured in `src/theme/mantine.ts`
111
+ - Update the relevant storybook story to show the new variant
package/README.md CHANGED
@@ -18,8 +18,8 @@ import { MantineProvider } from "@mantine/core";
18
18
  import { MANTINE_THEME } from "@surrealdb/ui/theme";
19
19
 
20
20
  <MantineProvider theme={MANTINE_THEME}>
21
- <App />
22
- </MantineProvider>
21
+ <App />
22
+ </MantineProvider>;
23
23
  ```
24
24
 
25
25
  Finally, use the components:
@@ -27,9 +27,12 @@ Finally, use the components:
27
27
  ```tsx
28
28
  import { Heading } from "@surrealdb/ui";
29
29
 
30
- <Heading kicker="Foo" description="Bar">
30
+ <Heading
31
+ kicker="Foo"
32
+ description="Bar"
33
+ >
31
34
  Hello world
32
- </Heading>
35
+ </Heading>;
33
36
  ```
34
37
 
35
38
  ## Markdown editing and rendering
@@ -67,6 +70,7 @@ bun run storybook:dev
67
70
  The icon tool is used to convert the SVG icons to a format that can be used in the UI Kit.
68
71
 
69
72
  ### Requirements
73
+
70
74
  - Install [picosvg](https://github.com/googlefonts/picosvg)
71
75
  - Export an SVG zip and locate it in the root of the project.
72
76
 
@@ -79,13 +83,14 @@ This will generate the `src/constants/icons.ts` file.
79
83
  ## Notes
80
84
 
81
85
  ### Optimise pictos
86
+
82
87
  ```
83
- mkdir -p out
84
- for f in *.png; do
85
- magick "$f" \
88
+ mkdir -p out
89
+ for f in *.png; do
90
+ magick "$f" \
86
91
  -resize 500x500 \
87
- -background none \
88
- -gravity center \
92
+ -background none \
93
+ -gravity center \
89
94
  -extent 500x500 \
90
95
  PNG32:"out/${f%.*}.png"
91
96
  magick "out/${f%.*}.png" -define webp:lossless=true "out/${f%.*}.webp"
@@ -93,4 +98,4 @@ for f in *.png; do
93
98
  done
94
99
  ```
95
100
 
96
- Gradient pictos are synced from Figma via `tools/picto-sync.ts`. Export the inner VECTOR child of each `*_vector` component (not the outer symbol/frame) using Figma `get_screenshot` with `contentsOnly: true` — `download_assets` bakes in the artboard background.
101
+ Gradient pictos are synced from Figma via `tools/picto-sync.ts`. Export the inner VECTOR child of each `*_vector` component (not the outer symbol/frame) using Figma `get_screenshot` with `contentsOnly: true` — `download_assets` bakes in the artboard background.
package/dist/icons.d.ts CHANGED
@@ -225,6 +225,8 @@ export declare const KeyboardShift: string;
225
225
 
226
226
  export declare const LangC: string;
227
227
 
228
+ export declare const LangDart: string;
229
+
228
230
  export declare const LangDotNet: string;
229
231
 
230
232
  export declare const LangGo: string;
@@ -326,6 +328,8 @@ export declare const Routes: string;
326
328
 
327
329
  export declare const Sandbox: string;
328
330
 
331
+ export declare const Seal: string;
332
+
329
333
  export declare const Search: string;
330
334
 
331
335
  export declare const Send: string;