@gjsify/storybook-nativescript 0.64.12-next.281 → 0.64.12
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/lib/esm/controls.js +1 -1
- package/package.json +10 -11
package/lib/esm/controls.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{bindControl as e}from"@gjsify/storybook-core";import{Adw as t,AdwSliderRow as n,NOTIFY_ACTIVE as r,NOTIFY_SELECTED as i,NOTIFY_SLIDER_VALUE as a,NOTIFY_TEXT as o,NOTIFY_VALUE as s}from"@gjsify/adwaita-nativescript";function createControlRow(t,n){return e(t,n,
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{bindControl as e}from"@gjsify/storybook-core";import{Adw as t,AdwSliderRow as n,NOTIFY_ACTIVE as r,NOTIFY_SELECTED as i,NOTIFY_SLIDER_VALUE as a,NOTIFY_TEXT as o,NOTIFY_VALUE as s}from"@gjsify/adwaita-nativescript";import{GjsifyOptionList as c}from"@gjsify/adwaita-core";function createControlRow(t,n){return e(t,n,l)}const l={text(e){let n=new t.EntryRow;n.title=e;let cb=()=>{};return n.connect(o,e=>cb(e.text)),{node:n,get:()=>n.text??``,set:e=>{n.text=e},onChange:e=>{cb=e}}},color(e,n){let r=new t.EntryRow;r.title=`${e} (hex)`,n&&(r.subtitle=n);let cb=()=>{};return r.connect(o,e=>cb(e.text)),{node:r,get:()=>r.text??``,set:e=>{r.text=e},onChange:e=>{cb=e}}},boolean(e,n){let i=new t.SwitchRow;i.title=e,n&&(i.subtitle=n);let cb=()=>{};return i.connect(r,e=>cb(e.active)),{node:i,get:()=>i.active,set:e=>{i.active=e},onChange:e=>{cb=e}}},number(e){return spinRow(e)},range(e){return sliderRow(e)},select(e){let n=e.options??[],r=new t.ComboRow;r.title=label(e),e.description&&(r.subtitle=e.description),r.model=c.new(n.map(e=>({label:e.label,value:String(e.value)})));let cb=()=>{};return r.addEventListener(i,e=>cb(e.selected)),{node:r,get:()=>r.selected,set:e=>{r.selected=e},onChange:e=>{cb=e}}}};function spinRow(e){let n=new t.SpinRow;n.title=label(e),e.description&&(n.subtitle=e.description),n.adjustment={lower:e.min??0,upper:e.max??100,stepIncrement:e.step??1};let cb=()=>{};return n.addEventListener(s,e=>cb(e.value)),{node:n,get:()=>n.value,set:e=>{n.value=e},onChange:e=>{cb=e}}}function sliderRow(e){let t=new n;t.title=label(e),t.adjustment={lower:e.min??0,upper:e.max??100,stepIncrement:e.step??1};let cb=()=>{};return t.addEventListener(a,e=>cb(e.value)),{node:t,get:()=>t.value,set:e=>{t.value=e},onChange:e=>{cb=e}}}function label(e){return e.label||e.name}export{createControlRow};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/storybook-nativescript",
|
|
3
|
-
"version": "0.64.12
|
|
3
|
+
"version": "0.64.12",
|
|
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.64.12
|
|
43
|
-
"@gjsify/adwaita-core": "0.64.12
|
|
44
|
-
"@gjsify/adwaita-nativescript": "0.64.12
|
|
45
|
-
"@gjsify/devtools-nativescript": "0.64.12
|
|
46
|
-
"@gjsify/stories": "0.64.12
|
|
47
|
-
"@gjsify/storybook-core": "0.64.12
|
|
42
|
+
"@gjsify/adwaita-icons": "^0.64.12",
|
|
43
|
+
"@gjsify/adwaita-core": "^0.64.12",
|
|
44
|
+
"@gjsify/adwaita-nativescript": "^0.64.12",
|
|
45
|
+
"@gjsify/devtools-nativescript": "^0.64.12",
|
|
46
|
+
"@gjsify/stories": "^0.64.12",
|
|
47
|
+
"@gjsify/storybook-core": "^0.64.12"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@nativescript/core": "*"
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@gjsify/cli": "0.64.12
|
|
59
|
-
"@gjsify/unit": "0.64.12
|
|
58
|
+
"@gjsify/cli": "^0.64.12",
|
|
59
|
+
"@gjsify/unit": "^0.64.12",
|
|
60
60
|
"@nativescript/types": "~9.0.0",
|
|
61
61
|
"@types/node": "^25.9.2",
|
|
62
62
|
"typescript": "^6.0.3"
|
|
@@ -83,6 +83,5 @@
|
|
|
83
83
|
"bugs": {
|
|
84
84
|
"url": "https://github.com/gjsify/gjsify/issues"
|
|
85
85
|
},
|
|
86
|
-
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/storybook#readme"
|
|
87
|
-
"gitHead": "c4d2e266c0d9849860b9828c14ebfe37b6d493b8"
|
|
86
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/storybook#readme"
|
|
88
87
|
}
|