@gjsify/adwaita-core 0.14.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.
@@ -0,0 +1 @@
1
+ var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0});export{__name};
@@ -0,0 +1 @@
1
+ import"./_virtual/_rolldown/runtime.js";const e=/^(min|max)-(width|height)\s*:\s*(\d+(?:\.\d+)?)\s*(px|sp|pt)?$/i;function isLeaf(e){return e.op===void 0}function splitOn(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let i=e[r];if(i===`)`)n++;else if(i===`(`)n--;else if(n===0){let n=r-t.length+1;if(n>0&&r+1<e.length&&/\s/.test(e[n-1])&&/\s/.test(e[r+1])&&e.slice(n,r+1).toLowerCase()===t)return{left:e.slice(0,n),right:e.slice(r+1)}}}return null}function splitTopLevel(e){for(let t of[`or`,`and`]){let n=splitOn(e,t);if(n)return{op:t,...n}}return null}function parseBreakpointCondition(t){let n=t.trim();if(!n)return null;let r=splitTopLevel(n);if(r){let e=parseBreakpointCondition(r.left),t=parseBreakpointCondition(r.right);return!e||!t?null:{op:r.op,left:e,right:t}}if(n.startsWith(`(`)&&n.endsWith(`)`))return parseBreakpointCondition(n.slice(1,-1));let i=e.exec(n);return i?{bound:i[1].toLowerCase(),dimension:i[2].toLowerCase(),value:Number.parseFloat(i[3])}:null}function evaluateBreakpointCondition(e,t){if(isLeaf(e)){let n=e.dimension===`width`?t.width:t.height;return e.bound===`max`?n<=e.value:n>=e.value}let n=evaluateBreakpointCondition(e.left,t);return e.op===`and`?n&&evaluateBreakpointCondition(e.right,t):n||evaluateBreakpointCondition(e.right,t)}var AdwBreakpoint=class{constructor(e,t){this._applied=!1,this.condition=typeof e==`string`?parseBreakpointCondition(e):e??null,this._handlers=t}get applied(){return this._applied}evaluate(e){let t=this.condition?evaluateBreakpointCondition(this.condition,e):!1;return t===this._applied?this._applied:(this._applied=t,t?this._handlers.onApply():this._handlers.onUnapply?.(),this._applied)}};export{AdwBreakpoint,evaluateBreakpointCondition,parseBreakpointCondition};
@@ -0,0 +1 @@
1
+ import"./_virtual/_rolldown/runtime.js";const e=`#33333A`,t=`#FFFFFF`;let n=`light`;const r=new Set;function adwaitaColorScheme(){return n}function setAdwaitaColorScheme(e){let t=e===`dark`?`dark`:`light`;if(t!==n){n=t;for(let e of[...r])try{e()}catch{}}}function toggleAdwaitaColorScheme(){return setAdwaitaColorScheme(n===`dark`?`light`:`dark`),n}function themeIconColor(){return n===`dark`?t:e}function isThemeIconColor(e){return e===`#33333A`||e===`#FFFFFF`}function onAdwaitaColorSchemeChanged(e){return r.add(e),()=>{r.delete(e)}}export{e as DEFAULT_ICON_COLOR,t as DEFAULT_ICON_COLOR_DARK,adwaitaColorScheme,isThemeIconColor,onAdwaitaColorSchemeChanged,setAdwaitaColorScheme,themeIconColor,toggleAdwaitaColorScheme};
@@ -0,0 +1 @@
1
+ import"./_virtual/_rolldown/runtime.js";var AdwAlertResponses=class{constructor(e=``,t=``){this._responses=[],this._defaultResponse=null,this._closeResponse=`close`,this._heading=e??``,this._body=t??``}get heading(){return this._heading}set heading(e){this._heading=e??``}get body(){return this._body}set body(e){this._body=e??``}addResponse(e,t,n={}){let r=this._responses.find(t=>t.id===e);if(r){r.label=t,n.appearance!==void 0&&(r.appearance=n.appearance),n.enabled!==void 0&&(r.enabled=n.enabled);return}this._responses.push({id:e,label:t,appearance:n.appearance??`default`,enabled:n.enabled??!0})}addResponses(...e){for(let t=0;t+1<e.length;t+=2)this.addResponse(e[t],e[t+1])}hasResponse(e){return this._responses.some(t=>t.id===e)}setResponseAppearance(e,t){let n=this._responses.find(t=>t.id===e);n&&(n.appearance=t)}getResponseAppearance(e){return this._responses.find(t=>t.id===e)?.appearance??`default`}setResponseEnabled(e,t){let n=this._responses.find(t=>t.id===e);n&&(n.enabled=t)}getResponseEnabled(e){return this._responses.find(t=>t.id===e)?.enabled??!0}get responses(){return this._responses}get defaultResponse(){return this._defaultResponse}set defaultResponse(e){this._defaultResponse=e}get closeResponse(){return this._closeResponse}set closeResponse(e){this._closeResponse=e||`close`}get usesActionSheet(){return this._responses.length>3}orderResponses(){let e=this._responses.find(e=>e.id===this._defaultResponse)??this._responses[0],t=this._responses.filter(t=>t!==e);return{ok:e,cancel:t[t.length-1],neutral:t.length>=2?t[0]:void 0}}resolveById(e){return e!=null&&this.hasResponse(e)?e:this._closeResponse}resolveLabel(e){return e==null?this._closeResponse:this.resolveById(this._responses.find(t=>t.label===e)?.id)}};export{AdwAlertResponses};
@@ -0,0 +1 @@
1
+ import{AdwBreakpoint as e,evaluateBreakpointCondition as t,parseBreakpointCondition as n}from"./breakpoint.js";import{DEFAULT_ICON_COLOR as r,DEFAULT_ICON_COLOR_DARK as i,adwaitaColorScheme as a,isThemeIconColor as o,onAdwaitaColorSchemeChanged as s,setAdwaitaColorScheme as c,themeIconColor as l,toggleAdwaitaColorScheme as u}from"./color-scheme.js";import{AdwAlertResponses as d}from"./dialog.js";import{AdwToast as f,AdwToastQueue as p,DEFAULT_TOAST_TIMEOUT as m}from"./toast.js";export{d as AdwAlertResponses,e as AdwBreakpoint,f as AdwToast,p as AdwToastQueue,r as DEFAULT_ICON_COLOR,i as DEFAULT_ICON_COLOR_DARK,m as DEFAULT_TOAST_TIMEOUT,a as adwaitaColorScheme,t as evaluateBreakpointCondition,o as isThemeIconColor,s as onAdwaitaColorSchemeChanged,n as parseBreakpointCondition,c as setAdwaitaColorScheme,l as themeIconColor,u as toggleAdwaitaColorScheme};
@@ -0,0 +1 @@
1
+ import"./_virtual/_rolldown/runtime.js";const e=5e3;var AdwToast=class{constructor(e=``,t={}){this.title=e,this.timeout=t.timeout??5e3,this.buttonLabel=t.buttonLabel??``}get hasButton(){return this.buttonLabel.length>0}},AdwToastQueue=class{constructor(e){this._pending=[],this._current=null,this._timer=null,this._scheduler=e.scheduler,this._handlers={onShow:e.onShow,onHide:e.onHide}}get current(){return this._current}get showing(){return this._current!==null}get pending(){return this._pending.length}add(e){this._current===null?this._show(e):this._pending.push(e)}dismiss(){if(this._current===null)return;let e=this._current;this._clearTimer(),this._current=null,this._handlers.onHide(e);let t=this._pending.shift();t&&this._show(t)}clear(){if(this._pending.length=0,this._current===null)return;let e=this._current;this._clearTimer(),this._current=null,this._handlers.onHide(e)}_show(e){this._current=e,this._handlers.onShow(e),e.timeout>0&&(this._timer=this._scheduler.schedule(()=>{this._current===e&&this.dismiss()},e.timeout))}_clearTimer(){this._timer!==null&&(this._scheduler.cancel(this._timer),this._timer=null)}};export{AdwToast,AdwToastQueue,e as DEFAULT_TOAST_TIMEOUT};
@@ -0,0 +1,61 @@
1
+ /** The two size axes a condition can test. */
2
+ export type BreakpointDimension = 'width' | 'height';
3
+ /** Whether a leaf is a lower (`min`) or upper (`max`) bound. */
4
+ export type BreakpointBound = 'min' | 'max';
5
+ /** A single `min-/max-width/height: <value>` comparison (value in DIPs). */
6
+ export interface BreakpointConditionLeaf {
7
+ dimension: BreakpointDimension;
8
+ bound: BreakpointBound;
9
+ /** Threshold in DIPs (the parsed `px` / `sp` / `pt` value). */
10
+ value: number;
11
+ }
12
+ /** A boolean combination of two condition nodes. */
13
+ export interface BreakpointConditionGroup {
14
+ op: 'and' | 'or';
15
+ left: BreakpointConditionNode;
16
+ right: BreakpointConditionNode;
17
+ }
18
+ /** A parsed breakpoint condition: a leaf comparison or an and/or group. */
19
+ export type BreakpointConditionNode = BreakpointConditionLeaf | BreakpointConditionGroup;
20
+ /** A measured size in DIPs. */
21
+ export interface BreakpointSize {
22
+ width: number;
23
+ height: number;
24
+ }
25
+ /**
26
+ * Parse a Libadwaita breakpoint condition string into a {@link BreakpointConditionNode}.
27
+ * Accepts a single comparison (`'max-width: 720sp'`), and/or chains
28
+ * (`'max-width: 720sp and max-height: 480sp'`), and parenthesised groups. Units
29
+ * are read as DIPs. Returns null when the string can't be parsed.
30
+ */
31
+ export declare function parseBreakpointCondition(spec: string): BreakpointConditionNode | null;
32
+ /** Evaluate a parsed condition against a measured size (DIPs). */
33
+ export declare function evaluateBreakpointCondition(node: BreakpointConditionNode, size: BreakpointSize): boolean;
34
+ /** Callbacks run as a breakpoint's condition flips. */
35
+ export interface AdwBreakpointHandlers {
36
+ /** Run when the condition becomes true (the narrow/large state is entered). */
37
+ onApply: () => void;
38
+ /** Run when the condition becomes false again. Optional. */
39
+ onUnapply?: () => void;
40
+ }
41
+ /**
42
+ * A single responsive breakpoint: a condition plus apply/unapply callbacks.
43
+ * Mirrors `Adw.Breakpoint`. Drive {@link evaluate} from your renderer's size
44
+ * source (e.g. `addBreakpoints` in `@gjsify/adwaita-nativescript`, or a
45
+ * `ResizeObserver` in a browser renderer).
46
+ */
47
+ export declare class AdwBreakpoint {
48
+ /** The parsed condition (null when an invalid string was passed). */
49
+ readonly condition: BreakpointConditionNode | null;
50
+ private _handlers;
51
+ private _applied;
52
+ constructor(condition: string | BreakpointConditionNode | null, handlers: AdwBreakpointHandlers);
53
+ /** Whether the condition is currently satisfied (apply has fired, not unapply). */
54
+ get applied(): boolean;
55
+ /**
56
+ * Re-evaluate against `size`, firing apply / unapply ONLY on a state change
57
+ * (so a steady stream of layout passes doesn't re-run the callbacks). Returns
58
+ * the post-evaluation applied state. A null condition never applies.
59
+ */
60
+ evaluate(size: BreakpointSize): boolean;
61
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,27 @@
1
+ /** Default symbolic-icon fill for light theme — Adwaita's ~`rgba(0,0,0,0.8)` fg. */
2
+ export declare const DEFAULT_ICON_COLOR = "#33333A";
3
+ /** Default symbolic-icon fill for dark theme — near-white fg. */
4
+ export declare const DEFAULT_ICON_COLOR_DARK = "#FFFFFF";
5
+ /** The two Adwaita color schemes. */
6
+ export type AdwColorScheme = 'light' | 'dark';
7
+ /** The active color scheme (default `'light'`). */
8
+ export declare function adwaitaColorScheme(): AdwColorScheme;
9
+ /**
10
+ * Set the active color scheme. A no-op when unchanged; otherwise notifies every
11
+ * subscriber (so theme-aware icons re-render). The renderer should also apply
12
+ * its platform half (e.g. the `ns-dark` class on NativeScript, a CSS scope in
13
+ * the browser).
14
+ */
15
+ export declare function setAdwaitaColorScheme(scheme: AdwColorScheme): void;
16
+ /** Flip light↔dark and return the new scheme. */
17
+ export declare function toggleAdwaitaColorScheme(): AdwColorScheme;
18
+ /** The default symbolic-icon fill for the active scheme (dark fg on light, near-white on dark). */
19
+ export declare function themeIconColor(): string;
20
+ /** Whether `color` is the current scheme-default fill (i.e. not a caller-set explicit colour). */
21
+ export declare function isThemeIconColor(color: string): boolean;
22
+ /**
23
+ * Subscribe to scheme changes. Returns an unsubscribe function. Widgets should
24
+ * subscribe while on screen and unsubscribe when leaving it (e.g. NS `loaded` /
25
+ * `unloaded`), so the registry only ever holds live subscribers.
26
+ */
27
+ export declare function onAdwaitaColorSchemeChanged(listener: () => void): () => void;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,100 @@
1
+ /** Visual emphasis of a response button. Mirrors `Adw.ResponseAppearance`. */
2
+ export type AdwResponseAppearance = 'default' | 'suggested' | 'destructive';
3
+ /** Optional per-response attributes for {@link AdwAlertResponses.addResponse}. */
4
+ export interface AdwResponseOptions {
5
+ /** Emphasis (suggested/destructive). Default `'default'`. Mirrors `set_response_appearance`. */
6
+ appearance?: AdwResponseAppearance;
7
+ /** Whether the response is selectable. Default `true`. Mirrors `set_response_enabled`. */
8
+ enabled?: boolean;
9
+ }
10
+ /** A registered response button. `id` is what `present()` resolves to. */
11
+ export interface AdwAlertResponse {
12
+ /** Stable response id — the value `present()` resolves to. */
13
+ readonly id: string;
14
+ /** Button label shown to the user. */
15
+ label: string;
16
+ /** Visual emphasis. */
17
+ appearance: AdwResponseAppearance;
18
+ /** Whether the response is selectable. */
19
+ enabled: boolean;
20
+ }
21
+ /**
22
+ * The response list split into the three slots a native two/three-button dialog
23
+ * exposes: the emphasised OK (the default response, or the first), the trailing
24
+ * cancel/close, and an optional middle neutral. Any slot may be absent.
25
+ */
26
+ export interface OrderedConfirmResponses {
27
+ ok?: AdwAlertResponse;
28
+ cancel?: AdwAlertResponse;
29
+ neutral?: AdwAlertResponse;
30
+ }
31
+ /**
32
+ * The headless alert-dialog response model. Holds the heading/body text and the
33
+ * response registry; owns the ordering + validation a renderer's `present()`
34
+ * needs. Renderer-agnostic: compose it inside a platform dialog (e.g. NativeScript
35
+ * `AdwAlertDialog extends Observable`) and delegate the response surface to it.
36
+ */
37
+ export declare class AdwAlertResponses {
38
+ private _heading;
39
+ private _body;
40
+ private readonly _responses;
41
+ private _defaultResponse;
42
+ private _closeResponse;
43
+ constructor(heading?: string, body?: string);
44
+ /** The dialog heading (title). */
45
+ get heading(): string;
46
+ set heading(value: string);
47
+ /** The dialog body text. */
48
+ get body(): string;
49
+ set body(value: string);
50
+ /**
51
+ * Register a response button. `id` is what `present()` resolves to; a repeated
52
+ * `id` updates the existing response's label/appearance/enabled in place
53
+ * (mirroring `adw_alert_dialog_add_response` refusing duplicate ids).
54
+ */
55
+ addResponse(id: string, label: string, options?: AdwResponseOptions): void;
56
+ /** Register many responses at once (`id, label, id, label, …`). */
57
+ addResponses(...idLabelPairs: string[]): void;
58
+ /** Whether a response with `id` is registered. */
59
+ hasResponse(id: string): boolean;
60
+ /** Set a registered response's visual emphasis. No-op for an unknown id. */
61
+ setResponseAppearance(id: string, appearance: AdwResponseAppearance): void;
62
+ /** A registered response's emphasis, or `'default'` for an unknown id. */
63
+ getResponseAppearance(id: string): AdwResponseAppearance;
64
+ /** Enable/disable a registered response. No-op for an unknown id. */
65
+ setResponseEnabled(id: string, enabled: boolean): void;
66
+ /** Whether a registered response is enabled (`true` for an unknown id). */
67
+ getResponseEnabled(id: string): boolean;
68
+ /** The registered responses, in insertion order. */
69
+ get responses(): ReadonlyArray<AdwAlertResponse>;
70
+ /** The default (emphasised) response id — the OK slot in a native dialog. */
71
+ get defaultResponse(): string | null;
72
+ set defaultResponse(id: string | null);
73
+ /** The response id used when the dialog is dismissed without a choice. */
74
+ get closeResponse(): string;
75
+ set closeResponse(id: string);
76
+ /**
77
+ * Whether the response list is too long for a plain two/three-button alert
78
+ * (so a renderer falls back to an action sheet). Mirrors the NativeScript
79
+ * `confirm()` (≤3) vs `action()` (>3) split.
80
+ */
81
+ get usesActionSheet(): boolean;
82
+ /**
83
+ * Split the responses into the native OK / cancel / neutral slots: the default
84
+ * response (or the first) is OK, the LAST remaining is cancel/close, and a
85
+ * middle one (when present) is neutral — the ordering a native two/three-button
86
+ * dialog expects.
87
+ */
88
+ orderResponses(): OrderedConfirmResponses;
89
+ /**
90
+ * Resolve a chosen response id to a REGISTERED id — the resolve-to-chosen-id
91
+ * contract. Returns `id` when it names a registered response, otherwise
92
+ * {@link closeResponse} (covering `null` / dismissal / an unknown id).
93
+ */
94
+ resolveById(id: string | null | undefined): string;
95
+ /**
96
+ * Resolve a chosen LABEL (e.g. an action-sheet selection) to a registered id,
97
+ * or {@link closeResponse} when the label matches nothing / was dismissed.
98
+ */
99
+ resolveLabel(label: string | null | undefined): string;
100
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export { AdwBreakpoint, evaluateBreakpointCondition, parseBreakpointCondition, } from './breakpoint.js';
2
+ export type { AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './breakpoint.js';
3
+ export { DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, } from './color-scheme.js';
4
+ export type { AdwColorScheme } from './color-scheme.js';
5
+ export { AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT } from './toast.js';
6
+ export type { AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, } from './toast.js';
7
+ export { AdwAlertResponses } from './dialog.js';
8
+ export type { AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, } from './dialog.js';
@@ -0,0 +1,89 @@
1
+ /** Default toast lifetime, in milliseconds (Adwaita's default ≈ 5 s). */
2
+ export declare const DEFAULT_TOAST_TIMEOUT = 5000;
3
+ /** Options for constructing an {@link AdwToast}. Mirrors `Adw.Toast`'s properties. */
4
+ export interface AdwToastOptions {
5
+ /** Auto-dismiss timeout in ms (`0` = sticky until dismissed). Default {@link DEFAULT_TOAST_TIMEOUT}. */
6
+ timeout?: number;
7
+ /** Optional action-button label (empty = no button). Mirrors `Adw.Toast:button-label`. */
8
+ buttonLabel?: string;
9
+ }
10
+ /**
11
+ * A single transient toast descriptor. Mirrors `Adw.Toast` — a value object
12
+ * (title + auto-dismiss timeout + optional action) enqueued via
13
+ * {@link AdwToastQueue.add}.
14
+ */
15
+ export declare class AdwToast {
16
+ /** The toast message. */
17
+ title: string;
18
+ /** Auto-dismiss timeout in ms (`0` = sticky). */
19
+ timeout: number;
20
+ /** Action-button label (empty = no button). */
21
+ buttonLabel: string;
22
+ constructor(title?: string, options?: AdwToastOptions);
23
+ /** Whether this toast carries an action button (the action-button render state). */
24
+ get hasButton(): boolean;
25
+ }
26
+ /** Opaque handle a {@link ToastScheduler} returns for a scheduled auto-dismiss. */
27
+ export type ToastTimerHandle = unknown;
28
+ /**
29
+ * The injected timing seam. A renderer wraps its platform timer (NativeScript's
30
+ * `setTimeout`/`clearTimeout`, the browser's, a deterministic fake in tests). The
31
+ * queue never references a global `setTimeout`, keeping core platform-neutral.
32
+ */
33
+ export interface ToastScheduler {
34
+ /** Run `callback` after `ms`; return a handle {@link cancel} understands. */
35
+ schedule(callback: () => void, ms: number): ToastTimerHandle;
36
+ /** Cancel a pending {@link schedule}. A stale/unknown handle must be a no-op. */
37
+ cancel(handle: ToastTimerHandle): void;
38
+ }
39
+ /** Render seams driven by the queue as toasts enter/leave the single visible slot. */
40
+ export interface AdwToastQueueHandlers {
41
+ /** Mount `toast` as the visible strip (title + optional action button). */
42
+ onShow: (toast: AdwToast) => void;
43
+ /** Tear down `toast`'s strip — it auto-dismissed, was dismissed, or superseded. */
44
+ onHide: (toast: AdwToast) => void;
45
+ }
46
+ /** Construction seams for {@link AdwToastQueue}: the timing + render adapters. */
47
+ export interface AdwToastQueueOptions extends AdwToastQueueHandlers {
48
+ scheduler: ToastScheduler;
49
+ }
50
+ /**
51
+ * The headless toast queue — `Adw.ToastOverlay`'s one-at-a-time policy + ordering
52
+ * + auto-dismiss lifecycle, with zero rendering and zero global timers.
53
+ *
54
+ * {@link add} enqueues a toast; the first shows immediately (`onShow`), later ones
55
+ * wait FIFO. A shown toast with `timeout > 0` auto-dismisses through the injected
56
+ * {@link ToastScheduler}; {@link dismiss} dismisses the current toast early. Either
57
+ * way, dismissal fires `onHide` and advances to the next queued toast.
58
+ */
59
+ export declare class AdwToastQueue {
60
+ private readonly _scheduler;
61
+ private readonly _handlers;
62
+ private readonly _pending;
63
+ private _current;
64
+ private _timer;
65
+ constructor(options: AdwToastQueueOptions);
66
+ /** The toast currently on screen, or `null` when nothing is shown. */
67
+ get current(): AdwToast | null;
68
+ /** Whether a toast is currently on screen. */
69
+ get showing(): boolean;
70
+ /** Number of toasts waiting behind the current one. */
71
+ get pending(): number;
72
+ /**
73
+ * Enqueue a toast. Shows it immediately when the slot is free, otherwise
74
+ * queues it FIFO behind the toasts already waiting.
75
+ */
76
+ add(toast: AdwToast): void;
77
+ /**
78
+ * Dismiss the current toast early (fires `onHide` and advances to the next
79
+ * queued toast, if any). A no-op when nothing is shown.
80
+ */
81
+ dismiss(): void;
82
+ /**
83
+ * Drop every toast — dismiss the current one (firing `onHide`) and discard the
84
+ * pending queue WITHOUT showing them (unlike {@link dismiss}, which advances).
85
+ */
86
+ clear(): void;
87
+ private _show;
88
+ private _clearTimer;
89
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@gjsify/adwaita-core",
3
+ "version": "0.14.0",
4
+ "description": "Headless Adwaita widget behavior (breakpoint condition grammar + apply/unapply state machine, color-scheme observable) shared by the web and NativeScript Adwaita renderers — pure TS, no platform imports",
5
+ "type": "module",
6
+ "module": "lib/esm/index.js",
7
+ "types": "lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/esm/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "lib"
16
+ ],
17
+ "scripts": {
18
+ "clear": "rm -rf lib tmp dist tsconfig.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
19
+ "check": "gjsify tsc --noEmit",
20
+ "build": "gjsify run build:gjsify && gjsify run build:types",
21
+ "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
22
+ "build:types": "gjsify tsc",
23
+ "build:test": "gjsify run build:test:gjs && gjsify run build:test:node && gjsify run build:test:browser",
24
+ "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
25
+ "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
26
+ "build:test:browser": "gjsify build src/test.browser.mts --app browser --outfile dist/test.browser.mjs",
27
+ "test": "gjsify run build:gjsify && gjsify run build:test && gjsify run test:node && gjsify run test:gjs",
28
+ "test:gjs": "gjsify run test.gjs.mjs",
29
+ "test:node": "node test.node.mjs"
30
+ },
31
+ "keywords": [
32
+ "gjs",
33
+ "node",
34
+ "browser",
35
+ "nativescript",
36
+ "adwaita",
37
+ "gnome",
38
+ "design-system",
39
+ "headless"
40
+ ],
41
+ "devDependencies": {
42
+ "@gjsify/cli": "^0.14.0",
43
+ "@gjsify/unit": "^0.14.0",
44
+ "@types/node": "^25.9.2",
45
+ "typescript": "^6.0.3"
46
+ },
47
+ "gjsify": {
48
+ "runtimes": {
49
+ "gjs": "polyfill",
50
+ "node": "polyfill",
51
+ "browser": "polyfill",
52
+ "nativescript": "polyfill"
53
+ },
54
+ "tier": 2
55
+ },
56
+ "license": "MIT",
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/gjsify/gjsify.git",
60
+ "directory": "packages/web/adwaita-core"
61
+ },
62
+ "bugs": {
63
+ "url": "https://github.com/gjsify/gjsify/issues"
64
+ },
65
+ "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/web/adwaita-core#readme"
66
+ }