@softure-ai/theme-notion 0.17.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 +21 -0
- package/README.md +44 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/messages/en.d.ts +14 -0
- package/dist/messages/en.d.ts.map +1 -1
- package/dist/messages/en.js +14 -0
- package/dist/messages/en.js.map +1 -1
- package/dist/messages/index.d.ts +14 -0
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/notion/Document.d.ts +71 -0
- package/dist/notion/Document.d.ts.map +1 -0
- package/dist/notion/Document.js +147 -0
- package/dist/notion/Document.js.map +1 -0
- package/dist/notion/document-kind.d.ts +7 -0
- package/dist/notion/document-kind.d.ts.map +1 -0
- package/dist/notion/document-kind.js +13 -0
- package/dist/notion/document-kind.js.map +1 -0
- package/dist/notion/pdf-engine.d.ts +18 -0
- package/dist/notion/pdf-engine.d.ts.map +1 -0
- package/dist/notion/pdf-engine.js +44 -0
- package/dist/notion/pdf-engine.js.map +1 -0
- package/dist/sft-bridge.css +41 -33
- package/package.json +2 -1
- package/src/index.ts +13 -0
- package/src/lib/pdfjs-worker.d.ts +4 -0
- package/src/messages/en.ts +14 -0
- package/src/notion/Document.tsx +347 -0
- package/src/notion/document-kind.ts +15 -0
- package/src/notion/pdf-engine.ts +64 -0
- package/src/sft-bridge.css +41 -33
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;
|