@softure-ai/theme-notion 0.18.0 → 0.19.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/CHANGELOG.md +8 -0
- package/README.md +11 -2
- package/dist/sft-bridge.css +41 -33
- package/package.json +1 -1
- package/src/sft-bridge.css +41 -33
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ Newest first. Each version lists what changed for an app that uses the theme. Wh
|
|
|
4
4
|
production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
|
|
5
5
|
"Definition of done").
|
|
6
6
|
|
|
7
|
+
## 0.19.0
|
|
8
|
+
|
|
9
|
+
- `sft-bridge.css` re-points `@softure-ai/ui`'s `--sft-*` tokens everywhere, not only inside a `PageFrame`: on
|
|
10
|
+
`:root`, `.light`, `.dark` and `[data-theme]` as well, outside any `@layer`, so a ui component (a chat screen, a
|
|
11
|
+
card, a form) in the app shell or in a `.dark` band takes the Notion colours, fonts, radii and shadows. Same API and
|
|
12
|
+
imports. Visible change: ui components outside a frame that showed ui's default look now show the theme's; an app
|
|
13
|
+
that wants a token of its own writes its `--sft-*` rule after the import (#1260).
|
|
14
|
+
|
|
7
15
|
## 0.18.0
|
|
8
16
|
|
|
9
17
|
- `DocumentViewer`, `DocumentList`, `DocumentRow` (#1256): documents shown inside the page, never in a new browser
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ npm i @softure-ai/theme-notion tailwindcss @tailwindcss/postcss
|
|
|
15
15
|
/* app/globals.css */
|
|
16
16
|
@import "tailwindcss";
|
|
17
17
|
@import "@softure-ai/theme-notion/theme.css"; /* tokens, utilities, dark:, animations, the components' classes */
|
|
18
|
-
@import "@softure-ai/theme-notion/sft-bridge.css"; /* optional:
|
|
18
|
+
@import "@softure-ai/theme-notion/sft-bridge.css"; /* optional: @softure-ai/ui components and package pages */
|
|
19
19
|
@import "@softure-ai/theme-notion/base.css"; /* body on the theme's background, text colour and font */
|
|
20
20
|
@import "@softure-ai/theme-notion/page.css"; /* body text 14 px, blue text selection, font smoothing */
|
|
21
21
|
@import "@softure-ai/theme-notion/maplibre.css"; /* only if the app shows MapLibre maps */
|
|
@@ -29,6 +29,12 @@ manager layout.
|
|
|
29
29
|
`theme.css` names the package's components as Tailwind sources, so their classes are generated without the app
|
|
30
30
|
listing `node_modules`. It clears Tailwind's default palette: only the theme's colours exist as utilities.
|
|
31
31
|
|
|
32
|
+
**`@softure-ai/ui` components on the theme.** `sft-bridge.css` points ui's `--sft-*` tokens (colours, fonts, radii,
|
|
33
|
+
shadows) at the Notion tokens on every scheme scope (`:root`, `.light`, `.dark`, `[data-theme]`) and in every
|
|
34
|
+
`PageFrame`, outside any `@layer`, so a ui component takes the theme wherever it sits: a chat panel in the app shell,
|
|
35
|
+
a card in a `.dark` band, or a package page (sign-in, OAuth consent) in a `PageFrame`. Spacing, text sizes and
|
|
36
|
+
durations stay ui's. An app that wants another value for one token writes its own `--sft-*` rule after the import.
|
|
37
|
+
|
|
32
38
|
An app that also renders pages of the SOFTURE packages (on `@softure-ai/ui`'s `--sft-*` tokens) keeps their base by
|
|
33
39
|
taking the scoped preflight instead of Tailwind's:
|
|
34
40
|
|
|
@@ -131,7 +137,7 @@ field, input, input-group, item, kbd, label, popover, progress, radio-group, scr
|
|
|
131
137
|
sidebar, skeleton, sonner (`Toaster`), spinner, switch, table, tabs, textarea, tooltip. Compositions: `Status` (badge, icon,
|
|
132
138
|
word), `PageHeader` (breadcrumb, icon box, title, description, actions), `PropertyList` (fields of one record),
|
|
133
139
|
`DetailTable` (an item's details as a label and value table), `FoldRow` (a list row folding open to a `DetailTable`
|
|
134
|
-
and more, a native `<details>`), `PageFrame` (a page outside the app shell,
|
|
140
|
+
and more, a native `<details>`), `PageFrame` (a page outside the app shell, such as a package's sign-in page),
|
|
135
141
|
`SidePanel` (a non-modal panel at a side of a canvas, below), `AsidePanelProvider`, `AsidePanelToggle`,
|
|
136
142
|
`AsidePanel` and `AsidePanelSidebarOpener` (a panel slid in from the right of the app shell, beside the content, below), `SheetMenu`, `SheetMenuItem` and `SheetMenuButton`
|
|
137
143
|
(navigation rows in a side `Sheet`, a phone's drawer, below), `TabBar` (a screen's tabs as links with an optional icon
|
|
@@ -799,6 +805,9 @@ on every pull request that touches `themes/`.
|
|
|
799
805
|
every class in the parity fixture generates CSS on the theme (no unknown token, no cleared default colour).
|
|
800
806
|
6. **Visual regression** (`visual/gallery.spec.ts`): the gallery and each overlay at 1440 and 390 px, light and dark,
|
|
801
807
|
against `visual/baselines/`, in Playwright's Chromium with fonts from npm packages.
|
|
808
|
+
`visual/bridge.spec.ts` does the same for `@softure-ai/ui` components wired as the README says (ui's styles, the
|
|
809
|
+
scoped preflight, the theme, the bridge): the same screen in the app shell, in a `PageFrame` and in a `.dark` band,
|
|
810
|
+
each of ui's colour tokens checked against the Notion colour it paints, a baseline and axe.
|
|
802
811
|
7. **Accessibility**: axe (WCAG 2.1 A and AA, colour contrast included) on the same pages; the token pairs in
|
|
803
812
|
`tests/contrast.test.ts` (see Contrast above) run in `npm test`.
|
|
804
813
|
8. **Inventory** (`tests/inventory.test.ts`): exports, files, the README's component list and the gallery agree.
|
package/dist/sft-bridge.css
CHANGED
|
@@ -1,44 +1,52 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* The bridge from the `--sft-*` tokens of @softure-ai/ui to the Notion theme.
|
|
3
|
-
* (sign-in, password, MCP access, OAuth
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* The bridge from the `--sft-*` tokens of @softure-ai/ui to the Notion theme. Every ui component (fields, cards,
|
|
3
|
+
* modals, toasts, the chat primitives) and the pages of the SOFTURE packages (sign-in, password, MCP access, OAuth
|
|
4
|
+
* consent) paint with `--sft-*`; here those tokens point at the Notion values, so they take the theme's colours, type,
|
|
5
|
+
* radii and shadows wherever they sit: in the app shell, in a panel, or in a `PageFrame`.
|
|
6
|
+
*
|
|
7
|
+
* On every scheme scope, not `:root` alone: a custom property holding `var()` resolves on the element that declares
|
|
8
|
+
* it and children inherit the result, so an alias on `:root` alone would freeze the root's values inside a `.dark`
|
|
9
|
+
* band of a light page. `[data-page-frame]` stays in the list for a frame inside such a band. Unlayered, so it beats
|
|
10
|
+
* ui's defaults in `@layer softure` on the same element; an app's own `--sft-*` rule after this import still wins.
|
|
11
|
+
* Spacing, text sizes and durations stay the package's: the scales already match, and the theme has no motion tokens.
|
|
8
12
|
*
|
|
9
13
|
* Import it after `theme.css`, through the app's Tailwind (it reads the theme with `--theme()`).
|
|
10
14
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
:root,
|
|
16
|
+
.light,
|
|
17
|
+
.dark,
|
|
18
|
+
[data-theme],
|
|
19
|
+
[data-page-frame] {
|
|
20
|
+
--sft-font-sans: --theme(--font-sans);
|
|
21
|
+
--sft-font-heading: --theme(--font-sans);
|
|
22
|
+
--sft-font-mono: --theme(--font-mono);
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
--sft-radius-control: --theme(--radius-md);
|
|
25
|
+
--sft-radius-card: --theme(--radius-lg);
|
|
26
|
+
--sft-radius-pill: --theme(--radius-full);
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
--sft-color-background: var(--background);
|
|
29
|
+
--sft-color-surface: var(--card);
|
|
30
|
+
--sft-color-surface-raised: var(--popover);
|
|
31
|
+
--sft-color-foreground: var(--foreground);
|
|
32
|
+
--sft-color-muted: var(--muted-foreground);
|
|
33
|
+
--sft-color-border: var(--border);
|
|
34
|
+
--sft-color-border-strong: var(--control-off);
|
|
35
|
+
--sft-color-accent: var(--primary);
|
|
36
|
+
--sft-color-accent-fill: var(--primary);
|
|
37
|
+
--sft-color-accent-fill-hover: var(--primary-hover);
|
|
38
|
+
--sft-color-on-accent: var(--primary-foreground);
|
|
39
|
+
--sft-color-danger: var(--red);
|
|
40
|
+
--sft-color-success: var(--green);
|
|
41
|
+
--sft-color-warning: var(--orange);
|
|
42
|
+
--sft-color-focus: var(--ring);
|
|
43
|
+
--sft-color-overlay: var(--overlay);
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
--sft-shadow-1: var(--shadow-card);
|
|
46
|
+
--sft-shadow-2: var(--shadow-dialog);
|
|
47
|
+
}
|
|
41
48
|
|
|
49
|
+
@layer base {
|
|
42
50
|
/* A page in a frame fills the window: no browser margin, the Notion background behind everything. */
|
|
43
51
|
body:has([data-page-frame]) {
|
|
44
52
|
margin: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softure-ai/theme-notion",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "SOFTURE AI Notion theme: shadcn/ui components (new-york v4, Radix, Tailwind CSS v4, lucide) with the Notion design system's tokens and deltas, ready to import.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/sft-bridge.css
CHANGED
|
@@ -1,44 +1,52 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* The bridge from the `--sft-*` tokens of @softure-ai/ui to the Notion theme.
|
|
3
|
-
* (sign-in, password, MCP access, OAuth
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* The bridge from the `--sft-*` tokens of @softure-ai/ui to the Notion theme. Every ui component (fields, cards,
|
|
3
|
+
* modals, toasts, the chat primitives) and the pages of the SOFTURE packages (sign-in, password, MCP access, OAuth
|
|
4
|
+
* consent) paint with `--sft-*`; here those tokens point at the Notion values, so they take the theme's colours, type,
|
|
5
|
+
* radii and shadows wherever they sit: in the app shell, in a panel, or in a `PageFrame`.
|
|
6
|
+
*
|
|
7
|
+
* On every scheme scope, not `:root` alone: a custom property holding `var()` resolves on the element that declares
|
|
8
|
+
* it and children inherit the result, so an alias on `:root` alone would freeze the root's values inside a `.dark`
|
|
9
|
+
* band of a light page. `[data-page-frame]` stays in the list for a frame inside such a band. Unlayered, so it beats
|
|
10
|
+
* ui's defaults in `@layer softure` on the same element; an app's own `--sft-*` rule after this import still wins.
|
|
11
|
+
* Spacing, text sizes and durations stay the package's: the scales already match, and the theme has no motion tokens.
|
|
8
12
|
*
|
|
9
13
|
* Import it after `theme.css`, through the app's Tailwind (it reads the theme with `--theme()`).
|
|
10
14
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
:root,
|
|
16
|
+
.light,
|
|
17
|
+
.dark,
|
|
18
|
+
[data-theme],
|
|
19
|
+
[data-page-frame] {
|
|
20
|
+
--sft-font-sans: --theme(--font-sans);
|
|
21
|
+
--sft-font-heading: --theme(--font-sans);
|
|
22
|
+
--sft-font-mono: --theme(--font-mono);
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
--sft-radius-control: --theme(--radius-md);
|
|
25
|
+
--sft-radius-card: --theme(--radius-lg);
|
|
26
|
+
--sft-radius-pill: --theme(--radius-full);
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
--sft-color-background: var(--background);
|
|
29
|
+
--sft-color-surface: var(--card);
|
|
30
|
+
--sft-color-surface-raised: var(--popover);
|
|
31
|
+
--sft-color-foreground: var(--foreground);
|
|
32
|
+
--sft-color-muted: var(--muted-foreground);
|
|
33
|
+
--sft-color-border: var(--border);
|
|
34
|
+
--sft-color-border-strong: var(--control-off);
|
|
35
|
+
--sft-color-accent: var(--primary);
|
|
36
|
+
--sft-color-accent-fill: var(--primary);
|
|
37
|
+
--sft-color-accent-fill-hover: var(--primary-hover);
|
|
38
|
+
--sft-color-on-accent: var(--primary-foreground);
|
|
39
|
+
--sft-color-danger: var(--red);
|
|
40
|
+
--sft-color-success: var(--green);
|
|
41
|
+
--sft-color-warning: var(--orange);
|
|
42
|
+
--sft-color-focus: var(--ring);
|
|
43
|
+
--sft-color-overlay: var(--overlay);
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
--sft-shadow-1: var(--shadow-card);
|
|
46
|
+
--sft-shadow-2: var(--shadow-dialog);
|
|
47
|
+
}
|
|
41
48
|
|
|
49
|
+
@layer base {
|
|
42
50
|
/* A page in a frame fills the window: no browser margin, the Notion background behind everything. */
|
|
43
51
|
body:has([data-page-frame]) {
|
|
44
52
|
margin: 0;
|