@gjsify/storybook-nativescript 0.38.1 → 0.39.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.
@@ -7,8 +7,8 @@ export type StoryArgsListener = (args: StoryArgs) => void;
7
7
  * Base class for NativeScript story views.
8
8
  *
9
9
  * Provides default chrome — a clamped boxed group (`AdwClamp` +
10
- * `AdwPreferencesGroup`) with a title + description above a centered,
11
- * dashed-framed preview "stage" — built programmatically with the
10
+ * `AdwPreferencesGroup`) with a title + description above a centered, tinted
11
+ * preview "stage" — built programmatically with the
12
12
  * `@gjsify/adwaita-nativescript` widgets + the Adwaita CSS classes. Simple
13
13
  * stories compose their preview by calling {@link addContent}; a subclass that
14
14
  * needs a bespoke layout passes its own root view to the constructor (then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/storybook-nativescript",
3
- "version": "0.38.1",
3
+ "version": "0.39.0",
4
4
  "description": "NativeScript renderer for the @gjsify/stories contract — the NS counterpart of @gjsify/storybook (GTK) and @gjsify/adwaita-storybook (browser), built on @gjsify/adwaita-nativescript real native widgets",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -39,12 +39,12 @@
39
39
  "gnome"
40
40
  ],
41
41
  "dependencies": {
42
- "@gjsify/adwaita-icons": "^0.38.1",
43
- "@gjsify/adwaita-core": "^0.38.1",
44
- "@gjsify/adwaita-nativescript": "^0.38.1",
45
- "@gjsify/devtools-nativescript": "^0.38.1",
46
- "@gjsify/stories": "^0.38.1",
47
- "@gjsify/storybook-core": "^0.38.1"
42
+ "@gjsify/adwaita-icons": "^0.39.0",
43
+ "@gjsify/adwaita-core": "^0.39.0",
44
+ "@gjsify/adwaita-nativescript": "^0.39.0",
45
+ "@gjsify/devtools-nativescript": "^0.39.0",
46
+ "@gjsify/stories": "^0.39.0",
47
+ "@gjsify/storybook-core": "^0.39.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@nativescript/core": "*"
@@ -55,8 +55,8 @@
55
55
  }
56
56
  },
57
57
  "devDependencies": {
58
- "@gjsify/cli": "^0.38.1",
59
- "@gjsify/unit": "^0.38.1",
58
+ "@gjsify/cli": "^0.39.0",
59
+ "@gjsify/unit": "^0.39.0",
60
60
  "@nativescript/types": "~9.0.0",
61
61
  "@types/node": "^25.9.2",
62
62
  "typescript": "^6.0.3"
@@ -108,8 +108,26 @@
108
108
  /* ===== Detail area (preview content + right controls overlay) ===== */
109
109
 
110
110
  .sb-controls-split,
111
+ /* The preview AREA carries the tint, not a box inside it — the stage version floated
112
+ * in the pane with no edge. On the element that already owns the area's background,
113
+ * because an opaque background one level in covers a gradient one level out (measured
114
+ * on the browser target: five sample points across the pane returned the identical
115
+ * colour while the computed style still reported a background-image).
116
+ *
117
+ * The NS subset's two substitutions still hold: one `linear-gradient` per declaration
118
+ * rather than two radial corners, and the accent spelled out per scheme because there
119
+ * are no custom properties — so a runtime accent does NOT reach this backdrop here.
120
+ * Middle stops fade to a zero-alpha COPY of each tint rather than to `transparent`,
121
+ * which is rgba(0,0,0,0) and pulls a grey through the centre. */
111
122
  .sb-preview-scroll {
112
123
  background-color: #fafafb;
124
+ background-image: linear-gradient(
125
+ 135deg,
126
+ rgba(28, 113, 216, 0.07) 0%,
127
+ rgba(28, 113, 216, 0) 45%,
128
+ rgba(146, 110, 228, 0) 55%,
129
+ rgba(146, 110, 228, 0.06) 100%
130
+ );
113
131
  }
114
132
 
115
133
  .sb-preview-pane {
@@ -136,15 +154,9 @@
136
154
  margin: 3 0 0 0;
137
155
  }
138
156
 
139
- /*
140
- * Centered, dashed-framed preview stage (mirrors the browser .story-stage and
141
- * the native renderer's .story-stage). NS supports a dashed border style.
142
- */
157
+ /* Breathing room only. No radius and no surface: nothing here is a box any more —
158
+ * the tinted area is `.sb-preview-scroll` above. */
143
159
  .story-stage {
144
- border-width: 1;
145
- border-color: rgba(0, 0, 0, 0.28);
146
- border-style: dashed;
147
- border-radius: 12;
148
160
  padding: 18;
149
161
  margin: 12 0 0 0;
150
162
  }
@@ -217,10 +229,6 @@
217
229
  color: rgba(255, 255, 255, 0.55);
218
230
  }
219
231
 
220
- .ns-dark .story-stage {
221
- border-color: rgba(255, 255, 255, 0.28);
222
- }
223
-
224
232
  /* ===== Appearance dialog swatches =====
225
233
  * Round accent swatches. NS has no radio input and no `:checked`, so selection is a
226
234
  * class the dialog maintains and the ring is a border — `border-radius`,
@@ -251,3 +259,22 @@
251
259
  .ns-dark .sb-swatch.selected {
252
260
  border-color: #ffffff;
253
261
  }
262
+
263
+ /* The preview area's dark tint. Only the accent end changes: it carries the
264
+ * STANDALONE accent, which libadwaita lightens for a dark background
265
+ * (#1c71d8 → #78aeed), while the purple is decoration and is the same hue in
266
+ * both schemes — as it is on the website. Alphas rise slightly because a tint
267
+ * over #1d1d20 reads weaker than the same tint over white.
268
+ *
269
+ * The full compound is restated rather than only the changed stops: NS sums
270
+ * specificity FLAT (class, attribute and pseudo-class 10 each — css-selector.js
271
+ * :205,292) and there is no per-stop cascade for a gradient anyway. */
272
+ .ns-dark .sb-preview-scroll {
273
+ background-image: linear-gradient(
274
+ 135deg,
275
+ rgba(120, 174, 237, 0.09) 0%,
276
+ rgba(120, 174, 237, 0) 45%,
277
+ rgba(146, 110, 228, 0) 55%,
278
+ rgba(146, 110, 228, 0.08) 100%
279
+ );
280
+ }