react-native-gtkx 0.3.0-alpha.1 → 0.4.0-alpha.3
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/README.md +35 -96
- package/dist/adw/index.d.ts +3 -2
- package/dist/adw/index.js +24 -6
- package/dist/adw/index.js.map +1 -1
- package/dist/adw/widgets.generated.d.ts +1 -1
- package/dist/adw/widgets.generated.js +2 -2
- package/dist/adw/widgets.generated.js.map +1 -1
- package/dist/animated/create-animated.d.ts +2 -0
- package/dist/animated/create-animated.js +2 -0
- package/dist/animated/create-animated.js.map +1 -1
- package/dist/animated/event.d.ts +15 -0
- package/dist/animated/event.js +80 -0
- package/dist/animated/event.js.map +1 -0
- package/dist/animated/index.d.ts +4 -0
- package/dist/animated/index.js +8 -0
- package/dist/animated/index.js.map +1 -1
- package/dist/animated/spring.d.ts +10 -0
- package/dist/animated/spring.js +20 -6
- package/dist/animated/spring.js.map +1 -1
- package/dist/animated/timing.d.ts +10 -0
- package/dist/animated/timing.js +21 -13
- package/dist/animated/timing.js.map +1 -1
- package/dist/apis/host.gtkx.js +70 -11
- package/dist/apis/host.gtkx.js.map +1 -1
- package/dist/common/navigation-stack.d.ts +6 -3
- package/dist/common/navigation-stack.js +8 -1
- package/dist/common/navigation-stack.js.map +1 -1
- package/dist/common/widget.js +2 -11
- package/dist/common/widget.js.map +1 -1
- package/dist/components/animated.d.ts +1 -0
- package/dist/components/animated.js +28 -4
- package/dist/components/animated.js.map +1 -1
- package/dist/components/app-registry.js +32 -8
- package/dist/components/app-registry.js.map +1 -1
- package/dist/components/request-animation-frame.d.ts +33 -0
- package/dist/components/request-animation-frame.js +83 -0
- package/dist/components/request-animation-frame.js.map +1 -0
- package/dist/components/scroll-view.js +60 -2
- package/dist/components/scroll-view.js.map +1 -1
- package/dist/components/virtualized-list.js +1 -4
- package/dist/components/virtualized-list.js.map +1 -1
- package/dist/dnd/autoscroll.d.ts +44 -0
- package/dist/dnd/autoscroll.js +176 -0
- package/dist/dnd/autoscroll.js.map +1 -0
- package/dist/dnd/grid-order.d.ts +45 -0
- package/dist/dnd/grid-order.js +151 -0
- package/dist/dnd/grid-order.js.map +1 -0
- package/dist/dnd/grid.d.ts +44 -0
- package/dist/dnd/grid.js +397 -0
- package/dist/dnd/grid.js.map +1 -0
- package/dist/dnd/gtk-controllers.d.ts +16 -2
- package/dist/dnd/gtk-controllers.js +24 -4
- package/dist/dnd/gtk-controllers.js.map +1 -1
- package/dist/dnd/index.d.ts +4 -2
- package/dist/dnd/index.js +9 -2
- package/dist/dnd/index.js.map +1 -1
- package/dist/dnd/order-state.d.ts +14 -0
- package/dist/dnd/order-state.js +55 -0
- package/dist/dnd/order-state.js.map +1 -0
- package/dist/dnd/order.d.ts +19 -0
- package/dist/dnd/order.js +19 -0
- package/dist/dnd/order.js.map +1 -1
- package/dist/dnd/sortable.d.ts +29 -4
- package/dist/dnd/sortable.js +308 -115
- package/dist/dnd/sortable.js.map +1 -1
- package/dist/dnd/types.d.ts +236 -14
- package/dist/dnd/types.js +30 -0
- package/dist/dnd/types.js.map +1 -1
- package/dist/gesture-handler-compat/attach-context.d.ts +29 -0
- package/dist/gesture-handler-compat/attach-context.js +90 -0
- package/dist/gesture-handler-compat/attach-context.js.map +1 -0
- package/dist/gesture-handler-compat/detector-runtime.d.ts +14 -3
- package/dist/gesture-handler-compat/detector-runtime.js +15 -5
- package/dist/gesture-handler-compat/detector-runtime.js.map +1 -1
- package/dist/gesture-handler-compat/detector.js +57 -2
- package/dist/gesture-handler-compat/detector.js.map +1 -1
- package/dist/gesture-handler-compat/gesture-state-manager.d.ts +5 -0
- package/dist/gesture-handler-compat/gesture-state-manager.js +77 -0
- package/dist/gesture-handler-compat/gesture-state-manager.js.map +1 -0
- package/dist/gesture-handler-compat/index.d.ts +2 -2
- package/dist/gesture-handler-compat/index.js +38 -33
- package/dist/gesture-handler-compat/index.js.map +1 -1
- package/dist/gesture-handler-compat/recognizer.d.ts +12 -1
- package/dist/gesture-handler-compat/recognizer.js +23 -9
- package/dist/gesture-handler-compat/recognizer.js.map +1 -1
- package/dist/gesture-handler-compat/tag-registry.d.ts +14 -0
- package/dist/gesture-handler-compat/tag-registry.js +19 -0
- package/dist/gesture-handler-compat/tag-registry.js.map +1 -0
- package/dist/globals/index.d.ts +47 -0
- package/dist/globals/index.js +181 -0
- package/dist/globals/index.js.map +1 -0
- package/dist/globals/install.d.ts +1 -0
- package/dist/globals/install.js +14 -0
- package/dist/globals/install.js.map +1 -0
- package/dist/gtk/index.js +4 -3
- package/dist/gtk/index.js.map +1 -1
- package/dist/gtkx/bridge/adw-namespace.d.ts +2 -0
- package/dist/gtkx/bridge/adw-namespace.js +26 -0
- package/dist/gtkx/bridge/adw-namespace.js.map +1 -0
- package/dist/gtkx/bridge/adw.d.ts +23 -0
- package/dist/gtkx/bridge/adw.js +93 -0
- package/dist/gtkx/bridge/adw.js.map +1 -0
- package/dist/gtkx/bridge/color-scheme-parse.d.ts +11 -0
- package/dist/gtkx/bridge/color-scheme-parse.js +42 -0
- package/dist/gtkx/bridge/color-scheme-parse.js.map +1 -0
- package/dist/gtkx/bridge/color-scheme-portal.d.ts +24 -0
- package/dist/gtkx/bridge/color-scheme-portal.js +172 -0
- package/dist/gtkx/bridge/color-scheme-portal.js.map +1 -0
- package/dist/gtkx/bridge/core.d.ts +25 -0
- package/dist/gtkx/bridge/core.js +69 -0
- package/dist/gtkx/bridge/core.js.map +1 -0
- package/dist/gtkx/bridge/drag-layer.d.ts +27 -0
- package/dist/gtkx/bridge/drag-layer.js +177 -0
- package/dist/gtkx/bridge/drag-layer.js.map +1 -0
- package/dist/gtkx/bridge/index.d.ts +1 -27
- package/dist/gtkx/bridge/index.js +12 -71
- package/dist/gtkx/bridge/index.js.map +1 -1
- package/dist/gtkx/bridge/view-box.js +1 -1
- package/dist/gtkx/bridge/view-box.js.map +1 -1
- package/dist/gtkx/bridge/widgets.generated.adw.d.ts +1 -0
- package/dist/gtkx/bridge/widgets.generated.adw.js +16 -0
- package/dist/gtkx/bridge/widgets.generated.adw.js.map +1 -0
- package/dist/gtkx/bridge/widgets.generated.d.ts +0 -1
- package/dist/gtkx/bridge/widgets.generated.js +3 -3
- package/dist/gtkx/bridge/widgets.generated.js.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/bin.js +1 -1
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/data/generated.d.ts +815 -481
- package/dist/mcp/data/generated.js +933 -513
- package/dist/mcp/data/generated.js.map +1 -1
- package/dist/mcp/resolve.d.ts +2 -2
- package/dist/mcp/resolve.js +2 -2
- package/dist/mcp/resolve.js.map +1 -1
- package/dist/mcp/server.js +2 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/metro/index.d.ts +1 -0
- package/dist/metro/index.js +12 -0
- package/dist/metro/index.js.map +1 -1
- package/dist/navigation/sidebar.js +2 -45
- package/dist/navigation/sidebar.js.map +1 -1
- package/dist/reanimated-compat/animatable-value.d.ts +158 -0
- package/dist/reanimated-compat/animatable-value.js +316 -0
- package/dist/reanimated-compat/animatable-value.js.map +1 -0
- package/dist/reanimated-compat/animation.d.ts +34 -13
- package/dist/reanimated-compat/animation.js +97 -25
- package/dist/reanimated-compat/animation.js.map +1 -1
- package/dist/reanimated-compat/mutable.js +6 -6
- package/dist/reanimated-compat/mutable.js.map +1 -1
- package/dist/reanimated-compat/updater-animations.js +32 -12
- package/dist/reanimated-compat/updater-animations.js.map +1 -1
- package/dist/runner/host-dev.js +5 -1
- package/dist/runner/host-dev.js.map +1 -1
- package/dist/runner/host.js +9 -1
- package/dist/runner/host.js.map +1 -1
- package/dist/sea/bundle.js +1 -1
- package/dist/sea/bundle.js.map +1 -1
- package/dist/sea/native-shim.js +3 -2
- package/dist/sea/native-shim.js.map +1 -1
- package/dist/vite/index.js +130 -0
- package/dist/vite/index.js.map +1 -1
- package/dist/vitest/index.d.ts +1 -1
- package/dist/vitest/index.js +1 -1
- package/dist/vitest/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/gtkx/bridge/theme.d.ts +0 -4
- package/dist/gtkx/bridge/theme.js +0 -5
- package/dist/gtkx/bridge/theme.js.map +0 -1
|
@@ -1,73 +1,14 @@
|
|
|
1
|
-
// The
|
|
2
|
-
// gtkx
|
|
1
|
+
// The bridge's default door — everything the RN core needs, zero @gtkx/gi/adw
|
|
2
|
+
// or @gtkx/jsx/adw imports (see .claude/epics/adw-optional/001.md). Kept as
|
|
3
|
+
// a thin alias of ./core rather than folding the two together so the split
|
|
4
|
+
// is visible at a glance, and every file already spelling
|
|
5
|
+
// "../gtkx/bridge/index" — the overwhelming majority of this package, i.e.
|
|
6
|
+
// everything except the handful of files that need Adw specifically — needs
|
|
7
|
+
// no change at all.
|
|
3
8
|
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
import * as Adw from "@gtkx/gi/adw";
|
|
10
|
-
import * as Gdk from "@gtkx/gi/gdk";
|
|
11
|
-
import * as Gio from "@gtkx/gi/gio";
|
|
12
|
-
import * as GLib from "@gtkx/gi/glib";
|
|
13
|
-
import * as GObject from "@gtkx/gi/gobject";
|
|
14
|
-
import * as Graphene from "@gtkx/gi/graphene";
|
|
15
|
-
import * as Gsk from "@gtkx/gi/gsk";
|
|
16
|
-
import * as Gtk from "@gtkx/gi/gtk";
|
|
17
|
-
import * as Pango from "@gtkx/gi/pango";
|
|
18
|
-
export { Adw, Gdk, Gio, GLib, GObject, Graphene, Gsk, Gtk, Pango };
|
|
19
|
-
// GtkApplication and GtkGestureClick are not Gtk.Widget subclasses (an
|
|
20
|
-
// application object and an event controller, respectively), so the widget
|
|
21
|
-
// surface generator never sees them — kept here by hand, same as before it
|
|
22
|
-
// existed.
|
|
23
|
-
export { GtkApplication, GtkGestureClick } from "@gtkx/jsx/gtk";
|
|
24
|
-
// Auxiliary gtkx JSX elements that are not Gtk.Widget/Adw.Widget subclasses
|
|
25
|
-
// either, same reason as the pair above — scripts/generate-widget-surface.ts
|
|
26
|
-
// only classifies widgets, so these fall into its "notAWidget" bucket
|
|
27
|
-
// (see scripts/widget-surface/classification.json) and are otherwise
|
|
28
|
-
// unreachable through react-native-gtkx/gtk or /adw. Every one of these is a
|
|
29
|
-
// real, necessary building block for a real app: actions and menus (Gio),
|
|
30
|
-
// a responsive breakpoint (Adw), a text buffer and an adjustment (the model
|
|
31
|
-
// objects GtkTextView/GtkSpinRow etc. bind to), keyboard shortcuts, and the
|
|
32
|
-
// two drag-and-drop controllers.
|
|
33
|
-
//
|
|
34
|
-
// Adw.Breakpoint specifically: independently verified
|
|
35
|
-
// (`Adw.Breakpoint.prototype instanceof Gtk.Widget === false`, prototype
|
|
36
|
-
// chain bottoms out at plain GObject.Object) — it draws nothing and has no
|
|
37
|
-
// size, it is a declaration (a condition plus a set of property setters)
|
|
38
|
-
// attached to a Window/ApplicationWindow/Dialog/BreakpointBin. Running it
|
|
39
|
-
// through wrapReactNative would give it a Yoga node for a widget that
|
|
40
|
-
// occupies no space: a layout bug, not a convenience. Adw.BreakpointBin (a
|
|
41
|
-
// real widget, the container that scopes breakpoints to a subtree) is
|
|
42
|
-
// wrapped normally in ./widgets.generated instead, and is what
|
|
43
|
-
// createSidebarNavigator's own collapse pairs AdwBreakpoint with (see
|
|
44
|
-
// docs/platform-layer.md, "Two ways to react to size").
|
|
45
|
-
export { GMenu, GSimpleAction } from "@gtkx/jsx/gio";
|
|
46
|
-
export { AdwBreakpoint, AdwShortcutsItem, AdwShortcutsSection, AdwToggle, } from "@gtkx/jsx/adw";
|
|
47
|
-
export { GtkAdjustment, GtkDragSource, GtkDropControllerMotion, GtkDropTarget, GtkShortcut, GtkShortcutController, GtkTextBuffer, } from "@gtkx/jsx/gtk";
|
|
48
|
-
// The full widget surface — every GTK/Adwaita class gtkx binds that derives
|
|
49
|
-
// Gtk.Widget, raw. src/gtk/widgets.generated and src/adw/widgets.generated
|
|
50
|
-
// wrap most of them with wrapReactNative; this file is where @gtkx/jsx is
|
|
51
|
-
// still allowed to be imported directly (see the eslint carve-out for
|
|
52
|
-
// src/gtkx/bridge/**), so they pull the raw widgets from here rather than
|
|
53
|
-
// from @gtkx/jsx themselves.
|
|
54
|
-
export * from "./widgets.generated";
|
|
55
|
-
export { createPortal, createRoot, quit, rootElement, useApplication, useBindSetting, useParentWindow, useProperty, useSetting, } from "@gtkx/react";
|
|
56
|
-
// useSignal comes from ./use-signal, not @gtkx/react — see the workaround note
|
|
57
|
-
// there (rc.3 delivers a stale handler).
|
|
58
|
-
export { useSignal } from "./use-signal";
|
|
59
|
-
export { css, cx, injectGlobal } from "@gtkx/css";
|
|
60
|
-
// The imperative counterpart of `css`: a private provider on one widget,
|
|
61
|
-
// for values that change per frame and must not enter the shared stylesheet.
|
|
62
|
-
export { createWidgetCss } from "./widget-css";
|
|
63
|
-
export { createTextProbe, measureWidget, toNumber } from "./measure";
|
|
64
|
-
export { computePointIn, computePointInWindow } from "./geometry";
|
|
65
|
-
// A portal into a NAMED slot of a remote object (the window's action map,
|
|
66
|
-
// its controllers) rather than into its default child slot — see the file
|
|
67
|
-
// for why gtkx's own createPortal is not enough on its own.
|
|
68
|
-
export { createSlotPortal } from "./slot-portal";
|
|
69
|
-
export { cacheChildOrder, getViewBoxComponent, invalidateZOrder, setBoxOnly, setBoxPassthrough, setHitSlop, setPaintOnlyLeaf, setPointerTarget, setZIndex, } from "./view-box";
|
|
70
|
-
export { getSvgNodeComponent, getSvgNodeDescriptor, queueSvgRedraw, resolveSvgColor, resolveSvgPaint, setSvgNodeDescriptor, } from "./svg-node";
|
|
71
|
-
export { allocateChild, attachRnLayout, detachRnLayout, queueAllocate, queueResize, } from "./layout-manager";
|
|
72
|
-
export { colorScheme, styleManager } from "./theme";
|
|
9
|
+
// Adw-specific values (Adw, AdwBreakpoint, AdwToggle, the raw Adwaita
|
|
10
|
+
// widgets, colorScheme/styleManager) live in ./adw instead, behind a probe
|
|
11
|
+
// (adwAvailable()) — its absence surfaces as the loud named throw this repo
|
|
12
|
+
// uses, not a build failure.
|
|
13
|
+
export * from "./core";
|
|
73
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4EAA4E;AAC5E,2EAA2E;AAC3E,0DAA0D;AAC1D,2EAA2E;AAC3E,4EAA4E;AAC5E,oBAAoB;AACpB,EAAE;AACF,sEAAsE;AACtE,2EAA2E;AAC3E,4EAA4E;AAC5E,6BAA6B;AAC7B,cAAc,QAAQ,CAAA","sourcesContent":["// The bridge's default door — everything the RN core needs, zero @gtkx/gi/adw\n// or @gtkx/jsx/adw imports (see .claude/epics/adw-optional/001.md). Kept as\n// a thin alias of ./core rather than folding the two together so the split\n// is visible at a glance, and every file already spelling\n// \"../gtkx/bridge/index\" — the overwhelming majority of this package, i.e.\n// everything except the handful of files that need Adw specifically — needs\n// no change at all.\n//\n// Adw-specific values (Adw, AdwBreakpoint, AdwToggle, the raw Adwaita\n// widgets, colorScheme/styleManager) live in ./adw instead, behind a probe\n// (adwAvailable()) — its absence surfaces as the loud named throw this repo\n// uses, not a build failure.\nexport * from \"./core\"\n"]}
|
|
@@ -193,7 +193,7 @@ const zOrderedParents = new WeakSet();
|
|
|
193
193
|
* answer the occlusion question. Restored the moment nothing is raised there,
|
|
194
194
|
* because it is not free of consequence: `pointerEvents: "box-none"` on a View
|
|
195
195
|
* whose only child is a `Text` would otherwise fall through to whatever is
|
|
196
|
-
* behind it. Documented in docs/
|
|
196
|
+
* behind it. Documented in docs/reference/components/index.md.
|
|
197
197
|
*/
|
|
198
198
|
const paintOnlyLeaves = new WeakSet();
|
|
199
199
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA","sourcesContent":["// RnGtkxViewBox — the GtkBox subclass every View renders — and the whole of\n// RN's pointerEvents, which is a picking question and therefore lives here.\n//\n// Two of the four modes are the box's own contains(): \"box-none\" makes it\n// invisible to GTK's pick while its children stay pickable, and hitSlop\n// grows the rect the check uses. The other two are can-target on the widget\n// (\"none\", the whole subtree) or on its children (\"box-only\").\n//\n// can-target is a single boolean per widget and TWO things want to write it\n// — the widget's own pointerEvents, and a box-only ancestor masking it — so\n// neither may write it directly. `setPointerTarget` records what the\n// widget's own prop wants and applies the combination; the mask is derived\n// from the live parent every time, so a widget that React moves elsewhere\n// cannot end up stuck untargetable. Blanket-restoring children to `true` is\n// what made nesting a pointerEvents inside a box-only view unsupported\n// before: the restore pass could not know that a child wanted to be\n// untargetable for its own reasons.\n//\n// `zIndex` is the other half of the same subject and lives here for the same\n// reason: RN's z-order is a PAINT order and a PICK order, and this widget is\n// the only thing that owns both. See the block above the zIndex section below.\n//\n// Registered lazily like RnGtkxLayout (registration needs GObject, class\n// identity must exist before the first instance).\nimport * as Graphene from \"@gtkx/gi/graphene\"\nimport * as Gtk from \"@gtkx/gi/gtk\"\nimport { createElementComponent } from \"@gtkx/react/internal\"\nimport { registerClass } from \"@gtkx/runtime\"\n\nconst passthrough = new WeakSet<object>()\n/** Widgets whose DIRECT children are masked — RN's pointerEvents=\"box-only\". */\nconst boxOnly = new WeakSet<object>()\n/** What each widget's own pointerEvents wants, before any mask. */\nconst ownTarget = new WeakMap<object, boolean>()\n\nexport type HitSlop = {\n top: number\n right: number\n bottom: number\n left: number\n}\n\nconst hitSlops = new WeakMap<object, HitSlop>()\n\n/** box-none toggle: picking consults this live, no invalidation needed. */\nexport const setBoxPassthrough = (\n widget: Gtk.Widget,\n enabled: boolean,\n): void => {\n if (enabled) {\n passthrough.add(widget)\n } else {\n passthrough.delete(widget)\n }\n}\n\n/**\n * Grows the rect this widget's contains() accepts. Only RnGtkxViewBox\n * consults it — RN's hitSlop is a picking change and nothing in JS can\n * substitute for one, because a press outside the widget is never delivered\n * to it in the first place.\n */\nexport const setHitSlop = (widget: Gtk.Widget, slop: HitSlop | null): void => {\n if (slop === null) {\n hitSlops.delete(widget)\n } else {\n hitSlops.set(widget, slop)\n }\n}\n\nconst isMasked = (widget: Gtk.Widget): boolean => {\n const parent = widget.getParent()\n return parent !== null && boxOnly.has(parent)\n}\n\nconst applyTarget = (widget: Gtk.Widget): void => {\n widget.setCanTarget(!isMasked(widget) && (ownTarget.get(widget) ?? true))\n}\n\n/**\n * What this widget's own `pointerEvents` wants its can-target to be. A\n * box-only ancestor still overrides it, and stops overriding it the moment\n * the ancestor's mode changes — without either of them having to know about\n * the other.\n */\nexport const setPointerTarget = (\n widget: Gtk.Widget,\n targetable: boolean,\n): void => {\n ownTarget.set(widget, targetable)\n applyTarget(widget)\n}\n\n/**\n * Masks or unmasks a widget's direct children — RN's\n * pointerEvents=\"box-only\". Re-applied every commit rather than only on\n * change, because the child set moves with the renders.\n */\nexport const setBoxOnly = (widget: Gtk.Widget, enabled: boolean): void => {\n if (enabled) {\n boxOnly.add(widget)\n } else {\n boxOnly.delete(widget)\n }\n for (\n let child = widget.getFirstChild();\n child !== null;\n child = child.getNextSibling()\n ) {\n applyTarget(child)\n }\n}\n\n// --- zIndex ---------------------------------------------------------------\n//\n// RN's `zIndex` reorders PAINT among siblings. GTK4 paints a container's\n// children in child order and has no z-order property, so the obvious fix —\n// reorder the widgets — is the wrong one: widget order is the order this\n// platform keeps its shadow tree in sync with (`syncChildOrder` in\n// components/use-layout-child.ts), so restacking for paint would silently\n// restack the LAYOUT.\n//\n// Paint order and layout order do not have to be the same, though, and we own\n// the widget: `allocate` stays in Yoga's order and `snapshot` walks the\n// children in zIndex order instead. That is what Android does too\n// (`ViewGroup.getChildDrawingOrder`) and for the same reason.\n//\n// The half that is easy to miss is that `gtk_widget_pick()` descends in\n// REVERSE child order, so sorting the paint alone leaves a raised view drawn\n// on top and still unclickable. GTK4 has no `pick` vfunc (GtkWidgetClass's\n// public vtable ends at `contains`, verified against gtk 4.22's header and\n// gtkx's generated registry), and the only per-point hook it offers is\n// `contains()` — which is exactly the vfunc this file already overrides. So\n// picking is made to agree by having a covered widget answer \"not me\" where a\n// higher-painting sibling of one of its ancestors would answer instead.\n//\n// Everything below is behind `raisedCount`, which is 0 in every app that never\n// writes the style: one integer comparison, and both vfuncs take the path they\n// took before any of this existed.\n\n/** Non-zero zIndex per widget. Absent means 0, which is RN's default. */\nconst zIndexes = new WeakMap<Gtk.Widget, number>()\n\n/**\n * How many widgets in the process currently carry a non-zero `zIndex`.\n *\n * The fast path's whole guard. `snapshot()` and `contains()` read this first,\n * so a tree that never raises anything pays one integer comparison per call\n * and no allocation, no sort, and no per-child work beyond what GTK's own\n * snapshot does.\n */\nlet raisedCount = 0\n\n/**\n * Cached paint order per container: an array in paint order, or `null` for\n * \"plain child order, nothing to do\". Recomputed on change (a zIndex write, a\n * commit that touched the container's children) rather than per snapshot —\n * `useSortable` puts `zIndex` in its style object every frame but changes its\n * VALUE about twice per drag.\n */\nconst paintOrders = new WeakMap<Gtk.Widget, Gtk.Widget[] | null>()\n\n/**\n * The container's live children, in child order, as the LAST ALLOCATE PASS\n * walked them.\n *\n * The snapshot vfunc has to visit every child either way, and walking the\n * sibling chain from JS is what costs: each `getNextSibling()` mints a fresh\n * native wrapper, measured at 1.9 µs per child against 1.0 µs for the\n * `snapshotChild()` that follows it (docs/research/z-index.md). The container's\n * `allocate()` hook already walks exactly this chain, so it hands the array\n * over instead and the paint pass reuses it.\n *\n * Safe because a child cannot appear, disappear or move without queueing a\n * resize on this container, and GTK runs the layout phase before the paint\n * phase — so an allocate always lands between a change and the snapshot that\n * would see it. A container whose allocate never ran (no RnGtkxLayout, e.g. a\n * bare slot host) simply has no entry, and the vfunc walks live.\n */\nconst childOrders = new WeakMap<Gtk.Widget, Gtk.Widget[]>()\n\nconst sameChildren = (a: Gtk.Widget[], b: Gtk.Widget[]): boolean => {\n if (a.length !== b.length) {\n return false\n }\n for (let index = 0; index < a.length; index += 1) {\n if (a[index] !== b[index]) {\n return false\n }\n }\n return true\n}\n\n/**\n * Publishes the child list the container's allocate pass just walked.\n *\n * Cheap on the hot path by construction: the array is one the caller built\n * anyway, and the paint order is only invalidated when the children actually\n * differ — an allocate for a pure move (which is most of them, one per\n * animated frame) leaves the cached sort alone.\n */\nexport const cacheChildOrder = (\n container: Gtk.Widget,\n children: Gtk.Widget[],\n): void => {\n const previous = childOrders.get(container)\n childOrders.set(container, children)\n if (previous === undefined || !sameChildren(previous, children)) {\n paintOrders.delete(container)\n }\n}\n\n/** Containers known to hold at least one raised child, for the picking walk. */\nconst zOrderedParents = new WeakSet<Gtk.Widget>()\n\n/**\n * Widgets that paint but are not touch targets of their own: the GtkLabel a\n * `Text` renders and the GtkPicture an `Image` renders. Neither component has\n * a press prop, so nothing is ever attached to them — but GTK targets them by\n * default, and `gtk_widget_pick()` reaches a child BEFORE it asks the parent's\n * `contains()`. That is the one hole in the occlusion check below: a covered\n * `View` can answer \"not me\", a bare GtkLabel inside it cannot.\n *\n * So while a container has a raised child, the paint-only leaves under it are\n * made untargetable and the pick lands on their nearest `View` instead — which\n * is the same widget the press would have propagated to anyway, and which does\n * answer the occlusion question. Restored the moment nothing is raised there,\n * because it is not free of consequence: `pointerEvents: \"box-none\"` on a View\n * whose only child is a `Text` would otherwise fall through to whatever is\n * behind it. Documented in docs/api.md.\n */\nconst paintOnlyLeaves = new WeakSet<Gtk.Widget>()\n\n/**\n * Marks a widget as painting-only for picking purposes — see above. Called\n * once per widget by the components that own one (`Text`, `Image`).\n */\nexport const setPaintOnlyLeaf = (widget: Gtk.Widget): void => {\n paintOnlyLeaves.add(widget)\n}\n\nconst applyLeafTargeting = (container: Gtk.Widget, suppress: boolean): void => {\n for (\n let child = container.getFirstChild();\n child !== null;\n child = child.getNextSibling()\n ) {\n if (paintOnlyLeaves.has(child)) {\n setPointerTarget(child, !suppress)\n }\n // A nested container that is STILL raised keeps its own suppression: an\n // outer container coming back down must not restore leaves an inner one\n // is relying on.\n if (suppress || !zOrderedParents.has(child)) {\n applyLeafTargeting(child, suppress)\n }\n }\n}\n\n/**\n * Drops a container's cached paint order and asks for a redraw.\n *\n * Called from the zIndex writer and from the container's per-commit effect\n * (components/use-layout-child.ts), which is what covers a child mounting,\n * unmounting or being MOVED by React — the three ways the order can change\n * without any zIndex being written.\n */\nexport const invalidateZOrder = (container: Gtk.Widget): void => {\n // The child list too: a commit is the one thing that can change it, and the\n // allocate the commit queues puts a fresh one back before the next paint.\n childOrders.delete(container)\n if (!paintOrders.delete(container)) {\n return\n }\n container.queueDraw()\n if (zOrderedParents.has(container)) {\n // Recomputed now rather than at the next snapshot, for the same reason\n // setZIndex does it: a container that just lost its last raised child\n // (the commit that unmounted it) would otherwise never be asked again —\n // the fast path stops calling paintOrderFor once nothing is raised — and\n // would keep its paint-only leaves untargetable forever.\n paintOrderFor(container)\n }\n}\n\n/**\n * RN's `zIndex` for one child. `0` (the default, and `undefined`) clears it.\n *\n * RN applies `zIndex` unconditionally — unlike CSS, which ignores `z-index`\n * on a `position: static` box. Nothing here looks at `position` either.\n */\nexport const setZIndex = (widget: Gtk.Widget, value: number): void => {\n const previous = zIndexes.get(widget) ?? 0\n if (previous === value) {\n return\n }\n if (value === 0) {\n zIndexes.delete(widget)\n raisedCount -= 1\n } else {\n zIndexes.set(widget, value)\n if (previous === 0) {\n raisedCount += 1\n }\n }\n const parent = widget.getParent()\n if (parent === null) {\n return\n }\n paintOrders.delete(parent)\n // Unconditional, unlike invalidateZOrder's: the container may never have\n // had a cache to drop and its paint still just changed.\n parent.queueDraw()\n if (value === 0) {\n // Recomputed eagerly on the way DOWN, never lazily: once nothing is\n // raised the fast path stops calling paintOrderFor at all, so a container\n // that lost its last raised child would never get the chance to undo what\n // being raised did to it (paint order, leaf targeting).\n paintOrderFor(parent)\n }\n}\n\n/** The container's children, from the allocate pass if it has run. */\nconst childrenOf = (container: Gtk.Widget): Gtk.Widget[] => {\n const cached = childOrders.get(container)\n if (cached !== undefined) {\n return cached\n }\n const children: Gtk.Widget[] = []\n for (\n let child = container.getFirstChild();\n child !== null;\n child = child.getNextSibling()\n ) {\n children.push(child)\n }\n return children\n}\n\nconst paintOrderFor = (container: Gtk.Widget): Gtk.Widget[] | null => {\n if (paintOrders.has(container)) {\n return paintOrders.get(container) ?? null\n }\n const children = childrenOf(container)\n let raised = false\n for (const child of children) {\n if (zIndexes.has(child)) {\n raised = true\n break\n }\n }\n let order: Gtk.Widget[] | null = null\n if (raised) {\n zOrderedParents.add(container)\n // Once per recompute, not per frame, and only for a container that\n // actually has something raised: the walk is what catches a `Text` that\n // mounted into an already-raised container since the last one.\n applyLeafTargeting(container, true)\n // Stable by construction. RN keeps document order among equal zIndexes,\n // and an unstable sort would let equal siblings swap between frames —\n // flicker that is miserable to attribute. `Array.prototype.sort` has been\n // required to be stable since ES2019; the index tiebreak makes that\n // independent of the engine rather than assumed of it.\n order = children\n .map((widget, index) => ({\n widget,\n index,\n z: zIndexes.get(widget) ?? 0,\n }))\n .sort((a, b) => a.z - b.z || a.index - b.index)\n .map((entry) => entry.widget)\n } else if (zOrderedParents.delete(container)) {\n applyLeafTargeting(container, false)\n }\n paintOrders.set(container, order)\n return order\n}\n\n/**\n * Whether a higher-painting sibling of this widget — or of any of its\n * ancestors — would take the pick at this point.\n *\n * `pick()` on the sibling rather than a bounds test, because \"would GTK have\n * answered inside that subtree\" IS the question, and it comes with the rest of\n * RN's rules for free: a raised view with `pointerEvents: \"none\"` is not\n * targetable, so it does not occlude either.\n *\n * The recursion terminates because it only ever asks about siblings STRICTLY\n * higher in the same container's paint order.\n */\nconst isOccluded = (widget: Gtk.Widget, x: number, y: number): boolean => {\n let child = widget\n let parent = child.getParent()\n while (parent !== null) {\n if (zOrderedParents.has(parent)) {\n const order = paintOrderFor(parent)\n if (order !== null) {\n const index = order.indexOf(child)\n for (let above = index + 1; above < order.length; above += 1) {\n const sibling = order[above]!\n const [ok, point] = widget.computePoint(\n sibling,\n new Graphene.Point({ x, y }),\n )\n if (\n ok &&\n sibling.pick(point.x, point.y, Gtk.PickFlags.DEFAULT) !== null\n ) {\n return true\n }\n }\n }\n }\n child = parent\n parent = child.getParent()\n }\n return false\n}\n\ntype ViewBoxComponent = ReturnType<typeof createElementComponent>\n\nlet component: ViewBoxComponent | null = null\n\nexport const getViewBoxComponent = (): ViewBoxComponent => {\n if (component) {\n return component\n }\n\n class RnGtkxViewBox extends Gtk.Box {\n override contains(x: number, y: number): boolean {\n if (passthrough.has(this)) {\n return false\n }\n // GTK translates the point into this widget's coordinates before\n // asking, and does not pre-check the bounds, so a negative x or a y\n // past the height is a legitimate question — which is what lets\n // hitSlop answer yes to it.\n const slop = hitSlops.get(this)\n const inside =\n slop === undefined\n ? // The default widget behavior: inside the widget's own bounds.\n x >= 0 && y >= 0 && x < this.getWidth() && y < this.getHeight()\n : x >= -slop.left &&\n y >= -slop.top &&\n x < this.getWidth() + slop.right &&\n y < this.getHeight() + slop.bottom\n if (!inside || raisedCount === 0) {\n return inside\n }\n // Something in this process is raised: this widget only answers where\n // nothing painted above it would have.\n return !isOccluded(this, x, y)\n }\n\n // GTK's own container snapshot is `gtk_widget_real_snapshot`, which walks\n // first-to-last calling gtk_widget_snapshot_child — the loop below with\n // nothing in front of it. There is no way to chain up to it from here\n // (gtkx installs the vfunc but exposes no parent-class call, and\n // gtk_widget_snapshot() is not public C API either), so the fast path\n // reproduces it rather than delegating to it.\n //\n // No `override`: `snapshot` is a real vfunc in gtkx's codegen but is\n // missing from the shipped gtk.d.ts (same as in svg-node.ts).\n snapshot(snapshot: Gtk.Snapshot): void {\n if (raisedCount !== 0) {\n const order = paintOrderFor(this)\n if (order !== null) {\n for (const child of order) {\n this.snapshotChild(child, snapshot)\n }\n return\n }\n }\n for (const child of childrenOf(this)) {\n this.snapshotChild(child, snapshot)\n }\n }\n }\n // Explicit typeName: bundlers minify class names.\n registerClass(RnGtkxViewBox, { typeName: \"RnGtkxViewBox\" })\n component = createElementComponent(\"RnGtkxViewBox\")\n return component\n}\n"]}
|
|
1
|
+
{"version":3,"file":"view-box.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/view-box.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,4EAA4E;AAC5E,EAAE;AACF,0EAA0E;AAC1E,wEAAwE;AACxE,4EAA4E;AAC5E,+DAA+D;AAC/D,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,qEAAqE;AACrE,2EAA2E;AAC3E,0EAA0E;AAC1E,4EAA4E;AAC5E,uEAAuE;AACvE,oEAAoE;AACpE,oCAAoC;AACpC,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,EAAE;AACF,yEAAyE;AACzE,kDAAkD;AAClD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE7C,MAAM,WAAW,GAAG,IAAI,OAAO,EAAU,CAAA;AACzC,gFAAgF;AAChF,MAAM,OAAO,GAAG,IAAI,OAAO,EAAU,CAAA;AACrC,mEAAmE;AACnE,MAAM,SAAS,GAAG,IAAI,OAAO,EAAmB,CAAA;AAShD,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAmB,CAAA;AAE/C,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,MAAkB,EAClB,OAAgB,EACV,EAAE;IACR,IAAI,OAAO,EAAE,CAAC;QACZ,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACzB,CAAC;SAAM,CAAC;QACN,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC5B,CAAC;AACH,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,C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E,CAAC,CAAA;IAC3D,SAAS,GAAG,sBAAsB,CAAC,eAAe,CAAC,CAAA;IACnD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA","sourcesContent":["// RnGtkxViewBox — the GtkBox subclass every View renders — and the whole of\n// RN's pointerEvents, which is a picking question and therefore lives here.\n//\n// Two of the four modes are the box's own contains(): \"box-none\" makes it\n// invisible to GTK's pick while its children stay pickable, and hitSlop\n// grows the rect the check uses. The other two are can-target on the widget\n// (\"none\", the whole subtree) or on its children (\"box-only\").\n//\n// can-target is a single boolean per widget and TWO things want to write it\n// — the widget's own pointerEvents, and a box-only ancestor masking it — so\n// neither may write it directly. `setPointerTarget` records what the\n// widget's own prop wants and applies the combination; the mask is derived\n// from the live parent every time, so a widget that React moves elsewhere\n// cannot end up stuck untargetable. Blanket-restoring children to `true` is\n// what made nesting a pointerEvents inside a box-only view unsupported\n// before: the restore pass could not know that a child wanted to be\n// untargetable for its own reasons.\n//\n// `zIndex` is the other half of the same subject and lives here for the same\n// reason: RN's z-order is a PAINT order and a PICK order, and this widget is\n// the only thing that owns both. See the block above the zIndex section below.\n//\n// Registered lazily like RnGtkxLayout (registration needs GObject, class\n// identity must exist before the first instance).\nimport * as Graphene from \"@gtkx/gi/graphene\"\nimport * as Gtk from \"@gtkx/gi/gtk\"\nimport { createElementComponent } from \"@gtkx/react/internal\"\nimport { registerClass } from \"@gtkx/runtime\"\n\nconst passthrough = new WeakSet<object>()\n/** Widgets whose DIRECT children are masked — RN's pointerEvents=\"box-only\". */\nconst boxOnly = new WeakSet<object>()\n/** What each widget's own pointerEvents wants, before any mask. */\nconst ownTarget = new WeakMap<object, boolean>()\n\nexport type HitSlop = {\n top: number\n right: number\n bottom: number\n left: number\n}\n\nconst hitSlops = new WeakMap<object, HitSlop>()\n\n/** box-none toggle: picking consults this live, no invalidation needed. */\nexport const setBoxPassthrough = (\n widget: Gtk.Widget,\n enabled: boolean,\n): void => {\n if (enabled) {\n passthrough.add(widget)\n } else {\n passthrough.delete(widget)\n }\n}\n\n/**\n * Grows the rect this widget's contains() accepts. Only RnGtkxViewBox\n * consults it — RN's hitSlop is a picking change and nothing in JS can\n * substitute for one, because a press outside the widget is never delivered\n * to it in the first place.\n */\nexport const setHitSlop = (widget: Gtk.Widget, slop: HitSlop | null): void => {\n if (slop === null) {\n hitSlops.delete(widget)\n } else {\n hitSlops.set(widget, slop)\n }\n}\n\nconst isMasked = (widget: Gtk.Widget): boolean => {\n const parent = widget.getParent()\n return parent !== null && boxOnly.has(parent)\n}\n\nconst applyTarget = (widget: Gtk.Widget): void => {\n widget.setCanTarget(!isMasked(widget) && (ownTarget.get(widget) ?? true))\n}\n\n/**\n * What this widget's own `pointerEvents` wants its can-target to be. A\n * box-only ancestor still overrides it, and stops overriding it the moment\n * the ancestor's mode changes — without either of them having to know about\n * the other.\n */\nexport const setPointerTarget = (\n widget: Gtk.Widget,\n targetable: boolean,\n): void => {\n ownTarget.set(widget, targetable)\n applyTarget(widget)\n}\n\n/**\n * Masks or unmasks a widget's direct children — RN's\n * pointerEvents=\"box-only\". Re-applied every commit rather than only on\n * change, because the child set moves with the renders.\n */\nexport const setBoxOnly = (widget: Gtk.Widget, enabled: boolean): void => {\n if (enabled) {\n boxOnly.add(widget)\n } else {\n boxOnly.delete(widget)\n }\n for (\n let child = widget.getFirstChild();\n child !== null;\n child = child.getNextSibling()\n ) {\n applyTarget(child)\n }\n}\n\n// --- zIndex ---------------------------------------------------------------\n//\n// RN's `zIndex` reorders PAINT among siblings. GTK4 paints a container's\n// children in child order and has no z-order property, so the obvious fix —\n// reorder the widgets — is the wrong one: widget order is the order this\n// platform keeps its shadow tree in sync with (`syncChildOrder` in\n// components/use-layout-child.ts), so restacking for paint would silently\n// restack the LAYOUT.\n//\n// Paint order and layout order do not have to be the same, though, and we own\n// the widget: `allocate` stays in Yoga's order and `snapshot` walks the\n// children in zIndex order instead. That is what Android does too\n// (`ViewGroup.getChildDrawingOrder`) and for the same reason.\n//\n// The half that is easy to miss is that `gtk_widget_pick()` descends in\n// REVERSE child order, so sorting the paint alone leaves a raised view drawn\n// on top and still unclickable. GTK4 has no `pick` vfunc (GtkWidgetClass's\n// public vtable ends at `contains`, verified against gtk 4.22's header and\n// gtkx's generated registry), and the only per-point hook it offers is\n// `contains()` — which is exactly the vfunc this file already overrides. So\n// picking is made to agree by having a covered widget answer \"not me\" where a\n// higher-painting sibling of one of its ancestors would answer instead.\n//\n// Everything below is behind `raisedCount`, which is 0 in every app that never\n// writes the style: one integer comparison, and both vfuncs take the path they\n// took before any of this existed.\n\n/** Non-zero zIndex per widget. Absent means 0, which is RN's default. */\nconst zIndexes = new WeakMap<Gtk.Widget, number>()\n\n/**\n * How many widgets in the process currently carry a non-zero `zIndex`.\n *\n * The fast path's whole guard. `snapshot()` and `contains()` read this first,\n * so a tree that never raises anything pays one integer comparison per call\n * and no allocation, no sort, and no per-child work beyond what GTK's own\n * snapshot does.\n */\nlet raisedCount = 0\n\n/**\n * Cached paint order per container: an array in paint order, or `null` for\n * \"plain child order, nothing to do\". Recomputed on change (a zIndex write, a\n * commit that touched the container's children) rather than per snapshot —\n * `useSortable` puts `zIndex` in its style object every frame but changes its\n * VALUE about twice per drag.\n */\nconst paintOrders = new WeakMap<Gtk.Widget, Gtk.Widget[] | null>()\n\n/**\n * The container's live children, in child order, as the LAST ALLOCATE PASS\n * walked them.\n *\n * The snapshot vfunc has to visit every child either way, and walking the\n * sibling chain from JS is what costs: each `getNextSibling()` mints a fresh\n * native wrapper, measured at 1.9 µs per child against 1.0 µs for the\n * `snapshotChild()` that follows it (docs/research/z-index.md). The container's\n * `allocate()` hook already walks exactly this chain, so it hands the array\n * over instead and the paint pass reuses it.\n *\n * Safe because a child cannot appear, disappear or move without queueing a\n * resize on this container, and GTK runs the layout phase before the paint\n * phase — so an allocate always lands between a change and the snapshot that\n * would see it. A container whose allocate never ran (no RnGtkxLayout, e.g. a\n * bare slot host) simply has no entry, and the vfunc walks live.\n */\nconst childOrders = new WeakMap<Gtk.Widget, Gtk.Widget[]>()\n\nconst sameChildren = (a: Gtk.Widget[], b: Gtk.Widget[]): boolean => {\n if (a.length !== b.length) {\n return false\n }\n for (let index = 0; index < a.length; index += 1) {\n if (a[index] !== b[index]) {\n return false\n }\n }\n return true\n}\n\n/**\n * Publishes the child list the container's allocate pass just walked.\n *\n * Cheap on the hot path by construction: the array is one the caller built\n * anyway, and the paint order is only invalidated when the children actually\n * differ — an allocate for a pure move (which is most of them, one per\n * animated frame) leaves the cached sort alone.\n */\nexport const cacheChildOrder = (\n container: Gtk.Widget,\n children: Gtk.Widget[],\n): void => {\n const previous = childOrders.get(container)\n childOrders.set(container, children)\n if (previous === undefined || !sameChildren(previous, children)) {\n paintOrders.delete(container)\n }\n}\n\n/** Containers known to hold at least one raised child, for the picking walk. */\nconst zOrderedParents = new WeakSet<Gtk.Widget>()\n\n/**\n * Widgets that paint but are not touch targets of their own: the GtkLabel a\n * `Text` renders and the GtkPicture an `Image` renders. Neither component has\n * a press prop, so nothing is ever attached to them — but GTK targets them by\n * default, and `gtk_widget_pick()` reaches a child BEFORE it asks the parent's\n * `contains()`. That is the one hole in the occlusion check below: a covered\n * `View` can answer \"not me\", a bare GtkLabel inside it cannot.\n *\n * So while a container has a raised child, the paint-only leaves under it are\n * made untargetable and the pick lands on their nearest `View` instead — which\n * is the same widget the press would have propagated to anyway, and which does\n * answer the occlusion question. Restored the moment nothing is raised there,\n * because it is not free of consequence: `pointerEvents: \"box-none\"` on a View\n * whose only child is a `Text` would otherwise fall through to whatever is\n * behind it. Documented in docs/reference/components/index.md.\n */\nconst paintOnlyLeaves = new WeakSet<Gtk.Widget>()\n\n/**\n * Marks a widget as painting-only for picking purposes — see above. Called\n * once per widget by the components that own one (`Text`, `Image`).\n */\nexport const setPaintOnlyLeaf = (widget: Gtk.Widget): void => {\n paintOnlyLeaves.add(widget)\n}\n\nconst applyLeafTargeting = (container: Gtk.Widget, suppress: boolean): void => {\n for (\n let child = container.getFirstChild();\n child !== null;\n child = child.getNextSibling()\n ) {\n if (paintOnlyLeaves.has(child)) {\n setPointerTarget(child, !suppress)\n }\n // A nested container that is STILL raised keeps its own suppression: an\n // outer container coming back down must not restore leaves an inner one\n // is relying on.\n if (suppress || !zOrderedParents.has(child)) {\n applyLeafTargeting(child, suppress)\n }\n }\n}\n\n/**\n * Drops a container's cached paint order and asks for a redraw.\n *\n * Called from the zIndex writer and from the container's per-commit effect\n * (components/use-layout-child.ts), which is what covers a child mounting,\n * unmounting or being MOVED by React — the three ways the order can change\n * without any zIndex being written.\n */\nexport const invalidateZOrder = (container: Gtk.Widget): void => {\n // The child list too: a commit is the one thing that can change it, and the\n // allocate the commit queues puts a fresh one back before the next paint.\n childOrders.delete(container)\n if (!paintOrders.delete(container)) {\n return\n }\n container.queueDraw()\n if (zOrderedParents.has(container)) {\n // Recomputed now rather than at the next snapshot, for the same reason\n // setZIndex does it: a container that just lost its last raised child\n // (the commit that unmounted it) would otherwise never be asked again —\n // the fast path stops calling paintOrderFor once nothing is raised — and\n // would keep its paint-only leaves untargetable forever.\n paintOrderFor(container)\n }\n}\n\n/**\n * RN's `zIndex` for one child. `0` (the default, and `undefined`) clears it.\n *\n * RN applies `zIndex` unconditionally — unlike CSS, which ignores `z-index`\n * on a `position: static` box. Nothing here looks at `position` either.\n */\nexport const setZIndex = (widget: Gtk.Widget, value: number): void => {\n const previous = zIndexes.get(widget) ?? 0\n if (previous === value) {\n return\n }\n if (value === 0) {\n zIndexes.delete(widget)\n raisedCount -= 1\n } else {\n zIndexes.set(widget, value)\n if (previous === 0) {\n raisedCount += 1\n }\n }\n const parent = widget.getParent()\n if (parent === null) {\n return\n }\n paintOrders.delete(parent)\n // Unconditional, unlike invalidateZOrder's: the container may never have\n // had a cache to drop and its paint still just changed.\n parent.queueDraw()\n if (value === 0) {\n // Recomputed eagerly on the way DOWN, never lazily: once nothing is\n // raised the fast path stops calling paintOrderFor at all, so a container\n // that lost its last raised child would never get the chance to undo what\n // being raised did to it (paint order, leaf targeting).\n paintOrderFor(parent)\n }\n}\n\n/** The container's children, from the allocate pass if it has run. */\nconst childrenOf = (container: Gtk.Widget): Gtk.Widget[] => {\n const cached = childOrders.get(container)\n if (cached !== undefined) {\n return cached\n }\n const children: Gtk.Widget[] = []\n for (\n let child = container.getFirstChild();\n child !== null;\n child = child.getNextSibling()\n ) {\n children.push(child)\n }\n return children\n}\n\nconst paintOrderFor = (container: Gtk.Widget): Gtk.Widget[] | null => {\n if (paintOrders.has(container)) {\n return paintOrders.get(container) ?? null\n }\n const children = childrenOf(container)\n let raised = false\n for (const child of children) {\n if (zIndexes.has(child)) {\n raised = true\n break\n }\n }\n let order: Gtk.Widget[] | null = null\n if (raised) {\n zOrderedParents.add(container)\n // Once per recompute, not per frame, and only for a container that\n // actually has something raised: the walk is what catches a `Text` that\n // mounted into an already-raised container since the last one.\n applyLeafTargeting(container, true)\n // Stable by construction. RN keeps document order among equal zIndexes,\n // and an unstable sort would let equal siblings swap between frames —\n // flicker that is miserable to attribute. `Array.prototype.sort` has been\n // required to be stable since ES2019; the index tiebreak makes that\n // independent of the engine rather than assumed of it.\n order = children\n .map((widget, index) => ({\n widget,\n index,\n z: zIndexes.get(widget) ?? 0,\n }))\n .sort((a, b) => a.z - b.z || a.index - b.index)\n .map((entry) => entry.widget)\n } else if (zOrderedParents.delete(container)) {\n applyLeafTargeting(container, false)\n }\n paintOrders.set(container, order)\n return order\n}\n\n/**\n * Whether a higher-painting sibling of this widget — or of any of its\n * ancestors — would take the pick at this point.\n *\n * `pick()` on the sibling rather than a bounds test, because \"would GTK have\n * answered inside that subtree\" IS the question, and it comes with the rest of\n * RN's rules for free: a raised view with `pointerEvents: \"none\"` is not\n * targetable, so it does not occlude either.\n *\n * The recursion terminates because it only ever asks about siblings STRICTLY\n * higher in the same container's paint order.\n */\nconst isOccluded = (widget: Gtk.Widget, x: number, y: number): boolean => {\n let child = widget\n let parent = child.getParent()\n while (parent !== null) {\n if (zOrderedParents.has(parent)) {\n const order = paintOrderFor(parent)\n if (order !== null) {\n const index = order.indexOf(child)\n for (let above = index + 1; above < order.length; above += 1) {\n const sibling = order[above]!\n const [ok, point] = widget.computePoint(\n sibling,\n new Graphene.Point({ x, y }),\n )\n if (\n ok &&\n sibling.pick(point.x, point.y, Gtk.PickFlags.DEFAULT) !== null\n ) {\n return true\n }\n }\n }\n }\n child = parent\n parent = child.getParent()\n }\n return false\n}\n\ntype ViewBoxComponent = ReturnType<typeof createElementComponent>\n\nlet component: ViewBoxComponent | null = null\n\nexport const getViewBoxComponent = (): ViewBoxComponent => {\n if (component) {\n return component\n }\n\n class RnGtkxViewBox extends Gtk.Box {\n override contains(x: number, y: number): boolean {\n if (passthrough.has(this)) {\n return false\n }\n // GTK translates the point into this widget's coordinates before\n // asking, and does not pre-check the bounds, so a negative x or a y\n // past the height is a legitimate question — which is what lets\n // hitSlop answer yes to it.\n const slop = hitSlops.get(this)\n const inside =\n slop === undefined\n ? // The default widget behavior: inside the widget's own bounds.\n x >= 0 && y >= 0 && x < this.getWidth() && y < this.getHeight()\n : x >= -slop.left &&\n y >= -slop.top &&\n x < this.getWidth() + slop.right &&\n y < this.getHeight() + slop.bottom\n if (!inside || raisedCount === 0) {\n return inside\n }\n // Something in this process is raised: this widget only answers where\n // nothing painted above it would have.\n return !isOccluded(this, x, y)\n }\n\n // GTK's own container snapshot is `gtk_widget_real_snapshot`, which walks\n // first-to-last calling gtk_widget_snapshot_child — the loop below with\n // nothing in front of it. There is no way to chain up to it from here\n // (gtkx installs the vfunc but exposes no parent-class call, and\n // gtk_widget_snapshot() is not public C API either), so the fast path\n // reproduces it rather than delegating to it.\n //\n // No `override`: `snapshot` is a real vfunc in gtkx's codegen but is\n // missing from the shipped gtk.d.ts (same as in svg-node.ts).\n snapshot(snapshot: Gtk.Snapshot): void {\n if (raisedCount !== 0) {\n const order = paintOrderFor(this)\n if (order !== null) {\n for (const child of order) {\n this.snapshotChild(child, snapshot)\n }\n return\n }\n }\n for (const child of childrenOf(this)) {\n this.snapshotChild(child, snapshot)\n }\n }\n }\n // Explicit typeName: bundlers minify class names.\n registerClass(RnGtkxViewBox, { typeName: \"RnGtkxViewBox\" })\n component = createElementComponent(\"RnGtkxViewBox\")\n return component\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdwAboutDialog, AdwAboutWindow, AdwActionRow, AdwAlertDialog, AdwApplicationWindow, AdwAvatar, AdwBanner, AdwBin, AdwBottomSheet, AdwBreakpointBin, AdwButtonContent, AdwButtonRow, AdwCarousel, AdwCarouselIndicatorDots, AdwCarouselIndicatorLines, AdwClamp, AdwClampScrollable, AdwComboRow, AdwDialog, AdwEntryRow, AdwExpanderRow, AdwFlap, AdwHeaderBar, AdwInlineViewSwitcher, AdwLayoutSlot, AdwLeaflet, AdwMessageDialog, AdwMultiLayoutView, AdwNavigationPage, AdwNavigationSplitView, AdwNavigationView, AdwOverlaySplitView, AdwPasswordEntryRow, AdwPreferencesDialog, AdwPreferencesGroup, AdwPreferencesPage, AdwPreferencesRow, AdwPreferencesWindow, AdwShortcutLabel, AdwShortcutsDialog, AdwSidebar, AdwSpinRow, AdwSpinner, AdwSplitButton, AdwSqueezer, AdwStatusPage, AdwSwitchRow, AdwTabBar, AdwTabButton, AdwTabOverview, AdwTabView, AdwToastOverlay, AdwToggleGroup, AdwToolbarView, AdwViewStack, AdwViewSwitcher, AdwViewSwitcherBar, AdwViewSwitcherSidebar, AdwViewSwitcherTitle, AdwWindow, AdwWindowTitle, AdwWrapBox, } from "@gtkx/jsx/adw";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit by hand.
|
|
2
|
+
// Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM
|
|
3
|
+
// after `npm run codegen` picks up a gtkx update; see
|
|
4
|
+
// scripts/widget-surface/classification.json for the full classification
|
|
5
|
+
// and .claude/epics/widget-surface/ for the rules behind it.
|
|
6
|
+
//
|
|
7
|
+
// Every Adwaita widget the classifier resolved to a Gtk.Widget subclass,
|
|
8
|
+
// re-exported RAW. Imported ONLY by src/adw/widgets.generated.ts — that
|
|
9
|
+
// subpath already requires Adw-1 unconditionally, so a static import here
|
|
10
|
+
// is fine; gtkx/bridge/adw.ts (the seam app-registry.tsx/host.gtkx.ts use)
|
|
11
|
+
// reaches @gtkx/jsx/adw through require() instead, never through this file,
|
|
12
|
+
// so it stays reachable even when Adw was never generated. See
|
|
13
|
+
// .claude/epics/adw-optional/001.md and docs/gtkx-rc4-notes.md for why
|
|
14
|
+
// @gtkx/jsx/adw cannot live in widgets.generated.ts alongside the GTK half.
|
|
15
|
+
export { AdwAboutDialog, AdwAboutWindow, AdwActionRow, AdwAlertDialog, AdwApplicationWindow, AdwAvatar, AdwBanner, AdwBin, AdwBottomSheet, AdwBreakpointBin, AdwButtonContent, AdwButtonRow, AdwCarousel, AdwCarouselIndicatorDots, AdwCarouselIndicatorLines, AdwClamp, AdwClampScrollable, AdwComboRow, AdwDialog, AdwEntryRow, AdwExpanderRow, AdwFlap, AdwHeaderBar, AdwInlineViewSwitcher, AdwLayoutSlot, AdwLeaflet, AdwMessageDialog, AdwMultiLayoutView, AdwNavigationPage, AdwNavigationSplitView, AdwNavigationView, AdwOverlaySplitView, AdwPasswordEntryRow, AdwPreferencesDialog, AdwPreferencesGroup, AdwPreferencesPage, AdwPreferencesRow, AdwPreferencesWindow, AdwShortcutLabel, AdwShortcutsDialog, AdwSidebar, AdwSpinRow, AdwSpinner, AdwSplitButton, AdwSqueezer, AdwStatusPage, AdwSwitchRow, AdwTabBar, AdwTabButton, AdwTabOverview, AdwTabView, AdwToastOverlay, AdwToggleGroup, AdwToolbarView, AdwViewStack, AdwViewSwitcher, AdwViewSwitcherBar, AdwViewSwitcherSidebar, AdwViewSwitcherTitle, AdwWindow, AdwWindowTitle, AdwWrapBox, } from "@gtkx/jsx/adw";
|
|
16
|
+
//# sourceMappingURL=widgets.generated.adw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgets.generated.adw.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/widgets.generated.adw.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,0EAA0E;AAC1E,sDAAsD;AACtD,yEAAyE;AACzE,6DAA6D;AAC7D,EAAE;AACF,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,2EAA2E;AAC3E,4EAA4E;AAC5E,+DAA+D;AAC/D,uEAAuE;AACvE,4EAA4E;AAE5E,OAAO,EACL,cAAc,EACd,cAAc,EACd,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,wBAAwB,EACxB,yBAAyB,EACzB,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,WAAW,EACX,cAAc,EACd,OAAO,EACP,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,aAAa,EACb,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,cAAc,EACd,UAAU,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,SAAS,EACT,cAAc,EACd,UAAU,GACX,MAAM,eAAe,CAAA","sourcesContent":["// GENERATED FILE — do not edit by hand.\n// Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM\n// after `npm run codegen` picks up a gtkx update; see\n// scripts/widget-surface/classification.json for the full classification\n// and .claude/epics/widget-surface/ for the rules behind it.\n//\n// Every Adwaita widget the classifier resolved to a Gtk.Widget subclass,\n// re-exported RAW. Imported ONLY by src/adw/widgets.generated.ts — that\n// subpath already requires Adw-1 unconditionally, so a static import here\n// is fine; gtkx/bridge/adw.ts (the seam app-registry.tsx/host.gtkx.ts use)\n// reaches @gtkx/jsx/adw through require() instead, never through this file,\n// so it stays reachable even when Adw was never generated. See\n// .claude/epics/adw-optional/001.md and docs/gtkx-rc4-notes.md for why\n// @gtkx/jsx/adw cannot live in widgets.generated.ts alongside the GTK half.\n\nexport {\n AdwAboutDialog,\n AdwAboutWindow,\n AdwActionRow,\n AdwAlertDialog,\n AdwApplicationWindow,\n AdwAvatar,\n AdwBanner,\n AdwBin,\n AdwBottomSheet,\n AdwBreakpointBin,\n AdwButtonContent,\n AdwButtonRow,\n AdwCarousel,\n AdwCarouselIndicatorDots,\n AdwCarouselIndicatorLines,\n AdwClamp,\n AdwClampScrollable,\n AdwComboRow,\n AdwDialog,\n AdwEntryRow,\n AdwExpanderRow,\n AdwFlap,\n AdwHeaderBar,\n AdwInlineViewSwitcher,\n AdwLayoutSlot,\n AdwLeaflet,\n AdwMessageDialog,\n AdwMultiLayoutView,\n AdwNavigationPage,\n AdwNavigationSplitView,\n AdwNavigationView,\n AdwOverlaySplitView,\n AdwPasswordEntryRow,\n AdwPreferencesDialog,\n AdwPreferencesGroup,\n AdwPreferencesPage,\n AdwPreferencesRow,\n AdwPreferencesWindow,\n AdwShortcutLabel,\n AdwShortcutsDialog,\n AdwSidebar,\n AdwSpinRow,\n AdwSpinner,\n AdwSplitButton,\n AdwSqueezer,\n AdwStatusPage,\n AdwSwitchRow,\n AdwTabBar,\n AdwTabButton,\n AdwTabOverview,\n AdwTabView,\n AdwToastOverlay,\n AdwToggleGroup,\n AdwToolbarView,\n AdwViewStack,\n AdwViewSwitcher,\n AdwViewSwitcherBar,\n AdwViewSwitcherSidebar,\n AdwViewSwitcherTitle,\n AdwWindow,\n AdwWindowTitle,\n AdwWrapBox,\n} from \"@gtkx/jsx/adw\"\n"]}
|
|
@@ -1,2 +1 @@
|
|
|
1
1
|
export { GtkAboutDialog, GtkActionBar, GtkAppChooserButton, GtkAppChooserDialog, GtkAppChooserWidget, GtkApplicationWindow, GtkAspectFrame, GtkAssistant, GtkBox, GtkButton, GtkCalendar, GtkCellView, GtkCenterBox, GtkCheckButton, GtkColorButton, GtkColorChooserDialog, GtkColorChooserWidget, GtkColorDialogButton, GtkColumnView, GtkComboBox, GtkComboBoxText, GtkDialog, GtkDragIcon, GtkDrawingArea, GtkDropDown, GtkEditableLabel, GtkEmojiChooser, GtkEntry, GtkExpander, GtkFileChooserDialog, GtkFileChooserWidget, GtkFixed, GtkFlowBox, GtkFlowBoxChild, GtkFontButton, GtkFontChooserDialog, GtkFontChooserWidget, GtkFontDialogButton, GtkFrame, GtkGLArea, GtkGraphicsOffload, GtkGrid, GtkGridView, GtkHeaderBar, GtkIconView, GtkImage, GtkInfoBar, GtkInscription, GtkLabel, GtkLevelBar, GtkLinkButton, GtkListBox, GtkListBoxRow, GtkListView, GtkLockButton, GtkMediaControls, GtkMenuButton, GtkMessageDialog, GtkNotebook, GtkOverlay, GtkPageSetupUnixDialog, GtkPaned, GtkPasswordEntry, GtkPicture, GtkPopover, GtkPopoverBin, GtkPopoverMenu, GtkPopoverMenuBar, GtkPrintUnixDialog, GtkProgressBar, GtkRange, GtkRevealer, GtkScale, GtkScaleButton, GtkScrollbar, GtkScrolledWindow, GtkSearchBar, GtkSearchEntry, GtkSeparator, GtkShortcutLabel, GtkShortcutsGroup, GtkShortcutsSection, GtkShortcutsShortcut, GtkShortcutsWindow, GtkSpinButton, GtkSpinner, GtkStack, GtkStackSidebar, GtkStackSwitcher, GtkStatusbar, GtkSwitch, GtkText, GtkTextView, GtkToggleButton, GtkTreeExpander, GtkTreeView, GtkVideo, GtkViewport, GtkVolumeButton, GtkWindow, GtkWindowControls, GtkWindowHandle, } from "@gtkx/jsx/gtk";
|
|
2
|
-
export { AdwAboutDialog, AdwAboutWindow, AdwActionRow, AdwAlertDialog, AdwApplicationWindow, AdwAvatar, AdwBanner, AdwBin, AdwBottomSheet, AdwBreakpointBin, AdwButtonContent, AdwButtonRow, AdwCarousel, AdwCarouselIndicatorDots, AdwCarouselIndicatorLines, AdwClamp, AdwClampScrollable, AdwComboRow, AdwDialog, AdwEntryRow, AdwExpanderRow, AdwFlap, AdwHeaderBar, AdwInlineViewSwitcher, AdwLayoutSlot, AdwLeaflet, AdwMessageDialog, AdwMultiLayoutView, AdwNavigationPage, AdwNavigationSplitView, AdwNavigationView, AdwOverlaySplitView, AdwPasswordEntryRow, AdwPreferencesDialog, AdwPreferencesGroup, AdwPreferencesPage, AdwPreferencesRow, AdwPreferencesWindow, AdwShortcutLabel, AdwShortcutsDialog, AdwSidebar, AdwSpinRow, AdwSpinner, AdwSplitButton, AdwSqueezer, AdwStatusPage, AdwSwitchRow, AdwTabBar, AdwTabButton, AdwTabOverview, AdwTabView, AdwToastOverlay, AdwToggleGroup, AdwToolbarView, AdwViewStack, AdwViewSwitcher, AdwViewSwitcherBar, AdwViewSwitcherSidebar, AdwViewSwitcherTitle, AdwWindow, AdwWindowTitle, AdwWrapBox, } from "@gtkx/jsx/adw";
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// Every widget the classifier resolved to a Gtk.Widget subclass, re-exported
|
|
8
8
|
// RAW. This is the only generated file (besides the hand-written bridge
|
|
9
9
|
// modules) allowed to import @gtkx/jsx directly — src/gtk/widgets.generated
|
|
10
|
-
//
|
|
11
|
-
//
|
|
10
|
+
// pulls from here instead, so the no-restricted-imports carve-out for
|
|
11
|
+
// src/gtkx/bridge/** stays the only door. Adwaita's raw widgets are the
|
|
12
|
+
// sibling file, widgets.generated.adw.ts — see gtkx/bridge/adw.ts.
|
|
12
13
|
export { GtkAboutDialog, GtkActionBar, GtkAppChooserButton, GtkAppChooserDialog, GtkAppChooserWidget, GtkApplicationWindow, GtkAspectFrame, GtkAssistant, GtkBox, GtkButton, GtkCalendar, GtkCellView, GtkCenterBox, GtkCheckButton, GtkColorButton, GtkColorChooserDialog, GtkColorChooserWidget, GtkColorDialogButton, GtkColumnView, GtkComboBox, GtkComboBoxText, GtkDialog, GtkDragIcon, GtkDrawingArea, GtkDropDown, GtkEditableLabel, GtkEmojiChooser, GtkEntry, GtkExpander, GtkFileChooserDialog, GtkFileChooserWidget, GtkFixed, GtkFlowBox, GtkFlowBoxChild, GtkFontButton, GtkFontChooserDialog, GtkFontChooserWidget, GtkFontDialogButton, GtkFrame, GtkGLArea, GtkGraphicsOffload, GtkGrid, GtkGridView, GtkHeaderBar, GtkIconView, GtkImage, GtkInfoBar, GtkInscription, GtkLabel, GtkLevelBar, GtkLinkButton, GtkListBox, GtkListBoxRow, GtkListView, GtkLockButton, GtkMediaControls, GtkMenuButton, GtkMessageDialog, GtkNotebook, GtkOverlay, GtkPageSetupUnixDialog, GtkPaned, GtkPasswordEntry, GtkPicture, GtkPopover, GtkPopoverBin, GtkPopoverMenu, GtkPopoverMenuBar, GtkPrintUnixDialog, GtkProgressBar, GtkRange, GtkRevealer, GtkScale, GtkScaleButton, GtkScrollbar, GtkScrolledWindow, GtkSearchBar, GtkSearchEntry, GtkSeparator, GtkShortcutLabel, GtkShortcutsGroup, GtkShortcutsSection, GtkShortcutsShortcut, GtkShortcutsWindow, GtkSpinButton, GtkSpinner, GtkStack, GtkStackSidebar, GtkStackSwitcher, GtkStatusbar, GtkSwitch, GtkText, GtkTextView, GtkToggleButton, GtkTreeExpander, GtkTreeView, GtkVideo, GtkViewport, GtkVolumeButton, GtkWindow, GtkWindowControls, GtkWindowHandle, } from "@gtkx/jsx/gtk";
|
|
13
|
-
export { AdwAboutDialog, AdwAboutWindow, AdwActionRow, AdwAlertDialog, AdwApplicationWindow, AdwAvatar, AdwBanner, AdwBin, AdwBottomSheet, AdwBreakpointBin, AdwButtonContent, AdwButtonRow, AdwCarousel, AdwCarouselIndicatorDots, AdwCarouselIndicatorLines, AdwClamp, AdwClampScrollable, AdwComboRow, AdwDialog, AdwEntryRow, AdwExpanderRow, AdwFlap, AdwHeaderBar, AdwInlineViewSwitcher, AdwLayoutSlot, AdwLeaflet, AdwMessageDialog, AdwMultiLayoutView, AdwNavigationPage, AdwNavigationSplitView, AdwNavigationView, AdwOverlaySplitView, AdwPasswordEntryRow, AdwPreferencesDialog, AdwPreferencesGroup, AdwPreferencesPage, AdwPreferencesRow, AdwPreferencesWindow, AdwShortcutLabel, AdwShortcutsDialog, AdwSidebar, AdwSpinRow, AdwSpinner, AdwSplitButton, AdwSqueezer, AdwStatusPage, AdwSwitchRow, AdwTabBar, AdwTabButton, AdwTabOverview, AdwTabView, AdwToastOverlay, AdwToggleGroup, AdwToolbarView, AdwViewStack, AdwViewSwitcher, AdwViewSwitcherBar, AdwViewSwitcherSidebar, AdwViewSwitcherTitle, AdwWindow, AdwWindowTitle, AdwWrapBox, } from "@gtkx/jsx/adw";
|
|
14
14
|
//# sourceMappingURL=widgets.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgets.generated.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/widgets.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,0EAA0E;AAC1E,sDAAsD;AACtD,yEAAyE;AACzE,6DAA6D;AAC7D,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,4EAA4E;AAC5E
|
|
1
|
+
{"version":3,"file":"widgets.generated.js","sourceRoot":"","sources":["../../../src/gtkx/bridge/widgets.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,0EAA0E;AAC1E,sDAAsD;AACtD,yEAAyE;AACzE,6DAA6D;AAC7D,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,4EAA4E;AAC5E,sEAAsE;AACtE,wEAAwE;AACxE,mEAAmE;AAEnE,OAAO,EACL,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,eAAe,EACf,SAAS,EACT,WAAW,EACX,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,OAAO,EACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,UAAU,EACV,cAAc,EACd,QAAQ,EACR,WAAW,EACX,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,sBAAsB,EACtB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,OAAO,EACP,WAAW,EACX,eAAe,EACf,eAAe,EACf,WAAW,EACX,QAAQ,EACR,WAAW,EACX,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,eAAe,GAChB,MAAM,eAAe,CAAA","sourcesContent":["// GENERATED FILE — do not edit by hand.\n// Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM\n// after `npm run codegen` picks up a gtkx update; see\n// scripts/widget-surface/classification.json for the full classification\n// and .claude/epics/widget-surface/ for the rules behind it.\n//\n// Every widget the classifier resolved to a Gtk.Widget subclass, re-exported\n// RAW. This is the only generated file (besides the hand-written bridge\n// modules) allowed to import @gtkx/jsx directly — src/gtk/widgets.generated\n// pulls from here instead, so the no-restricted-imports carve-out for\n// src/gtkx/bridge/** stays the only door. Adwaita's raw widgets are the\n// sibling file, widgets.generated.adw.ts — see gtkx/bridge/adw.ts.\n\nexport {\n GtkAboutDialog,\n GtkActionBar,\n GtkAppChooserButton,\n GtkAppChooserDialog,\n GtkAppChooserWidget,\n GtkApplicationWindow,\n GtkAspectFrame,\n GtkAssistant,\n GtkBox,\n GtkButton,\n GtkCalendar,\n GtkCellView,\n GtkCenterBox,\n GtkCheckButton,\n GtkColorButton,\n GtkColorChooserDialog,\n GtkColorChooserWidget,\n GtkColorDialogButton,\n GtkColumnView,\n GtkComboBox,\n GtkComboBoxText,\n GtkDialog,\n GtkDragIcon,\n GtkDrawingArea,\n GtkDropDown,\n GtkEditableLabel,\n GtkEmojiChooser,\n GtkEntry,\n GtkExpander,\n GtkFileChooserDialog,\n GtkFileChooserWidget,\n GtkFixed,\n GtkFlowBox,\n GtkFlowBoxChild,\n GtkFontButton,\n GtkFontChooserDialog,\n GtkFontChooserWidget,\n GtkFontDialogButton,\n GtkFrame,\n GtkGLArea,\n GtkGraphicsOffload,\n GtkGrid,\n GtkGridView,\n GtkHeaderBar,\n GtkIconView,\n GtkImage,\n GtkInfoBar,\n GtkInscription,\n GtkLabel,\n GtkLevelBar,\n GtkLinkButton,\n GtkListBox,\n GtkListBoxRow,\n GtkListView,\n GtkLockButton,\n GtkMediaControls,\n GtkMenuButton,\n GtkMessageDialog,\n GtkNotebook,\n GtkOverlay,\n GtkPageSetupUnixDialog,\n GtkPaned,\n GtkPasswordEntry,\n GtkPicture,\n GtkPopover,\n GtkPopoverBin,\n GtkPopoverMenu,\n GtkPopoverMenuBar,\n GtkPrintUnixDialog,\n GtkProgressBar,\n GtkRange,\n GtkRevealer,\n GtkScale,\n GtkScaleButton,\n GtkScrollbar,\n GtkScrolledWindow,\n GtkSearchBar,\n GtkSearchEntry,\n GtkSeparator,\n GtkShortcutLabel,\n GtkShortcutsGroup,\n GtkShortcutsSection,\n GtkShortcutsShortcut,\n GtkShortcutsWindow,\n GtkSpinButton,\n GtkSpinner,\n GtkStack,\n GtkStackSidebar,\n GtkStackSwitcher,\n GtkStatusbar,\n GtkSwitch,\n GtkText,\n GtkTextView,\n GtkToggleButton,\n GtkTreeExpander,\n GtkTreeView,\n GtkVideo,\n GtkViewport,\n GtkVolumeButton,\n GtkWindow,\n GtkWindowControls,\n GtkWindowHandle,\n} from \"@gtkx/jsx/gtk\"\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
// Public surface of react-native-gtkx, mirroring the `react-native` module.
|
|
2
2
|
// Components · APIs · StyleSheet, with the Yoga layout engine underneath.
|
|
3
|
+
// Side effect, evaluated before anything below: installs
|
|
4
|
+
// requestAnimationFrame/cancelAnimationFrame as globals, on the same frame
|
|
5
|
+
// clock Animated and the Reanimated compat surface already run on
|
|
6
|
+
// (glibScheduler — see frame-scheduler.ts's header for why nothing else may
|
|
7
|
+
// add a second one). RN provides both globals from its own bootstrap on
|
|
8
|
+
// every platform; this is the one module BOTH toolchains load before any
|
|
9
|
+
// app code runs — "react-native" resolves here (aliased) for the Metro
|
|
10
|
+
// bundle and for the vite dev/build graph alike, so installing it here
|
|
11
|
+
// covers both without a second call site. See components/
|
|
12
|
+
// request-animation-frame.ts for the semantics.
|
|
13
|
+
import { glibScheduler } from "./components/frame-scheduler";
|
|
14
|
+
import { installGlobalRequestAnimationFrame } from "./components/request-animation-frame";
|
|
15
|
+
// Installs the global-environment parity gaps (navigator.product,
|
|
16
|
+
// requestIdleCallback, global.alert, ErrorUtils — see ./globals/index.ts)
|
|
17
|
+
// before anything below runs. Both toolchains resolve `react-native` here
|
|
18
|
+
// (../aliases/index.ts), so this is the one place a side effect reaches
|
|
19
|
+
// every app regardless of which bundler built it.
|
|
20
|
+
import { installGlobals } from "./globals/install";
|
|
21
|
+
installGlobalRequestAnimationFrame(glibScheduler);
|
|
22
|
+
installGlobals();
|
|
3
23
|
export { ActivityIndicator, Animated, AppRegistry, Easing, findNodeHandle, FlatList, Image, Modal, IntrinsicRoot, PanResponder, NestedRoot, Pressable, Root, SafeAreaView, ScrollView, SectionList, StatusBar, Switch, Text, TextInput, TouchableHighlight, TouchableOpacity, TouchableWithoutFeedback, View, VirtualizedList, } from "./components/index";
|
|
4
24
|
export { Alert, Appearance, AppState, BackHandler, DevSettings, Dimensions, I18nManager, InteractionManager, Keyboard, Linking, LogBox, Platform, useColorScheme, useWindowDimensions, } from "./apis/index";
|
|
5
25
|
export { PlatformColor, StyleSheet } from "./style/index";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,0EAA0E;AAE1E,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,MAAM,EACN,cAAc,EACd,QAAQ,EACR,KAAK,EACL,KAAK,EACL,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,MAAM,EACN,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,IAAI,EACJ,eAAe,GA6ChB,MAAM,oBAAoB,CAAA;AAM3B,OAAO,EACL,KAAK,EACL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,QAAQ,EACR,cAAc,EACd,mBAAmB,GAiBpB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAiBzD,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA","sourcesContent":["// Public surface of react-native-gtkx, mirroring the `react-native` module.\n// Components · APIs · StyleSheet, with the Yoga layout engine underneath.\n\nexport {\n ActivityIndicator,\n Animated,\n AppRegistry,\n Easing,\n findNodeHandle,\n FlatList,\n Image,\n Modal,\n IntrinsicRoot,\n PanResponder,\n NestedRoot,\n Pressable,\n Root,\n SafeAreaView,\n ScrollView,\n SectionList,\n StatusBar,\n Switch,\n Text,\n TextInput,\n TouchableHighlight,\n TouchableOpacity,\n TouchableWithoutFeedback,\n View,\n VirtualizedList,\n type ActivityIndicatorProps,\n type FlatListProps,\n type GestureResponderEvent,\n type ImageHandle,\n type ImageProps,\n type ImageSource,\n type LayoutEvent,\n type ListRenderItemInfo,\n type MeasureHandle,\n type MeasureInWindowOnSuccessCallback,\n type MeasureLayoutOnSuccessCallback,\n type MeasureOnSuccessCallback,\n type ItemLayout,\n type ModalProps,\n type NativeTouch,\n type NodeHandle,\n type PanResponderCallbacks,\n type PanResponderGestureState,\n type PanResponderInstance,\n type PressableProps,\n type PressableStateCallbackType,\n type IntrinsicRootProps,\n type NestedRootProps,\n type PressEvent,\n type ResponderProps,\n type RootProps,\n type RunApplicationParams,\n type ScrollEvent,\n type ScrollViewHandle,\n type ScrollViewProps,\n type SectionListProps,\n type SwitchProps,\n type TextHandle,\n type TextInputProps,\n type TextProps,\n type TouchHistory,\n type TouchRecord,\n type TouchableHighlightProps,\n type TouchableOpacityProps,\n type TouchableWithoutFeedbackProps,\n type ViewabilityConfig,\n type ViewHandle,\n type ViewProps,\n type ViewToken,\n} from \"./components/index\"\n\n// List scroll handle (scrollTo/scrollToEnd/scrollToIndex/scrollToItem/\n// scrollToOffset) — exported straight from the component module.\nexport type { FlatListHandle } from \"./components/flat-list\"\n\nexport {\n Alert,\n Appearance,\n AppState,\n BackHandler,\n DevSettings,\n Dimensions,\n I18nManager,\n InteractionManager,\n Keyboard,\n Linking,\n LogBox,\n Platform,\n useColorScheme,\n useWindowDimensions,\n type AlertButton,\n type AlertButtonStyle,\n type AlertOptions,\n type AppearancePreferences,\n type AppStateEvent,\n type AppStateStatus,\n type ColorSchemeName,\n type DimensionKey,\n type DimensionsPayload,\n type InteractionPromise,\n type KeyboardEvent,\n type KeyboardEventName,\n type LogBoxIgnorePattern,\n type PlatformOSType,\n type PlatformSelectSpec,\n type ScaledSize,\n} from \"./apis/index\"\n\nexport { PlatformColor, StyleSheet } from \"./style/index\"\n\nexport type {\n BoxShadowValue,\n DimensionValue,\n FlatStyle,\n ImageStyle,\n LayoutStyle,\n PointerEventsValue,\n StyleProp,\n TextDecorationLine,\n TextStyle,\n TransformPart,\n ViewStyle,\n VisualStyle,\n} from \"./contracts\"\n\nexport const version = \"0.1.0\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,0EAA0E;AAE1E,yDAAyD;AACzD,2EAA2E;AAC3E,kEAAkE;AAClE,4EAA4E;AAC5E,wEAAwE;AACxE,yEAAyE;AACzE,uEAAuE;AACvE,uEAAuE;AACvE,0DAA0D;AAC1D,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAA;AACzF,kEAAkE;AAClE,0EAA0E;AAC1E,0EAA0E;AAC1E,wEAAwE;AACxE,kDAAkD;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,kCAAkC,CAAC,aAAa,CAAC,CAAA;AAEjD,cAAc,EAAE,CAAA;AAChB,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,MAAM,EACN,cAAc,EACd,QAAQ,EACR,KAAK,EACL,KAAK,EACL,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,MAAM,EACN,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,IAAI,EACJ,eAAe,GA6ChB,MAAM,oBAAoB,CAAA;AAM3B,OAAO,EACL,KAAK,EACL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,QAAQ,EACR,cAAc,EACd,mBAAmB,GAiBpB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAiBzD,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA","sourcesContent":["// Public surface of react-native-gtkx, mirroring the `react-native` module.\n// Components · APIs · StyleSheet, with the Yoga layout engine underneath.\n\n// Side effect, evaluated before anything below: installs\n// requestAnimationFrame/cancelAnimationFrame as globals, on the same frame\n// clock Animated and the Reanimated compat surface already run on\n// (glibScheduler — see frame-scheduler.ts's header for why nothing else may\n// add a second one). RN provides both globals from its own bootstrap on\n// every platform; this is the one module BOTH toolchains load before any\n// app code runs — \"react-native\" resolves here (aliased) for the Metro\n// bundle and for the vite dev/build graph alike, so installing it here\n// covers both without a second call site. See components/\n// request-animation-frame.ts for the semantics.\nimport { glibScheduler } from \"./components/frame-scheduler\"\nimport { installGlobalRequestAnimationFrame } from \"./components/request-animation-frame\"\n// Installs the global-environment parity gaps (navigator.product,\n// requestIdleCallback, global.alert, ErrorUtils — see ./globals/index.ts)\n// before anything below runs. Both toolchains resolve `react-native` here\n// (../aliases/index.ts), so this is the one place a side effect reaches\n// every app regardless of which bundler built it.\nimport { installGlobals } from \"./globals/install\"\n\ninstallGlobalRequestAnimationFrame(glibScheduler)\n\ninstallGlobals()\nexport {\n ActivityIndicator,\n Animated,\n AppRegistry,\n Easing,\n findNodeHandle,\n FlatList,\n Image,\n Modal,\n IntrinsicRoot,\n PanResponder,\n NestedRoot,\n Pressable,\n Root,\n SafeAreaView,\n ScrollView,\n SectionList,\n StatusBar,\n Switch,\n Text,\n TextInput,\n TouchableHighlight,\n TouchableOpacity,\n TouchableWithoutFeedback,\n View,\n VirtualizedList,\n type ActivityIndicatorProps,\n type FlatListProps,\n type GestureResponderEvent,\n type ImageHandle,\n type ImageProps,\n type ImageSource,\n type LayoutEvent,\n type ListRenderItemInfo,\n type MeasureHandle,\n type MeasureInWindowOnSuccessCallback,\n type MeasureLayoutOnSuccessCallback,\n type MeasureOnSuccessCallback,\n type ItemLayout,\n type ModalProps,\n type NativeTouch,\n type NodeHandle,\n type PanResponderCallbacks,\n type PanResponderGestureState,\n type PanResponderInstance,\n type PressableProps,\n type PressableStateCallbackType,\n type IntrinsicRootProps,\n type NestedRootProps,\n type PressEvent,\n type ResponderProps,\n type RootProps,\n type RunApplicationParams,\n type ScrollEvent,\n type ScrollViewHandle,\n type ScrollViewProps,\n type SectionListProps,\n type SwitchProps,\n type TextHandle,\n type TextInputProps,\n type TextProps,\n type TouchHistory,\n type TouchRecord,\n type TouchableHighlightProps,\n type TouchableOpacityProps,\n type TouchableWithoutFeedbackProps,\n type ViewabilityConfig,\n type ViewHandle,\n type ViewProps,\n type ViewToken,\n} from \"./components/index\"\n\n// List scroll handle (scrollTo/scrollToEnd/scrollToIndex/scrollToItem/\n// scrollToOffset) — exported straight from the component module.\nexport type { FlatListHandle } from \"./components/flat-list\"\n\nexport {\n Alert,\n Appearance,\n AppState,\n BackHandler,\n DevSettings,\n Dimensions,\n I18nManager,\n InteractionManager,\n Keyboard,\n Linking,\n LogBox,\n Platform,\n useColorScheme,\n useWindowDimensions,\n type AlertButton,\n type AlertButtonStyle,\n type AlertOptions,\n type AppearancePreferences,\n type AppStateEvent,\n type AppStateStatus,\n type ColorSchemeName,\n type DimensionKey,\n type DimensionsPayload,\n type InteractionPromise,\n type KeyboardEvent,\n type KeyboardEventName,\n type LogBoxIgnorePattern,\n type PlatformOSType,\n type PlatformSelectSpec,\n type ScaledSize,\n} from \"./apis/index\"\n\nexport { PlatformColor, StyleSheet } from \"./style/index\"\n\nexport type {\n BoxShadowValue,\n DimensionValue,\n FlatStyle,\n ImageStyle,\n LayoutStyle,\n PointerEventsValue,\n StyleProp,\n TextDecorationLine,\n TextStyle,\n TransformPart,\n ViewStyle,\n VisualStyle,\n} from \"./contracts\"\n\nexport const version = \"0.1.0\"\n"]}
|
package/dist/mcp/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The react-native-gtkx-mcp bin: run from a consumer project (npx picks up
|
|
3
3
|
// the locally installed react-native-gtkx first, so this always answers
|
|
4
|
-
// for the exact version that project has — see docs/
|
|
4
|
+
// for the exact version that project has — see docs/guide/toolchains.md).
|
|
5
5
|
// Executed by bare `node` (no bundler in the way, same reason
|
|
6
6
|
// src/runner/src/metro/src/vite stay self-contained) — hence every
|
|
7
7
|
// relative import in src/mcp/** carries an explicit .js extension.
|
package/dist/mcp/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/mcp/bin.ts"],"names":[],"mappings":";AACA,2EAA2E;AAC3E,wEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/mcp/bin.ts"],"names":[],"mappings":";AACA,2EAA2E;AAC3E,wEAAwE;AACxE,0EAA0E;AAC1E,8DAA8D;AAC9D,mEAAmE;AACnE,mEAAmE;AACnE,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,IAAI,CAAC;IACH,MAAM,IAAI,EAAE,CAAA;AACd,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAA;IAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC","sourcesContent":["#!/usr/bin/env node\n// The react-native-gtkx-mcp bin: run from a consumer project (npx picks up\n// the locally installed react-native-gtkx first, so this always answers\n// for the exact version that project has — see docs/guide/toolchains.md).\n// Executed by bare `node` (no bundler in the way, same reason\n// src/runner/src/metro/src/vite stay self-contained) — hence every\n// relative import in src/mcp/** carries an explicit .js extension.\nimport process from \"node:process\"\nimport { main } from \"./server.js\"\n\ntry {\n await main()\n} catch (error) {\n console.error(\"[react-native-gtkx-mcp] fatal error:\", error)\n process.exit(1)\n}\n"]}
|