@widgetic/design-system 0.5.12 → 0.5.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.
@@ -39,6 +39,19 @@
39
39
  if (!host) {
40
40
  host = document.querySelector(`.${targetId}`) as HTMLElement | null;
41
41
  }
42
+ // Never adopt the portal's own subtree as its host.
43
+ //
44
+ // A caller may name a target after a class that the *portalled content*
45
+ // also carries (e.g. target `app-header-widget-picker` for a dropdown
46
+ // whose root div has that same class, so outside-click detection can
47
+ // find it). The slot is already rendered inside `portal` when onMount
48
+ // runs, so the class lookup above can return that inner div. Moving
49
+ // `portal` into it then throws
50
+ // "HierarchyRequestError: The new child element contains the parent".
51
+ // Anything equal to, inside, or containing `portal` is not a host.
52
+ if (host && (host === portal || portal?.contains(host) || host.contains(portal))) {
53
+ host = null;
54
+ }
42
55
  // if(showLogs) console.log('DS Portal host:', host, 'target:', target);
43
56
 
44
57
  // Create host container if it doesn't exist
@@ -1,3 +1,22 @@
1
+ /* Self-hosted faces from src/lib/fonts (packaged with DS).
2
+ * Paths are relative so Vite resolves them when consumers import fonts.css.
3
+ * Site also mirrors these under static/fonts for /fonts/* URLs in app.html.
4
+ *
5
+ * ## OTS / Chromium validation (Sep 2026)
6
+ * Several Inter / Cousine / JetBrains Mono WOFF2 files under src/lib/fonts fail
7
+ * Chromium OpenType Sanitizer (console: "OTS parsing error", "Failed to convert
8
+ * WOFF 2.0 font to SFNT") when served via Vite `@fs` in local monorepo links.
9
+ * That does NOT mean CSS @font-face is wrong — the binary files themselves are
10
+ * incomplete/corrupt for OTS. Google Fonts CDN faces (site app.html) still work
11
+ * for the same family names, so UI typography stays correct even when local
12
+ * @font-face errors appear in the console.
13
+ *
14
+ * Keep these @font-face rules for packaging / offline / consumers that ship
15
+ * clean binaries. Prefer replacing the WOFF2 files with official releases
16
+ * (rsms/inter, google/fonts) when cleaning the console is required — do not
17
+ * delete @font-face solely to silence OTS.
18
+ */
19
+
1
20
  /* Tailwind config */
2
21
  /* @config "../../../tailwind.config.ts"; */
3
22
 
@@ -6,7 +25,7 @@
6
25
  /** INTER FAMILY (Figma Foundations: 01 — Foundations) **/
7
26
  @font-face {
8
27
  font-family: 'Inter';
9
- src: url('/fonts/Inter/Inter-Thin-BETA.woff2') format('woff2');
28
+ src: url('../fonts/Inter/Inter-Thin-BETA.woff2') format('woff2');
10
29
  font-weight: 100;
11
30
  font-style: normal;
12
31
  font-display: swap;
@@ -14,7 +33,7 @@
14
33
 
15
34
  @font-face {
16
35
  font-family: 'Inter';
17
- src: url('/fonts/Inter/Inter-ExtraLight-BETA.woff2') format('woff2');
36
+ src: url('../fonts/Inter/Inter-ExtraLight-BETA.woff2') format('woff2');
18
37
  font-weight: 200;
19
38
  font-style: normal;
20
39
  font-display: swap;
@@ -22,7 +41,7 @@
22
41
 
23
42
  @font-face {
24
43
  font-family: 'Inter';
25
- src: url('/fonts/Inter/Inter-Light-BETA.woff2') format('woff2');
44
+ src: url('../fonts/Inter/Inter-Light-BETA.woff2') format('woff2');
26
45
  font-weight: 300;
27
46
  font-style: normal;
28
47
  font-display: swap;
@@ -30,7 +49,7 @@
30
49
 
31
50
  @font-face {
32
51
  font-family: 'Inter';
33
- src: url('/fonts/Inter/Inter-Regular.woff2') format('woff2');
52
+ src: url('../fonts/Inter/Inter-Regular.woff2') format('woff2');
34
53
  font-weight: 400;
35
54
  font-style: normal;
36
55
  font-display: swap;
@@ -38,7 +57,7 @@
38
57
 
39
58
  @font-face {
40
59
  font-family: 'Inter';
41
- src: url('/fonts/Inter/Inter-Italic.woff2') format('woff2');
60
+ src: url('../fonts/Inter/Inter-Italic.woff2') format('woff2');
42
61
  font-weight: 400;
43
62
  font-style: italic;
44
63
  font-display: swap;
@@ -46,7 +65,7 @@
46
65
 
47
66
  @font-face {
48
67
  font-family: 'Inter';
49
- src: url('/fonts/Inter/Inter-Medium.woff2') format('woff2');
68
+ src: url('../fonts/Inter/Inter-Medium.woff2') format('woff2');
50
69
  font-weight: 500;
51
70
  font-style: normal;
52
71
  font-display: swap;
@@ -54,7 +73,7 @@
54
73
 
55
74
  @font-face {
56
75
  font-family: 'Inter';
57
- src: url('/fonts/Inter/Inter-SemiBold.woff2') format('woff2');
76
+ src: url('../fonts/Inter/Inter-SemiBold.woff2') format('woff2');
58
77
  font-weight: 600;
59
78
  font-style: normal;
60
79
  font-display: swap;
@@ -62,7 +81,7 @@
62
81
 
63
82
  @font-face {
64
83
  font-family: 'Inter';
65
- src: url('/fonts/Inter/Inter-Bold.woff2') format('woff2');
84
+ src: url('../fonts/Inter/Inter-Bold.woff2') format('woff2');
66
85
  font-weight: 700;
67
86
  font-style: normal;
68
87
  font-display: swap;
@@ -70,7 +89,7 @@
70
89
 
71
90
  @font-face {
72
91
  font-family: 'Inter';
73
- src: url('/fonts/Inter/Inter-ExtraBold.woff2') format('woff2');
92
+ src: url('../fonts/Inter/Inter-ExtraBold.woff2') format('woff2');
74
93
  font-weight: 800;
75
94
  font-style: normal;
76
95
  font-display: swap;
@@ -78,7 +97,7 @@
78
97
 
79
98
  @font-face {
80
99
  font-family: 'Inter';
81
- src: url('/fonts/Inter/Inter-Black.woff2') format('woff2');
100
+ src: url('../fonts/Inter/Inter-Black.woff2') format('woff2');
82
101
  font-weight: 900;
83
102
  font-style: normal;
84
103
  font-display: swap;
@@ -86,7 +105,7 @@
86
105
 
87
106
  @font-face {
88
107
  font-family: 'Inter';
89
- src: url('/fonts/Inter/Inter.var.woff2') format('woff2-variations');
108
+ src: url('../fonts/Inter/Inter.var.woff2') format('woff2-variations');
90
109
  font-weight: 100 900;
91
110
  font-style: normal;
92
111
  font-display: swap;
@@ -95,7 +114,7 @@
95
114
  /* JETBRAINS MONO: Monospace Display (Developer API) */
96
115
  @font-face {
97
116
  font-family: 'JetBrains Mono';
98
- src: url('/fonts/JetBrainsMono/JetBrainsMono-ExtraBold.woff2') format('woff2');
117
+ src: url('../fonts/JetBrainsMono/JetBrainsMono-ExtraBold.woff2') format('woff2');
99
118
  font-weight: 800;
100
119
  font-style: normal;
101
120
  font-display: swap;
@@ -104,7 +123,7 @@
104
123
  /* COUSINE: Code & Embed Snippets */
105
124
  @font-face {
106
125
  font-family: 'Cousine';
107
- src: url('/fonts/Cousine/Cousine-Regular.woff2') format('woff2');
126
+ src: url('../fonts/Cousine/Cousine-Regular.woff2') format('woff2');
108
127
  font-weight: 400;
109
128
  font-style: normal;
110
129
  font-display: swap;
@@ -112,7 +131,7 @@
112
131
 
113
132
  @font-face {
114
133
  font-family: 'Cousine';
115
- src: url('/fonts/Cousine/Cousine-Bold.woff2') format('woff2');
134
+ src: url('../fonts/Cousine/Cousine-Bold.woff2') format('woff2');
116
135
  font-weight: 700;
117
136
  font-style: normal;
118
137
  font-display: swap;
@@ -476,14 +476,14 @@ go 3 levels up in development mode, 2 levels up in production mode*/
476
476
  /* Tablet (744px and below) */
477
477
  @media (max-width: 744px) {
478
478
  .dashboard-grid {
479
- grid-template-columns:
480
- var(--dashboard-margin)
479
+ /* Keep the four tracks aligned with the four named areas below. */
480
+ grid-template-columns:
481
481
  var(--dashboard-sidebar-width)
482
- var(--dashboard-gap)
483
- 1fr
482
+ var(--dashboard-margin)
483
+ minmax(0, 1fr)
484
484
  var(--dashboard-margin);
485
485
  grid-template-rows: 56px 1fr;
486
- gap: var(--dashboard-gap);
486
+ gap: 0;
487
487
  grid-template-areas:
488
488
  "sidebar margin-l header margin-r"
489
489
  "sidebar margin-l main margin-r";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/design-system",
3
- "version": "0.5.12",
3
+ "version": "0.5.14",
4
4
  "type": "module",
5
5
  "svelte": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -38,6 +38,8 @@
38
38
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
39
39
  "check:watch": "NODE_OPTIONS='--max-old-space-size=8192' svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
40
40
  "check:strict": "tsc --noEmit && npm run check",
41
+ "check:deps": "check-runtime-deps",
42
+ "test:deps": "check-runtime-deps-fixtures",
41
43
  "pnpm-link": "zsh -c 'mkdir -p ~/.pnpm-global/bin && export PATH=\"$PATH:$HOME/.pnpm-global/bin\" && pnpm install -g pnpm && pnpm config set global-bin-dir ~/.pnpm-global/bin && echo \"export PATH=\\\"$PATH:$HOME/.pnpm-global/bin\\\"\" >> ~/.zshrc && source ~/.zshrc && pnpm link --global'",
42
44
  "link-packs": "zsh -c 'mkdir -p ~/.pnpm-global/bin && export PATH=\"$PATH:$HOME/.pnpm-global/bin\" && pnpm install -g pnpm && pnpm config set global-bin-dir ~/.pnpm-global/bin && echo \"export PATH=\\\"$PATH:$HOME/.pnpm-global/bin\\\"\" >> ~/.zshrc && source ~/.zshrc && pnpm link --global @widgetic/api-sdk @widgetic/design-system'",
43
45
  "i-shadcn": "npm run clean-shadcn && npm run i-shadcn-init && npm run i-shadcn-comps",
@@ -93,16 +95,6 @@
93
95
  "svelte": "./dist/stores/*.js",
94
96
  "default": "./dist/stores/*.js"
95
97
  },
96
- "./previews": {
97
- "types": "./dist/components/previews/index.d.ts",
98
- "svelte": "./dist/components/previews/index.js",
99
- "default": "./dist/components/previews/index.js"
100
- },
101
- "./previews/*": {
102
- "types": "./dist/components/previews/*.d.ts",
103
- "svelte": "./dist/components/previews/*.js",
104
- "default": "./dist/components/previews/*.js"
105
- },
106
98
  "./styles": "./dist/styles/global.css",
107
99
  "./styles/*": "./dist/styles/*.css",
108
100
  "./fonts": "./dist/fonts",
@@ -149,6 +141,7 @@
149
141
  "@tiptap/pm": "^2.9.1",
150
142
  "@tiptap/starter-kit": "^2.9.1",
151
143
  "@types/node": "^22.10.1",
144
+ "@widgetic/dev-tools": "^0.1.0",
152
145
  "chokidar-cli": "^3.0.0",
153
146
  "concurrently": "^9.1.0",
154
147
  "eslint": "^9.7.0",