@gtkx/react 0.21.0 → 1.0.0-rc.1
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 +137 -34
- package/dist/components/application.d.ts +10 -0
- package/dist/components/application.d.ts.map +1 -0
- package/dist/components/application.js +26 -0
- package/dist/components/application.js.map +1 -0
- package/dist/components/window.d.ts +8 -0
- package/dist/components/window.d.ts.map +1 -0
- package/dist/components/window.js +23 -0
- package/dist/components/window.js.map +1 -0
- package/dist/hooks/use-application.d.ts +8 -0
- package/dist/hooks/use-application.d.ts.map +1 -0
- package/dist/hooks/use-application.js +13 -0
- package/dist/hooks/use-application.js.map +1 -0
- package/dist/hooks/use-bind-setting.d.ts +6 -0
- package/dist/hooks/use-bind-setting.d.ts.map +1 -0
- package/dist/hooks/use-bind-setting.js +19 -0
- package/dist/hooks/use-bind-setting.js.map +1 -0
- package/dist/hooks/use-merge-refs.d.ts +3 -0
- package/dist/hooks/use-merge-refs.d.ts.map +1 -0
- package/dist/hooks/use-merge-refs.js +48 -0
- package/dist/hooks/use-merge-refs.js.map +1 -0
- package/dist/hooks/use-object-attachment.d.ts +10 -0
- package/dist/hooks/use-object-attachment.d.ts.map +1 -0
- package/dist/hooks/use-object-attachment.js +24 -0
- package/dist/hooks/use-object-attachment.js.map +1 -0
- package/dist/hooks/use-object-value.d.ts +4 -0
- package/dist/hooks/use-object-value.d.ts.map +1 -0
- package/dist/hooks/use-object-value.js +32 -0
- package/dist/hooks/use-object-value.js.map +1 -0
- package/dist/hooks/use-parent-window.d.ts +8 -0
- package/dist/hooks/use-parent-window.d.ts.map +1 -0
- package/dist/hooks/use-parent-window.js +7 -0
- package/dist/hooks/use-parent-window.js.map +1 -0
- package/dist/hooks/use-property.d.ts +14 -0
- package/dist/hooks/use-property.d.ts.map +1 -0
- package/dist/hooks/use-property.js +13 -0
- package/dist/hooks/use-property.js.map +1 -0
- package/dist/hooks/use-setting.d.ts +25 -0
- package/dist/hooks/use-setting.d.ts.map +1 -0
- package/dist/hooks/use-setting.js +15 -0
- package/dist/hooks/use-setting.js.map +1 -0
- package/dist/hooks/use-signal.d.ts +21 -0
- package/dist/hooks/use-signal.d.ts.map +1 -0
- package/dist/hooks/use-signal.js +20 -0
- package/dist/hooks/use-signal.js.map +1 -0
- package/dist/index.d.ts +14 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +14 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +14 -0
- package/dist/internal.js.map +1 -0
- package/dist/libraries/adw/dialog.d.ts +8 -0
- package/dist/libraries/adw/dialog.d.ts.map +1 -0
- package/dist/libraries/adw/dialog.js +25 -0
- package/dist/libraries/adw/dialog.js.map +1 -0
- package/dist/libraries/adw/index.d.ts +2 -0
- package/dist/libraries/adw/index.d.ts.map +1 -0
- package/dist/libraries/adw/index.js +2 -0
- package/dist/libraries/adw/index.js.map +1 -0
- package/dist/reconciler/accessible.d.ts +59 -0
- package/dist/reconciler/accessible.d.ts.map +1 -0
- package/dist/reconciler/accessible.js +143 -0
- package/dist/reconciler/accessible.js.map +1 -0
- package/dist/reconciler/apply-props.d.ts +8 -0
- package/dist/reconciler/apply-props.d.ts.map +1 -0
- package/dist/reconciler/apply-props.js +92 -0
- package/dist/reconciler/apply-props.js.map +1 -0
- package/dist/reconciler/commit-flush.d.ts +3 -0
- package/dist/reconciler/commit-flush.d.ts.map +1 -0
- package/dist/reconciler/commit-flush.js +13 -0
- package/dist/reconciler/commit-flush.js.map +1 -0
- package/dist/reconciler/container-attach.d.ts +10 -0
- package/dist/reconciler/container-attach.d.ts.map +1 -0
- package/dist/reconciler/container-attach.js +216 -0
- package/dist/reconciler/container-attach.js.map +1 -0
- package/dist/reconciler/content-rebuild.d.ts +3 -0
- package/dist/reconciler/content-rebuild.d.ts.map +1 -0
- package/dist/reconciler/content-rebuild.js +15 -0
- package/dist/reconciler/content-rebuild.js.map +1 -0
- package/dist/reconciler/dispatch.d.ts +6 -0
- package/dist/reconciler/dispatch.d.ts.map +1 -0
- package/dist/reconciler/dispatch.js +61 -0
- package/dist/reconciler/dispatch.js.map +1 -0
- package/dist/reconciler/element-prop-appliers.d.ts +5 -0
- package/dist/reconciler/element-prop-appliers.d.ts.map +1 -0
- package/dist/reconciler/element-prop-appliers.js +104 -0
- package/dist/reconciler/element-prop-appliers.js.map +1 -0
- package/dist/reconciler/element-props.d.ts +25 -0
- package/dist/reconciler/element-props.d.ts.map +1 -0
- package/dist/reconciler/element-props.js +157 -0
- package/dist/reconciler/element-props.js.map +1 -0
- package/dist/reconciler/host-config.d.ts +13 -0
- package/dist/reconciler/host-config.d.ts.map +1 -0
- package/dist/reconciler/host-config.js +309 -0
- package/dist/reconciler/host-config.js.map +1 -0
- package/dist/reconciler/instance.d.ts +6 -0
- package/dist/reconciler/instance.d.ts.map +1 -0
- package/dist/reconciler/instance.js +27 -0
- package/dist/reconciler/instance.js.map +1 -0
- package/dist/reconciler/label-text-rebuild.d.ts +3 -0
- package/dist/reconciler/label-text-rebuild.d.ts.map +1 -0
- package/dist/reconciler/label-text-rebuild.js +22 -0
- package/dist/reconciler/label-text-rebuild.js.map +1 -0
- package/dist/reconciler/portal.d.ts +11 -0
- package/dist/reconciler/portal.d.ts.map +1 -0
- package/dist/reconciler/portal.js +20 -0
- package/dist/reconciler/portal.js.map +1 -0
- package/dist/reconciler/reconciler-error-handler.d.ts +7 -0
- package/dist/reconciler/reconciler-error-handler.d.ts.map +1 -0
- package/dist/reconciler/reconciler-error-handler.js +24 -0
- package/dist/reconciler/reconciler-error-handler.js.map +1 -0
- package/dist/reconciler/reconciler-root.d.ts +19 -0
- package/dist/reconciler/reconciler-root.d.ts.map +1 -0
- package/dist/reconciler/reconciler-root.js +24 -0
- package/dist/reconciler/reconciler-root.js.map +1 -0
- package/dist/reconciler/reconciler.d.ts +3 -0
- package/dist/reconciler/reconciler.d.ts.map +1 -0
- package/dist/reconciler/reconciler.js +12 -0
- package/dist/reconciler/reconciler.js.map +1 -0
- package/dist/reconciler/render.d.ts +23 -0
- package/dist/reconciler/render.d.ts.map +1 -0
- package/dist/reconciler/render.js +46 -0
- package/dist/reconciler/render.js.map +1 -0
- package/dist/reconciler/root-element.d.ts +14 -0
- package/dist/reconciler/root-element.d.ts.map +1 -0
- package/dist/reconciler/root-element.js +7 -0
- package/dist/reconciler/root-element.js.map +1 -0
- package/dist/reconciler/signal-store.d.ts +22 -0
- package/dist/reconciler/signal-store.d.ts.map +1 -0
- package/dist/reconciler/signal-store.js +84 -0
- package/dist/reconciler/signal-store.js.map +1 -0
- package/dist/reconciler/state.d.ts +36 -0
- package/dist/reconciler/state.d.ts.map +1 -0
- package/dist/reconciler/state.js +38 -0
- package/dist/reconciler/state.js.map +1 -0
- package/dist/reconciler/text-buffer-controller.d.ts +17 -0
- package/dist/reconciler/text-buffer-controller.d.ts.map +1 -0
- package/dist/reconciler/text-buffer-controller.js +102 -0
- package/dist/reconciler/text-buffer-controller.js.map +1 -0
- package/dist/reconciler/text-buffer-rebuild.d.ts +3 -0
- package/dist/reconciler/text-buffer-rebuild.d.ts.map +1 -0
- package/dist/reconciler/text-buffer-rebuild.js +7 -0
- package/dist/reconciler/text-buffer-rebuild.js.map +1 -0
- package/dist/reconciler/text-node.d.ts +7 -0
- package/dist/reconciler/text-node.d.ts.map +1 -0
- package/dist/reconciler/text-node.js +8 -0
- package/dist/reconciler/text-node.js.map +1 -0
- package/dist/reconciler/types.d.ts +5 -0
- package/dist/reconciler/types.d.ts.map +1 -0
- package/dist/reconciler/types.js.map +1 -0
- package/dist/reconciler/visibility.d.ts +6 -0
- package/dist/reconciler/visibility.d.ts.map +1 -0
- package/dist/reconciler/visibility.js +57 -0
- package/dist/reconciler/visibility.js.map +1 -0
- package/dist/reconciler/wrapper-apply.d.ts +6 -0
- package/dist/reconciler/wrapper-apply.d.ts.map +1 -0
- package/dist/reconciler/wrapper-apply.js +287 -0
- package/dist/reconciler/wrapper-apply.js.map +1 -0
- package/dist/reconciler/wrapper-content.d.ts +8 -0
- package/dist/reconciler/wrapper-content.d.ts.map +1 -0
- package/dist/reconciler/wrapper-content.js +19 -0
- package/dist/reconciler/wrapper-content.js.map +1 -0
- package/dist/reconciler/wrapper-node.d.ts +8 -0
- package/dist/reconciler/wrapper-node.d.ts.map +1 -0
- package/dist/reconciler/wrapper-node.js +4 -0
- package/dist/reconciler/wrapper-node.js.map +1 -0
- package/dist/reconciler/wrapper-protocol.d.ts +13 -0
- package/dist/reconciler/wrapper-protocol.d.ts.map +1 -0
- package/dist/reconciler/wrapper-protocol.js +20 -0
- package/dist/reconciler/wrapper-protocol.js.map +1 -0
- package/dist/utils/accessible-metadata.d.ts +5 -0
- package/dist/utils/accessible-metadata.d.ts.map +1 -0
- package/dist/utils/accessible-metadata.js +22 -0
- package/dist/utils/accessible-metadata.js.map +1 -0
- package/dist/utils/create-element-component.d.ts +4 -0
- package/dist/utils/create-element-component.d.ts.map +1 -0
- package/dist/utils/create-element-component.js +54 -0
- package/dist/utils/create-element-component.js.map +1 -0
- package/dist/utils/gtype.d.ts +16 -0
- package/dist/utils/gtype.d.ts.map +1 -0
- package/dist/utils/gtype.js +127 -0
- package/dist/utils/gtype.js.map +1 -0
- package/dist/utils/notify-name.d.ts +5 -0
- package/dist/utils/notify-name.d.ts.map +1 -0
- package/dist/utils/notify-name.js +6 -0
- package/dist/utils/notify-name.js.map +1 -0
- package/dist/utils/object-prop.d.ts +8 -0
- package/dist/utils/object-prop.d.ts.map +1 -0
- package/dist/utils/object-prop.js +9 -0
- package/dist/utils/object-prop.js.map +1 -0
- package/dist/utils/settings-accessor.d.ts +8 -0
- package/dist/utils/settings-accessor.d.ts.map +1 -0
- package/dist/utils/settings-accessor.js +69 -0
- package/dist/utils/settings-accessor.js.map +1 -0
- package/dist/utils/wrapper-node-jsx.d.ts +32 -0
- package/dist/utils/wrapper-node-jsx.d.ts.map +1 -0
- package/dist/utils/wrapper-node-jsx.js +2 -0
- package/dist/utils/wrapper-node-jsx.js.map +1 -0
- package/package.json +22 -8
- package/src/components/application.tsx +43 -0
- package/src/components/window.tsx +36 -0
- package/src/hooks/use-application.ts +17 -0
- package/src/hooks/use-bind-setting.ts +35 -0
- package/src/hooks/use-merge-refs.ts +53 -0
- package/src/hooks/use-object-attachment.ts +35 -0
- package/src/hooks/use-object-value.ts +50 -0
- package/src/hooks/use-parent-window.ts +9 -0
- package/src/hooks/use-property.ts +22 -0
- package/src/hooks/use-setting.ts +47 -0
- package/src/hooks/use-signal.ts +71 -0
- package/src/index.ts +15 -14
- package/src/internal.ts +24 -0
- package/src/libraries/adw/dialog.tsx +34 -0
- package/src/libraries/adw/index.ts +1 -0
- package/src/reconciler/accessible.ts +232 -0
- package/src/reconciler/apply-props.ts +117 -0
- package/src/reconciler/commit-flush.ts +13 -0
- package/src/reconciler/container-attach.ts +219 -0
- package/src/reconciler/content-rebuild.ts +19 -0
- package/src/reconciler/dispatch.ts +58 -0
- package/src/reconciler/element-prop-appliers.ts +110 -0
- package/src/reconciler/element-props.ts +192 -0
- package/src/reconciler/host-config.ts +405 -0
- package/src/reconciler/instance.ts +30 -0
- package/src/reconciler/label-text-rebuild.ts +26 -0
- package/src/reconciler/portal.ts +28 -0
- package/src/reconciler/reconciler-error-handler.ts +29 -0
- package/src/reconciler/reconciler-root.ts +57 -0
- package/src/reconciler/reconciler.ts +13 -0
- package/src/reconciler/render.ts +61 -0
- package/src/reconciler/root-element.ts +14 -0
- package/src/reconciler/signal-store.ts +103 -0
- package/src/reconciler/state.ts +72 -0
- package/src/reconciler/text-buffer-controller.ts +107 -0
- package/src/reconciler/text-buffer-rebuild.ts +12 -0
- package/src/reconciler/text-node.ts +13 -0
- package/src/reconciler/types.ts +6 -0
- package/src/reconciler/visibility.ts +52 -0
- package/src/reconciler/wrapper-apply.ts +308 -0
- package/src/reconciler/wrapper-content.ts +24 -0
- package/src/reconciler/wrapper-node.ts +8 -0
- package/src/reconciler/wrapper-protocol.ts +32 -0
- package/src/utils/accessible-metadata.ts +26 -0
- package/src/utils/create-element-component.ts +77 -0
- package/src/utils/gtype.ts +166 -0
- package/src/utils/notify-name.ts +10 -0
- package/src/utils/object-prop.ts +13 -0
- package/src/utils/settings-accessor.ts +89 -0
- package/src/utils/wrapper-node-jsx.ts +34 -0
- package/dist/components/compound.d.ts +0 -40
- package/dist/components/compound.d.ts.map +0 -1
- package/dist/components/compound.js +0 -46
- package/dist/components/compound.js.map +0 -1
- package/dist/components/list.d.ts +0 -75
- package/dist/components/list.d.ts.map +0 -1
- package/dist/components/list.js +0 -81
- package/dist/components/list.js.map +0 -1
- package/dist/components/slot-widget.d.ts +0 -15
- package/dist/components/slot-widget.d.ts.map +0 -1
- package/dist/components/slot-widget.js +0 -37
- package/dist/components/slot-widget.js.map +0 -1
- package/dist/errors.d.ts +0 -15
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -44
- package/dist/errors.js.map +0 -1
- package/dist/factory.d.ts +0 -5
- package/dist/factory.d.ts.map +0 -1
- package/dist/factory.js +0 -37
- package/dist/factory.js.map +0 -1
- package/dist/generated/compounds.d.ts +0 -2672
- package/dist/generated/compounds.d.ts.map +0 -1
- package/dist/generated/compounds.js +0 -2624
- package/dist/generated/compounds.js.map +0 -1
- package/dist/generated/internal.d.ts +0 -16
- package/dist/generated/internal.d.ts.map +0 -1
- package/dist/generated/internal.js +0 -3638
- package/dist/generated/internal.js.map +0 -1
- package/dist/generated/jsx.d.ts +0 -17074
- package/dist/generated/jsx.d.ts.map +0 -1
- package/dist/generated/jsx.js +0 -6715
- package/dist/generated/jsx.js.map +0 -1
- package/dist/generated/registry.d.ts +0 -5
- package/dist/generated/registry.d.ts.map +0 -1
- package/dist/generated/registry.js +0 -13
- package/dist/generated/registry.js.map +0 -1
- package/dist/host-config.d.ts +0 -24
- package/dist/host-config.d.ts.map +0 -1
- package/dist/host-config.js +0 -172
- package/dist/host-config.js.map +0 -1
- package/dist/jsx.d.ts +0 -974
- package/dist/jsx.d.ts.map +0 -1
- package/dist/jsx.js +0 -8
- package/dist/jsx.js.map +0 -1
- package/dist/metadata.d.ts +0 -5
- package/dist/metadata.d.ts.map +0 -1
- package/dist/metadata.js +0 -33
- package/dist/metadata.js.map +0 -1
- package/dist/node.d.ts +0 -25
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -85
- package/dist/node.js.map +0 -1
- package/dist/nodes/adjustable.d.ts +0 -11
- package/dist/nodes/adjustable.d.ts.map +0 -1
- package/dist/nodes/adjustable.js +0 -46
- package/dist/nodes/adjustable.js.map +0 -1
- package/dist/nodes/alert-dialog-response.d.ts +0 -15
- package/dist/nodes/alert-dialog-response.d.ts.map +0 -1
- package/dist/nodes/alert-dialog-response.js +0 -61
- package/dist/nodes/alert-dialog-response.js.map +0 -1
- package/dist/nodes/alert-dialog.d.ts +0 -14
- package/dist/nodes/alert-dialog.d.ts.map +0 -1
- package/dist/nodes/alert-dialog.js +0 -41
- package/dist/nodes/alert-dialog.js.map +0 -1
- package/dist/nodes/animation.d.ts +0 -39
- package/dist/nodes/animation.d.ts.map +0 -1
- package/dist/nodes/animation.js +0 -326
- package/dist/nodes/animation.js.map +0 -1
- package/dist/nodes/application.d.ts +0 -12
- package/dist/nodes/application.d.ts.map +0 -1
- package/dist/nodes/application.js +0 -51
- package/dist/nodes/application.js.map +0 -1
- package/dist/nodes/calendar.d.ts +0 -18
- package/dist/nodes/calendar.d.ts.map +0 -1
- package/dist/nodes/calendar.js +0 -28
- package/dist/nodes/calendar.js.map +0 -1
- package/dist/nodes/color-dialog-button.d.ts +0 -15
- package/dist/nodes/color-dialog-button.d.ts.map +0 -1
- package/dist/nodes/color-dialog-button.js +0 -43
- package/dist/nodes/color-dialog-button.js.map +0 -1
- package/dist/nodes/column-view-column.d.ts +0 -36
- package/dist/nodes/column-view-column.d.ts.map +0 -1
- package/dist/nodes/column-view-column.js +0 -168
- package/dist/nodes/column-view-column.js.map +0 -1
- package/dist/nodes/container-slot.d.ts +0 -18
- package/dist/nodes/container-slot.d.ts.map +0 -1
- package/dist/nodes/container-slot.js +0 -81
- package/dist/nodes/container-slot.js.map +0 -1
- package/dist/nodes/dialog.d.ts +0 -10
- package/dist/nodes/dialog.d.ts.map +0 -1
- package/dist/nodes/dialog.js +0 -20
- package/dist/nodes/dialog.js.map +0 -1
- package/dist/nodes/drawing-area.d.ts +0 -19
- package/dist/nodes/drawing-area.d.ts.map +0 -1
- package/dist/nodes/drawing-area.js +0 -40
- package/dist/nodes/drawing-area.js.map +0 -1
- package/dist/nodes/event-controller.d.ts +0 -15
- package/dist/nodes/event-controller.d.ts.map +0 -1
- package/dist/nodes/event-controller.js +0 -73
- package/dist/nodes/event-controller.js.map +0 -1
- package/dist/nodes/fixed-child.d.ts +0 -19
- package/dist/nodes/fixed-child.d.ts.map +0 -1
- package/dist/nodes/fixed-child.js +0 -99
- package/dist/nodes/fixed-child.js.map +0 -1
- package/dist/nodes/font-dialog-button.d.ts +0 -15
- package/dist/nodes/font-dialog-button.d.ts.map +0 -1
- package/dist/nodes/font-dialog-button.js +0 -76
- package/dist/nodes/font-dialog-button.js.map +0 -1
- package/dist/nodes/grid-child.d.ts +0 -19
- package/dist/nodes/grid-child.d.ts.map +0 -1
- package/dist/nodes/grid-child.js +0 -94
- package/dist/nodes/grid-child.js.map +0 -1
- package/dist/nodes/internal/accessible.d.ts +0 -5
- package/dist/nodes/internal/accessible.d.ts.map +0 -1
- package/dist/nodes/internal/accessible.js +0 -119
- package/dist/nodes/internal/accessible.js.map +0 -1
- package/dist/nodes/internal/bound-item.d.ts +0 -4
- package/dist/nodes/internal/bound-item.d.ts.map +0 -1
- package/dist/nodes/internal/bound-item.js +0 -2
- package/dist/nodes/internal/bound-item.js.map +0 -1
- package/dist/nodes/internal/construct.d.ts +0 -3
- package/dist/nodes/internal/construct.d.ts.map +0 -1
- package/dist/nodes/internal/construct.js +0 -44
- package/dist/nodes/internal/construct.js.map +0 -1
- package/dist/nodes/internal/predicates.d.ts +0 -51
- package/dist/nodes/internal/predicates.d.ts.map +0 -1
- package/dist/nodes/internal/predicates.js +0 -36
- package/dist/nodes/internal/predicates.js.map +0 -1
- package/dist/nodes/internal/props.d.ts +0 -6
- package/dist/nodes/internal/props.d.ts.map +0 -1
- package/dist/nodes/internal/props.js +0 -43
- package/dist/nodes/internal/props.js.map +0 -1
- package/dist/nodes/internal/signal-store.d.ts +0 -22
- package/dist/nodes/internal/signal-store.d.ts.map +0 -1
- package/dist/nodes/internal/signal-store.js +0 -98
- package/dist/nodes/internal/signal-store.js.map +0 -1
- package/dist/nodes/internal/text-buffer-controller.d.ts +0 -40
- package/dist/nodes/internal/text-buffer-controller.d.ts.map +0 -1
- package/dist/nodes/internal/text-buffer-controller.js +0 -327
- package/dist/nodes/internal/text-buffer-controller.js.map +0 -1
- package/dist/nodes/internal/widget.d.ts +0 -8
- package/dist/nodes/internal/widget.d.ts.map +0 -1
- package/dist/nodes/internal/widget.js +0 -68
- package/dist/nodes/internal/widget.js.map +0 -1
- package/dist/nodes/level-bar.d.ts +0 -12
- package/dist/nodes/level-bar.d.ts.map +0 -1
- package/dist/nodes/level-bar.js +0 -24
- package/dist/nodes/level-bar.js.map +0 -1
- package/dist/nodes/list-item-node.d.ts +0 -12
- package/dist/nodes/list-item-node.d.ts.map +0 -1
- package/dist/nodes/list-item-node.js +0 -45
- package/dist/nodes/list-item-node.js.map +0 -1
- package/dist/nodes/list.d.ts +0 -100
- package/dist/nodes/list.d.ts.map +0 -1
- package/dist/nodes/list.js +0 -950
- package/dist/nodes/list.js.map +0 -1
- package/dist/nodes/menu.d.ts +0 -7
- package/dist/nodes/menu.d.ts.map +0 -1
- package/dist/nodes/menu.js +0 -20
- package/dist/nodes/menu.js.map +0 -1
- package/dist/nodes/models/menu.d.ts +0 -47
- package/dist/nodes/models/menu.d.ts.map +0 -1
- package/dist/nodes/models/menu.js +0 -240
- package/dist/nodes/models/menu.js.map +0 -1
- package/dist/nodes/navigation-page.d.ts +0 -19
- package/dist/nodes/navigation-page.d.ts.map +0 -1
- package/dist/nodes/navigation-page.js +0 -129
- package/dist/nodes/navigation-page.js.map +0 -1
- package/dist/nodes/navigation-view.d.ts +0 -19
- package/dist/nodes/navigation-view.d.ts.map +0 -1
- package/dist/nodes/navigation-view.js +0 -51
- package/dist/nodes/navigation-view.js.map +0 -1
- package/dist/nodes/notebook-page-tab.d.ts +0 -15
- package/dist/nodes/notebook-page-tab.d.ts.map +0 -1
- package/dist/nodes/notebook-page-tab.js +0 -40
- package/dist/nodes/notebook-page-tab.js.map +0 -1
- package/dist/nodes/notebook-page.d.ts +0 -29
- package/dist/nodes/notebook-page.d.ts.map +0 -1
- package/dist/nodes/notebook-page.js +0 -151
- package/dist/nodes/notebook-page.js.map +0 -1
- package/dist/nodes/notebook.d.ts +0 -16
- package/dist/nodes/notebook.d.ts.map +0 -1
- package/dist/nodes/notebook.js +0 -31
- package/dist/nodes/notebook.js.map +0 -1
- package/dist/nodes/overlay-child.d.ts +0 -20
- package/dist/nodes/overlay-child.d.ts.map +0 -1
- package/dist/nodes/overlay-child.js +0 -109
- package/dist/nodes/overlay-child.js.map +0 -1
- package/dist/nodes/popover-menu.d.ts +0 -19
- package/dist/nodes/popover-menu.d.ts.map +0 -1
- package/dist/nodes/popover-menu.js +0 -54
- package/dist/nodes/popover-menu.js.map +0 -1
- package/dist/nodes/scale.d.ts +0 -10
- package/dist/nodes/scale.d.ts.map +0 -1
- package/dist/nodes/scale.js +0 -19
- package/dist/nodes/scale.js.map +0 -1
- package/dist/nodes/scrolled-window.d.ts +0 -11
- package/dist/nodes/scrolled-window.d.ts.map +0 -1
- package/dist/nodes/scrolled-window.js +0 -18
- package/dist/nodes/scrolled-window.js.map +0 -1
- package/dist/nodes/search-bar.d.ts +0 -11
- package/dist/nodes/search-bar.d.ts.map +0 -1
- package/dist/nodes/search-bar.js +0 -16
- package/dist/nodes/search-bar.js.map +0 -1
- package/dist/nodes/shortcut.d.ts +0 -19
- package/dist/nodes/shortcut.d.ts.map +0 -1
- package/dist/nodes/shortcut.js +0 -72
- package/dist/nodes/shortcut.js.map +0 -1
- package/dist/nodes/slot.d.ts +0 -21
- package/dist/nodes/slot.d.ts.map +0 -1
- package/dist/nodes/slot.js +0 -102
- package/dist/nodes/slot.js.map +0 -1
- package/dist/nodes/source-view.d.ts +0 -18
- package/dist/nodes/source-view.d.ts.map +0 -1
- package/dist/nodes/source-view.js +0 -94
- package/dist/nodes/source-view.js.map +0 -1
- package/dist/nodes/spin-row.d.ts +0 -14
- package/dist/nodes/spin-row.d.ts.map +0 -1
- package/dist/nodes/spin-row.js +0 -46
- package/dist/nodes/spin-row.js.map +0 -1
- package/dist/nodes/stack-page.d.ts +0 -22
- package/dist/nodes/stack-page.d.ts.map +0 -1
- package/dist/nodes/stack-page.js +0 -140
- package/dist/nodes/stack-page.js.map +0 -1
- package/dist/nodes/stack.d.ts +0 -13
- package/dist/nodes/stack.d.ts.map +0 -1
- package/dist/nodes/stack.js +0 -21
- package/dist/nodes/stack.js.map +0 -1
- package/dist/nodes/switch-row.d.ts +0 -11
- package/dist/nodes/switch-row.d.ts.map +0 -1
- package/dist/nodes/switch-row.js +0 -15
- package/dist/nodes/switch-row.js.map +0 -1
- package/dist/nodes/text-anchor.d.ts +0 -23
- package/dist/nodes/text-anchor.d.ts.map +0 -1
- package/dist/nodes/text-anchor.js +0 -74
- package/dist/nodes/text-anchor.js.map +0 -1
- package/dist/nodes/text-content.d.ts +0 -12
- package/dist/nodes/text-content.d.ts.map +0 -1
- package/dist/nodes/text-content.js +0 -2
- package/dist/nodes/text-content.js.map +0 -1
- package/dist/nodes/text-paintable.d.ts +0 -19
- package/dist/nodes/text-paintable.d.ts.map +0 -1
- package/dist/nodes/text-paintable.js +0 -42
- package/dist/nodes/text-paintable.js.map +0 -1
- package/dist/nodes/text-segment.d.ts +0 -18
- package/dist/nodes/text-segment.d.ts.map +0 -1
- package/dist/nodes/text-segment.js +0 -38
- package/dist/nodes/text-segment.js.map +0 -1
- package/dist/nodes/text-tag.d.ts +0 -38
- package/dist/nodes/text-tag.d.ts.map +0 -1
- package/dist/nodes/text-tag.js +0 -247
- package/dist/nodes/text-tag.js.map +0 -1
- package/dist/nodes/text-view.d.ts +0 -29
- package/dist/nodes/text-view.d.ts.map +0 -1
- package/dist/nodes/text-view.js +0 -80
- package/dist/nodes/text-view.js.map +0 -1
- package/dist/nodes/toggle-group.d.ts +0 -17
- package/dist/nodes/toggle-group.d.ts.map +0 -1
- package/dist/nodes/toggle-group.js +0 -65
- package/dist/nodes/toggle-group.js.map +0 -1
- package/dist/nodes/toggle.d.ts +0 -16
- package/dist/nodes/toggle.d.ts.map +0 -1
- package/dist/nodes/toggle.js +0 -61
- package/dist/nodes/toggle.js.map +0 -1
- package/dist/nodes/virtual.d.ts +0 -7
- package/dist/nodes/virtual.d.ts.map +0 -1
- package/dist/nodes/virtual.js +0 -9
- package/dist/nodes/virtual.js.map +0 -1
- package/dist/nodes/web-view.d.ts +0 -11
- package/dist/nodes/web-view.d.ts.map +0 -1
- package/dist/nodes/web-view.js +0 -16
- package/dist/nodes/web-view.js.map +0 -1
- package/dist/nodes/widget.d.ts +0 -26
- package/dist/nodes/widget.d.ts.map +0 -1
- package/dist/nodes/widget.js +0 -308
- package/dist/nodes/widget.js.map +0 -1
- package/dist/nodes/window.d.ts +0 -31
- package/dist/nodes/window.d.ts.map +0 -1
- package/dist/nodes/window.js +0 -122
- package/dist/nodes/window.js.map +0 -1
- package/dist/portal.d.ts +0 -29
- package/dist/portal.d.ts.map +0 -1
- package/dist/portal.js +0 -35
- package/dist/portal.js.map +0 -1
- package/dist/reconciler.d.ts +0 -34
- package/dist/reconciler.d.ts.map +0 -1
- package/dist/reconciler.js +0 -48
- package/dist/reconciler.js.map +0 -1
- package/dist/registry.d.ts +0 -18
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -98
- package/dist/registry.js.map +0 -1
- package/dist/render.d.ts +0 -117
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js +0 -159
- package/dist/render.js.map +0 -1
- package/dist/types.d.ts +0 -6
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/use-property.d.ts +0 -29
- package/dist/use-property.d.ts.map +0 -1
- package/dist/use-property.js +0 -44
- package/dist/use-property.js.map +0 -1
- package/dist/use-setting.d.ts +0 -36
- package/dist/use-setting.d.ts.map +0 -1
- package/dist/use-setting.js +0 -68
- package/dist/use-setting.js.map +0 -1
- package/src/components/compound.tsx +0 -57
- package/src/components/list.tsx +0 -140
- package/src/components/slot-widget.tsx +0 -46
- package/src/errors.ts +0 -53
- package/src/factory.ts +0 -62
- package/src/generated/compounds.ts +0 -2741
- package/src/generated/internal.ts +0 -3642
- package/src/generated/jsx.ts +0 -17383
- package/src/generated/registry.ts +0 -17
- package/src/host-config.ts +0 -219
- package/src/jsx.ts +0 -1033
- package/src/metadata.ts +0 -43
- package/src/node.ts +0 -107
- package/src/nodes/adjustable.ts +0 -68
- package/src/nodes/alert-dialog-response.ts +0 -78
- package/src/nodes/alert-dialog.ts +0 -55
- package/src/nodes/animation.ts +0 -409
- package/src/nodes/application.ts +0 -61
- package/src/nodes/calendar.ts +0 -42
- package/src/nodes/color-dialog-button.ts +0 -69
- package/src/nodes/column-view-column.ts +0 -189
- package/src/nodes/container-slot.ts +0 -100
- package/src/nodes/dialog.ts +0 -25
- package/src/nodes/drawing-area.ts +0 -53
- package/src/nodes/event-controller.ts +0 -96
- package/src/nodes/fixed-child.ts +0 -122
- package/src/nodes/font-dialog-button.ts +0 -107
- package/src/nodes/grid-child.ts +0 -116
- package/src/nodes/internal/accessible.ts +0 -155
- package/src/nodes/internal/bound-item.ts +0 -4
- package/src/nodes/internal/construct.ts +0 -60
- package/src/nodes/internal/predicates.ts +0 -80
- package/src/nodes/internal/props.ts +0 -51
- package/src/nodes/internal/signal-store.ts +0 -141
- package/src/nodes/internal/text-buffer-controller.ts +0 -417
- package/src/nodes/internal/widget.ts +0 -74
- package/src/nodes/level-bar.ts +0 -36
- package/src/nodes/list-item-node.ts +0 -53
- package/src/nodes/list.ts +0 -1082
- package/src/nodes/menu.ts +0 -27
- package/src/nodes/models/menu.ts +0 -314
- package/src/nodes/navigation-page.ts +0 -154
- package/src/nodes/navigation-view.ts +0 -66
- package/src/nodes/notebook-page-tab.ts +0 -55
- package/src/nodes/notebook-page.ts +0 -189
- package/src/nodes/notebook.ts +0 -42
- package/src/nodes/overlay-child.ts +0 -130
- package/src/nodes/popover-menu.ts +0 -67
- package/src/nodes/scale.ts +0 -28
- package/src/nodes/scrolled-window.ts +0 -23
- package/src/nodes/search-bar.ts +0 -27
- package/src/nodes/shortcut.ts +0 -86
- package/src/nodes/slot.ts +0 -138
- package/src/nodes/source-view.ts +0 -130
- package/src/nodes/spin-row.ts +0 -72
- package/src/nodes/stack-page.ts +0 -170
- package/src/nodes/stack.ts +0 -35
- package/src/nodes/switch-row.ts +0 -26
- package/src/nodes/text-anchor.ts +0 -88
- package/src/nodes/text-content.ts +0 -14
- package/src/nodes/text-paintable.ts +0 -51
- package/src/nodes/text-segment.ts +0 -55
- package/src/nodes/text-tag.ts +0 -298
- package/src/nodes/text-view.ts +0 -100
- package/src/nodes/toggle-group.ts +0 -81
- package/src/nodes/toggle.ts +0 -72
- package/src/nodes/virtual.ts +0 -16
- package/src/nodes/web-view.ts +0 -22
- package/src/nodes/widget.ts +0 -369
- package/src/nodes/window.ts +0 -172
- package/src/portal.ts +0 -37
- package/src/reconciler.ts +0 -52
- package/src/registry.ts +0 -119
- package/src/render.tsx +0 -192
- package/src/types.ts +0 -13
- package/src/use-property.ts +0 -58
- package/src/use-setting.ts +0 -96
- /package/dist/{types.js → reconciler/types.js} +0 -0
package/dist/reconciler.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import ReactReconciler from "react-reconciler";
|
|
2
|
-
import packageJson from "../package.json" with { type: "json" };
|
|
3
|
-
import { createHostConfig } from "./host-config.js";
|
|
4
|
-
/**
|
|
5
|
-
* Manages the React reconciler instance for GTKX.
|
|
6
|
-
*
|
|
7
|
-
* This class wraps the React Reconciler and handles initialization
|
|
8
|
-
* including DevTools integration for development environments.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
class Reconciler {
|
|
13
|
-
instance;
|
|
14
|
-
constructor() {
|
|
15
|
-
this.instance = ReactReconciler(createHostConfig());
|
|
16
|
-
this.injectDevTools();
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Returns the underlying React Reconciler instance.
|
|
20
|
-
*
|
|
21
|
-
* @returns The React Reconciler instance for direct reconciler operations
|
|
22
|
-
*/
|
|
23
|
-
getInstance() {
|
|
24
|
-
return this.instance;
|
|
25
|
-
}
|
|
26
|
-
injectDevTools() {
|
|
27
|
-
if (process.env.NODE_ENV === "production")
|
|
28
|
-
return;
|
|
29
|
-
this.instance.injectIntoDevTools({
|
|
30
|
-
bundleType: 1,
|
|
31
|
-
version: packageJson.version,
|
|
32
|
-
rendererPackageName: "@gtkx/react",
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* The GTKX React reconciler instance.
|
|
38
|
-
*
|
|
39
|
-
* Provides low-level access to the React reconciler for advanced use cases.
|
|
40
|
-
* Most applications should use {@link render} instead.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```tsx
|
|
44
|
-
* const instance = reconciler.getInstance();
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
export const reconciler = new Reconciler();
|
|
48
|
-
//# sourceMappingURL=reconciler.js.map
|
package/dist/reconciler.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reconciler.js","sourceRoot":"","sources":["../src/reconciler.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAA2B,MAAM,kBAAkB,CAAC;AAE7E;;;;;;;GAOG;AACH,MAAM,UAAU;IACJ,QAAQ,CAAqB;IAErC;QACI,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACH,WAAW;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAEO,cAAc;QAClB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;YAAE,OAAO;QAElD,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YAC7B,UAAU,EAAE,CAAC;YACb,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,mBAAmB,EAAE,aAAa;SACrC,CAAC,CAAC;IACP,CAAC;CACJ;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC"}
|
package/dist/registry.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as Adw from "@gtkx/ffi/adw";
|
|
2
|
-
import * as Gtk from "@gtkx/ffi/gtk";
|
|
3
|
-
import type { Node } from "./node.js";
|
|
4
|
-
export declare const AdjustableWidgets: readonly [typeof Gtk.SpinButton, typeof Gtk.ScaleButton, typeof Gtk.Range];
|
|
5
|
-
export type AdjustableWidget = InstanceType<(typeof AdjustableWidgets)[number]>;
|
|
6
|
-
export declare const StackWidgets: readonly [typeof Gtk.Stack, typeof Adw.ViewStack];
|
|
7
|
-
export type StackWidget = InstanceType<(typeof StackWidgets)[number]>;
|
|
8
|
-
export declare const PopoverMenuWidgets: readonly [typeof Gtk.PopoverMenu, typeof Gtk.PopoverMenuBar, typeof Gtk.MenuButton];
|
|
9
|
-
export type PopoverMenuWidget = InstanceType<(typeof PopoverMenuWidgets)[number]>;
|
|
10
|
-
export type NodeClass = (new (...args: any[]) => Node) & {
|
|
11
|
-
createContainer(...args: any[]): unknown;
|
|
12
|
-
};
|
|
13
|
-
type ClassKey = new (...args: any[]) => any;
|
|
14
|
-
type RegistryKey = string | ClassKey | readonly (string | ClassKey)[];
|
|
15
|
-
type NodeRegistryEntry = [RegistryKey, NodeClass];
|
|
16
|
-
export declare const NODE_REGISTRY: NodeRegistryEntry[];
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=registry.d.ts.map
|
package/dist/registry.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AAGrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA+CtC,eAAO,MAAM,iBAAiB,4EAAwD,CAAC;AACvF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEhF,eAAO,MAAM,YAAY,mDAAsC,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEtE,eAAO,MAAM,kBAAkB,qFAAiE,CAAC;AACjG,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAElF,MAAM,MAAM,SAAS,GAAG,CAAC,KAErB,GAAG,IAAI,EAAE,GAAG,EAAE,KACb,IAAI,CAAC,GAAG;IAET,eAAe,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;CAC5C,CAAC;AAGF,KAAK,QAAQ,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAC5C,KAAK,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC;AACtE,KAAK,iBAAiB,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,aAAa,EAAE,iBAAiB,EA6C5C,CAAC"}
|
package/dist/registry.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import * as Adw from "@gtkx/ffi/adw";
|
|
2
|
-
import * as Gtk from "@gtkx/ffi/gtk";
|
|
3
|
-
import * as GtkSource from "@gtkx/ffi/gtksource";
|
|
4
|
-
import * as WebKit from "@gtkx/ffi/webkit";
|
|
5
|
-
import { AdjustableNode } from "./nodes/adjustable.js";
|
|
6
|
-
import { AlertDialogNode } from "./nodes/alert-dialog.js";
|
|
7
|
-
import { AnimationNode } from "./nodes/animation.js";
|
|
8
|
-
import { ApplicationNode } from "./nodes/application.js";
|
|
9
|
-
import { CalendarNode } from "./nodes/calendar.js";
|
|
10
|
-
import { ColorDialogButtonNode } from "./nodes/color-dialog-button.js";
|
|
11
|
-
import { ColumnViewColumnNode } from "./nodes/column-view-column.js";
|
|
12
|
-
import { ContainerSlotNode } from "./nodes/container-slot.js";
|
|
13
|
-
import { DialogNode } from "./nodes/dialog.js";
|
|
14
|
-
import { DrawingAreaNode } from "./nodes/drawing-area.js";
|
|
15
|
-
import { EventControllerNode } from "./nodes/event-controller.js";
|
|
16
|
-
import { FixedChildNode } from "./nodes/fixed-child.js";
|
|
17
|
-
import { FontDialogButtonNode } from "./nodes/font-dialog-button.js";
|
|
18
|
-
import { GridChildNode } from "./nodes/grid-child.js";
|
|
19
|
-
import { LevelBarNode } from "./nodes/level-bar.js";
|
|
20
|
-
import { ListNode } from "./nodes/list.js";
|
|
21
|
-
import { ListItemNode } from "./nodes/list-item-node.js";
|
|
22
|
-
import { MenuNode } from "./nodes/menu.js";
|
|
23
|
-
import { NavigationPageNode } from "./nodes/navigation-page.js";
|
|
24
|
-
import { NavigationViewNode } from "./nodes/navigation-view.js";
|
|
25
|
-
import { NotebookNode } from "./nodes/notebook.js";
|
|
26
|
-
import { NotebookPageNode } from "./nodes/notebook-page.js";
|
|
27
|
-
import { NotebookPageTabNode } from "./nodes/notebook-page-tab.js";
|
|
28
|
-
import { OverlayChildNode } from "./nodes/overlay-child.js";
|
|
29
|
-
import { PopoverMenuNode } from "./nodes/popover-menu.js";
|
|
30
|
-
import { ScaleNode } from "./nodes/scale.js";
|
|
31
|
-
import { ScrolledWindowNode } from "./nodes/scrolled-window.js";
|
|
32
|
-
import { SearchBarNode } from "./nodes/search-bar.js";
|
|
33
|
-
import { ShortcutNode } from "./nodes/shortcut.js";
|
|
34
|
-
import { SlotNode } from "./nodes/slot.js";
|
|
35
|
-
import { SourceViewNode } from "./nodes/source-view.js";
|
|
36
|
-
import { SpinRowNode } from "./nodes/spin-row.js";
|
|
37
|
-
import { StackNode } from "./nodes/stack.js";
|
|
38
|
-
import { StackPageNode } from "./nodes/stack-page.js";
|
|
39
|
-
import { SwitchRowNode } from "./nodes/switch-row.js";
|
|
40
|
-
import { TextAnchorNode } from "./nodes/text-anchor.js";
|
|
41
|
-
import { TextPaintableNode } from "./nodes/text-paintable.js";
|
|
42
|
-
import { TextSegmentNode } from "./nodes/text-segment.js";
|
|
43
|
-
import { TextTagNode } from "./nodes/text-tag.js";
|
|
44
|
-
import { TextViewNode } from "./nodes/text-view.js";
|
|
45
|
-
import { ToggleGroupNode } from "./nodes/toggle-group.js";
|
|
46
|
-
import { WebViewNode } from "./nodes/web-view.js";
|
|
47
|
-
import { WidgetNode } from "./nodes/widget.js";
|
|
48
|
-
import { WindowNode } from "./nodes/window.js";
|
|
49
|
-
export const AdjustableWidgets = [Gtk.SpinButton, Gtk.ScaleButton, Gtk.Range];
|
|
50
|
-
export const StackWidgets = [Gtk.Stack, Adw.ViewStack];
|
|
51
|
-
export const PopoverMenuWidgets = [Gtk.PopoverMenu, Gtk.PopoverMenuBar, Gtk.MenuButton];
|
|
52
|
-
export const NODE_REGISTRY = [
|
|
53
|
-
["ContainerSlot", ContainerSlotNode],
|
|
54
|
-
[["AdwTimedAnimation", "AdwSpringAnimation"], AnimationNode],
|
|
55
|
-
["ColumnViewColumn", ColumnViewColumnNode],
|
|
56
|
-
["FixedChild", FixedChildNode],
|
|
57
|
-
["GridChild", GridChildNode],
|
|
58
|
-
[["MenuItem", "MenuSection", "MenuSubmenu"], MenuNode],
|
|
59
|
-
["NavigationPage", NavigationPageNode],
|
|
60
|
-
["NotebookPage", NotebookPageNode],
|
|
61
|
-
["NotebookPageTab", NotebookPageTabNode],
|
|
62
|
-
["OverlayChild", OverlayChildNode],
|
|
63
|
-
["Shortcut", ShortcutNode],
|
|
64
|
-
["Slot", SlotNode],
|
|
65
|
-
["StackPage", StackPageNode],
|
|
66
|
-
["TextAnchor", TextAnchorNode],
|
|
67
|
-
["TextPaintable", TextPaintableNode],
|
|
68
|
-
["TextSegment", TextSegmentNode],
|
|
69
|
-
["TextTag", TextTagNode],
|
|
70
|
-
[Gtk.Application, ApplicationNode],
|
|
71
|
-
[Gtk.EventController, EventControllerNode],
|
|
72
|
-
[GtkSource.View, SourceViewNode],
|
|
73
|
-
[Gtk.TextView, TextViewNode],
|
|
74
|
-
[WebKit.WebView, WebViewNode],
|
|
75
|
-
[Adw.AlertDialog, AlertDialogNode],
|
|
76
|
-
[Adw.Dialog, DialogNode],
|
|
77
|
-
[Gtk.Window, WindowNode],
|
|
78
|
-
[Adw.SpinRow, SpinRowNode],
|
|
79
|
-
[Adw.SwitchRow, SwitchRowNode],
|
|
80
|
-
[Gtk.Scale, ScaleNode],
|
|
81
|
-
[Gtk.LevelBar, LevelBarNode],
|
|
82
|
-
[Gtk.ScrolledWindow, ScrolledWindowNode],
|
|
83
|
-
[Gtk.Calendar, CalendarNode],
|
|
84
|
-
[Gtk.ColorDialogButton, ColorDialogButtonNode],
|
|
85
|
-
[Gtk.FontDialogButton, FontDialogButtonNode],
|
|
86
|
-
[Gtk.DrawingArea, DrawingAreaNode],
|
|
87
|
-
[Gtk.SearchBar, SearchBarNode],
|
|
88
|
-
[Adw.NavigationView, NavigationViewNode],
|
|
89
|
-
[Adw.ToggleGroup, ToggleGroupNode],
|
|
90
|
-
[Gtk.Notebook, NotebookNode],
|
|
91
|
-
[StackWidgets, StackNode],
|
|
92
|
-
[[Gtk.ListView, Gtk.ColumnView, Gtk.GridView, Gtk.DropDown, Adw.ComboRow], ListNode],
|
|
93
|
-
[PopoverMenuWidgets, PopoverMenuNode],
|
|
94
|
-
[AdjustableWidgets, AdjustableNode],
|
|
95
|
-
[[Gtk.ListItem, Gtk.ListHeader], ListItemNode],
|
|
96
|
-
[Gtk.Widget, WidgetNode],
|
|
97
|
-
];
|
|
98
|
-
//# sourceMappingURL=registry.js.map
|
package/dist/registry.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE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AAC,gBAAgB,EAAE,oBAAoB,CAAC;IAC5C,CAAC,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC;IAClC,CAAC,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC;IAC9B,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;IACxC,CAAC,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC;IAClC,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC;IAC5B,CAAC,YAAY,EAAE,SAAS,CAAC;IACzB,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpF,CAAC,kBAAkB,EAAE,eAAe,CAAC;IACrC,CAAC,iBAAiB,EAAE,cAAc,CAAC;IACnC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC;IAC9C,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC;CAC3B,CAAC"}
|
package/dist/render.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type * as Gio from "@gtkx/ffi/gio";
|
|
2
|
-
import type * as Gtk from "@gtkx/ffi/gtk";
|
|
3
|
-
import { type ReactNode } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* React Context providing access to the GTK Application instance.
|
|
6
|
-
*
|
|
7
|
-
* Use {@link useApplication} to access the application in components.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* const App = () => {
|
|
12
|
-
* const app = useApplication();
|
|
13
|
-
* console.log(app.applicationId);
|
|
14
|
-
* return <GtkLabel label="Hello" />;
|
|
15
|
-
* };
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const ApplicationContext: React.Context<Gtk.Application | null>;
|
|
19
|
-
/**
|
|
20
|
-
* Hook to access the GTK Application instance.
|
|
21
|
-
*
|
|
22
|
-
* Must be called within a component rendered by {@link render}.
|
|
23
|
-
* Throws an error if called outside the application context.
|
|
24
|
-
*
|
|
25
|
-
* @returns The GTK Application instance
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* const MyComponent = () => {
|
|
30
|
-
* const app = useApplication();
|
|
31
|
-
* return <GtkLabel label={app.applicationId} />;
|
|
32
|
-
* };
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @see {@link ApplicationContext} for the underlying context
|
|
36
|
-
*/
|
|
37
|
-
export declare const useApplication: () => Gtk.Application;
|
|
38
|
-
/**
|
|
39
|
-
* Sets the hot reloading state.
|
|
40
|
-
*
|
|
41
|
-
* Used internally by the dev server to prevent quit() from closing
|
|
42
|
-
* the application during HMR updates.
|
|
43
|
-
*
|
|
44
|
-
* @internal
|
|
45
|
-
*/
|
|
46
|
-
export declare const setHotReloading: (value: boolean) => void;
|
|
47
|
-
/**
|
|
48
|
-
* Renders a React element tree into a GTK4 application window.
|
|
49
|
-
*
|
|
50
|
-
* This is the main entry point for GTKX applications. It initializes the GTK4
|
|
51
|
-
* runtime, creates an application container, and begins the React reconciliation
|
|
52
|
-
* process.
|
|
53
|
-
*
|
|
54
|
-
* @param element - The root React element to render
|
|
55
|
-
* @param appId - Application ID in reverse domain notation (e.g., "com.example.myapp")
|
|
56
|
-
* @param flags - Optional GIO application flags for customizing behavior
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```tsx
|
|
60
|
-
* import { render, quit } from "@gtkx/react";
|
|
61
|
-
*
|
|
62
|
-
* const App = () => (
|
|
63
|
-
* <GtkApplicationWindow title="My App" onClose={quit}>
|
|
64
|
-
* <GtkLabel label="Hello, GTKX!" />
|
|
65
|
-
* </GtkApplicationWindow>
|
|
66
|
-
* );
|
|
67
|
-
*
|
|
68
|
-
* render(<App />, "com.example.myapp");
|
|
69
|
-
* ```
|
|
70
|
-
*
|
|
71
|
-
* @see {@link quit} for shutting down the application
|
|
72
|
-
* @see {@link update} for hot-reloading the rendered tree
|
|
73
|
-
*/
|
|
74
|
-
export declare const render: (element: ReactNode, appId: string, flags?: Gio.ApplicationFlags) => void;
|
|
75
|
-
/**
|
|
76
|
-
* Updates the rendered React element tree.
|
|
77
|
-
*
|
|
78
|
-
* Used primarily for hot module replacement (HMR) during development.
|
|
79
|
-
* Replaces the current component tree with a new element without
|
|
80
|
-
* reinitializing the GTK application.
|
|
81
|
-
*
|
|
82
|
-
* @param element - The new root React element to render
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* ```tsx
|
|
86
|
-
* // In HMR handler
|
|
87
|
-
* if (import.meta.hot) {
|
|
88
|
-
* import.meta.hot.accept(() => {
|
|
89
|
-
* update(<App />);
|
|
90
|
-
* });
|
|
91
|
-
* }
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* @see {@link render} for initial rendering
|
|
95
|
-
*/
|
|
96
|
-
export declare const update: (element: ReactNode) => Promise<void>;
|
|
97
|
-
/**
|
|
98
|
-
* Gracefully shuts down the GTK application.
|
|
99
|
-
*
|
|
100
|
-
* Unmounts the React component tree and stops the GTK main loop.
|
|
101
|
-
* Typically used as the `onClose` handler for the application window.
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* ```tsx
|
|
105
|
-
* import { quit } from "@gtkx/react";
|
|
106
|
-
*
|
|
107
|
-
* const App = () => (
|
|
108
|
-
* <GtkApplicationWindow title="My App" onClose={quit}>
|
|
109
|
-
* <GtkButton label="Quit" onClicked={quit} />
|
|
110
|
-
* </GtkApplicationWindow>
|
|
111
|
-
* );
|
|
112
|
-
* ```
|
|
113
|
-
*
|
|
114
|
-
* @see {@link render} for starting the application
|
|
115
|
-
*/
|
|
116
|
-
export declare const quit: () => void;
|
|
117
|
-
//# sourceMappingURL=render.d.ts.map
|
package/dist/render.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,GAAG,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,KAAK,GAAG,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAiB,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAKlE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,uCAA8C,CAAC;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc,QAAO,GAAG,CAAC,WAQrC,CAAC;AAMF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,IAEhD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,MAAM,GAAI,SAAS,SAAS,EAAE,OAAO,MAAM,EAAE,QAAQ,GAAG,CAAC,gBAAgB,KAAG,IA+BxF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,MAAM,GAAI,SAAS,SAAS,KAAG,OAAO,CAAC,IAAI,CAWvD,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,QAAO,IAUvB,CAAC"}
|
package/dist/render.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { start, stop } from "@gtkx/ffi";
|
|
3
|
-
import { createContext, useContext } from "react";
|
|
4
|
-
import { formatBoundaryError, formatRenderError } from "./errors.js";
|
|
5
|
-
import { getSignalStore } from "./nodes/internal/signal-store.js";
|
|
6
|
-
import { reconciler } from "./reconciler.js";
|
|
7
|
-
/**
|
|
8
|
-
* React Context providing access to the GTK Application instance.
|
|
9
|
-
*
|
|
10
|
-
* Use {@link useApplication} to access the application in components.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* const App = () => {
|
|
15
|
-
* const app = useApplication();
|
|
16
|
-
* console.log(app.applicationId);
|
|
17
|
-
* return <GtkLabel label="Hello" />;
|
|
18
|
-
* };
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export const ApplicationContext = createContext(null);
|
|
22
|
-
/**
|
|
23
|
-
* Hook to access the GTK Application instance.
|
|
24
|
-
*
|
|
25
|
-
* Must be called within a component rendered by {@link render}.
|
|
26
|
-
* Throws an error if called outside the application context.
|
|
27
|
-
*
|
|
28
|
-
* @returns The GTK Application instance
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```tsx
|
|
32
|
-
* const MyComponent = () => {
|
|
33
|
-
* const app = useApplication();
|
|
34
|
-
* return <GtkLabel label={app.applicationId} />;
|
|
35
|
-
* };
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* @see {@link ApplicationContext} for the underlying context
|
|
39
|
-
*/
|
|
40
|
-
export const useApplication = () => {
|
|
41
|
-
const context = useContext(ApplicationContext);
|
|
42
|
-
if (!context) {
|
|
43
|
-
throw new Error("Expected ApplicationContext: useApplication must be called within Application");
|
|
44
|
-
}
|
|
45
|
-
return context;
|
|
46
|
-
};
|
|
47
|
-
let container = null;
|
|
48
|
-
let app = null;
|
|
49
|
-
let isHotReloading = false;
|
|
50
|
-
/**
|
|
51
|
-
* Sets the hot reloading state.
|
|
52
|
-
*
|
|
53
|
-
* Used internally by the dev server to prevent quit() from closing
|
|
54
|
-
* the application during HMR updates.
|
|
55
|
-
*
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
export const setHotReloading = (value) => {
|
|
59
|
-
isHotReloading = value;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Renders a React element tree into a GTK4 application window.
|
|
63
|
-
*
|
|
64
|
-
* This is the main entry point for GTKX applications. It initializes the GTK4
|
|
65
|
-
* runtime, creates an application container, and begins the React reconciliation
|
|
66
|
-
* process.
|
|
67
|
-
*
|
|
68
|
-
* @param element - The root React element to render
|
|
69
|
-
* @param appId - Application ID in reverse domain notation (e.g., "com.example.myapp")
|
|
70
|
-
* @param flags - Optional GIO application flags for customizing behavior
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```tsx
|
|
74
|
-
* import { render, quit } from "@gtkx/react";
|
|
75
|
-
*
|
|
76
|
-
* const App = () => (
|
|
77
|
-
* <GtkApplicationWindow title="My App" onClose={quit}>
|
|
78
|
-
* <GtkLabel label="Hello, GTKX!" />
|
|
79
|
-
* </GtkApplicationWindow>
|
|
80
|
-
* );
|
|
81
|
-
*
|
|
82
|
-
* render(<App />, "com.example.myapp");
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* @see {@link quit} for shutting down the application
|
|
86
|
-
* @see {@link update} for hot-reloading the rendered tree
|
|
87
|
-
*/
|
|
88
|
-
export const render = (element, appId, flags) => {
|
|
89
|
-
const application = start(appId, flags);
|
|
90
|
-
app = application;
|
|
91
|
-
const instance = reconciler.getInstance();
|
|
92
|
-
container = instance.createContainer(application, 1, null, false, null, "", (error) => {
|
|
93
|
-
getSignalStore(application).forceUnblockAll();
|
|
94
|
-
throw formatRenderError(error);
|
|
95
|
-
}, (error) => {
|
|
96
|
-
getSignalStore(application).forceUnblockAll();
|
|
97
|
-
const formattedError = formatBoundaryError(error);
|
|
98
|
-
console.error(formattedError.toString());
|
|
99
|
-
}, () => { }, () => { });
|
|
100
|
-
instance.updateContainer(_jsx(ApplicationContext.Provider, { value: application, children: element }), container, null, () => { });
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* Updates the rendered React element tree.
|
|
104
|
-
*
|
|
105
|
-
* Used primarily for hot module replacement (HMR) during development.
|
|
106
|
-
* Replaces the current component tree with a new element without
|
|
107
|
-
* reinitializing the GTK application.
|
|
108
|
-
*
|
|
109
|
-
* @param element - The new root React element to render
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* ```tsx
|
|
113
|
-
* // In HMR handler
|
|
114
|
-
* if (import.meta.hot) {
|
|
115
|
-
* import.meta.hot.accept(() => {
|
|
116
|
-
* update(<App />);
|
|
117
|
-
* });
|
|
118
|
-
* }
|
|
119
|
-
* ```
|
|
120
|
-
*
|
|
121
|
-
* @see {@link render} for initial rendering
|
|
122
|
-
*/
|
|
123
|
-
export const update = (element) => {
|
|
124
|
-
return new Promise((resolve) => {
|
|
125
|
-
reconciler
|
|
126
|
-
.getInstance()
|
|
127
|
-
.updateContainer(_jsx(ApplicationContext.Provider, { value: app, children: element }), container, null, resolve);
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* Gracefully shuts down the GTK application.
|
|
132
|
-
*
|
|
133
|
-
* Unmounts the React component tree and stops the GTK main loop.
|
|
134
|
-
* Typically used as the `onClose` handler for the application window.
|
|
135
|
-
*
|
|
136
|
-
* @example
|
|
137
|
-
* ```tsx
|
|
138
|
-
* import { quit } from "@gtkx/react";
|
|
139
|
-
*
|
|
140
|
-
* const App = () => (
|
|
141
|
-
* <GtkApplicationWindow title="My App" onClose={quit}>
|
|
142
|
-
* <GtkButton label="Quit" onClicked={quit} />
|
|
143
|
-
* </GtkApplicationWindow>
|
|
144
|
-
* );
|
|
145
|
-
* ```
|
|
146
|
-
*
|
|
147
|
-
* @see {@link render} for starting the application
|
|
148
|
-
*/
|
|
149
|
-
export const quit = () => {
|
|
150
|
-
if (isHotReloading) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
reconciler.getInstance().updateContainer(null, container, null, () => {
|
|
154
|
-
setTimeout(() => {
|
|
155
|
-
stop();
|
|
156
|
-
}, 0);
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
//# sourceMappingURL=render.js.map
|
package/dist/render.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.tsx"],"names":[],"mapp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AAE,IAAI,EAAE,GAAG,EAAE;QACjE,UAAU,CAAC,GAAG,EAAE;YACZ,IAAI,EAAE,CAAC;QACX,CAAC,EAAE,CAAC,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type * as Gtk from "@gtkx/ffi/gtk";
|
|
2
|
-
/** @internal */
|
|
3
|
-
export type Container = Gtk.Widget | Gtk.Application | Gtk.EventController | Gtk.ListItem | Gtk.ListHeader;
|
|
4
|
-
export type Props = Record<string, unknown>;
|
|
5
|
-
export type ContainerClass = typeof Gtk.Widget | typeof Gtk.Application | typeof Gtk.EventController | typeof Gtk.ListItem | typeof Gtk.ListHeader;
|
|
6
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,eAAe,CAAC;AAE1C,gBAAgB;AAChB,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,eAAe,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC;AAE3G,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5C,MAAM,MAAM,cAAc,GACpB,OAAO,GAAG,CAAC,MAAM,GACjB,OAAO,GAAG,CAAC,WAAW,GACtB,OAAO,GAAG,CAAC,eAAe,GAC1B,OAAO,GAAG,CAAC,QAAQ,GACnB,OAAO,GAAG,CAAC,UAAU,CAAC"}
|
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/dist/use-property.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as GObject from "@gtkx/ffi/gobject";
|
|
2
|
-
type ReadableKey<T> = {
|
|
3
|
-
[K in keyof T]: K extends string ? (T[K] extends (...args: unknown[]) => unknown ? never : K) : never;
|
|
4
|
-
}[keyof T];
|
|
5
|
-
/**
|
|
6
|
-
* Subscribes to a GObject property and returns its current value as React state.
|
|
7
|
-
*
|
|
8
|
-
* Connects to the `notify::property-name` signal on `obj` and re-renders
|
|
9
|
-
* whenever the property changes. The initial value is read synchronously
|
|
10
|
-
* at mount time. Disconnects automatically on unmount or when inputs change.
|
|
11
|
-
*
|
|
12
|
-
* When `obj` is `null` or `undefined`, the hook is inactive and returns
|
|
13
|
-
* `undefined`. This allows safe usage with nullable objects without
|
|
14
|
-
* violating React's rules of hooks.
|
|
15
|
-
*
|
|
16
|
-
* @param obj - The GObject instance to observe, or null/undefined to disable
|
|
17
|
-
* @param propertyName - The property name matching an ES6 accessor on the object
|
|
18
|
-
* @returns The current property value, or undefined when obj is null/undefined
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* const app = useApplication();
|
|
23
|
-
* const activeWindow = useProperty(app, "activeWindow");
|
|
24
|
-
* const title = useProperty(activeWindow, "title");
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export declare function useProperty<T extends GObject.Object, K extends ReadableKey<T>>(obj: T | null | undefined, propertyName: K): T[K] | undefined;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=use-property.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-property.d.ts","sourceRoot":"","sources":["../src/use-property.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAG7C,KAAK,WAAW,CAAC,CAAC,IAAI;KACjB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,KAAK;CACxG,CAAC,MAAM,CAAC,CAAC,CAAC;AAKX;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,EAAE,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,EAC1E,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACzB,YAAY,EAAE,CAAC,GAChB,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAsBlB"}
|
package/dist/use-property.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as GObject from "@gtkx/ffi/gobject";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
const toKebabCase = (str) => str.replace(/[A-Z]/g, (c, i) => (i === 0 ? c.toLowerCase() : `-${c.toLowerCase()}`));
|
|
4
|
-
/**
|
|
5
|
-
* Subscribes to a GObject property and returns its current value as React state.
|
|
6
|
-
*
|
|
7
|
-
* Connects to the `notify::property-name` signal on `obj` and re-renders
|
|
8
|
-
* whenever the property changes. The initial value is read synchronously
|
|
9
|
-
* at mount time. Disconnects automatically on unmount or when inputs change.
|
|
10
|
-
*
|
|
11
|
-
* When `obj` is `null` or `undefined`, the hook is inactive and returns
|
|
12
|
-
* `undefined`. This allows safe usage with nullable objects without
|
|
13
|
-
* violating React's rules of hooks.
|
|
14
|
-
*
|
|
15
|
-
* @param obj - The GObject instance to observe, or null/undefined to disable
|
|
16
|
-
* @param propertyName - The property name matching an ES6 accessor on the object
|
|
17
|
-
* @returns The current property value, or undefined when obj is null/undefined
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```tsx
|
|
21
|
-
* const app = useApplication();
|
|
22
|
-
* const activeWindow = useProperty(app, "activeWindow");
|
|
23
|
-
* const title = useProperty(activeWindow, "title");
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export function useProperty(obj, propertyName) {
|
|
27
|
-
const [value, setValue] = useState(() => (obj ? obj[propertyName] : undefined));
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (!obj) {
|
|
30
|
-
setValue(undefined);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
setValue(obj[propertyName]);
|
|
34
|
-
const signal = `notify::${toKebabCase(propertyName)}`;
|
|
35
|
-
const handlerId = obj.connect(signal, () => {
|
|
36
|
-
setValue(obj[propertyName]);
|
|
37
|
-
});
|
|
38
|
-
return () => {
|
|
39
|
-
GObject.signalHandlerDisconnect(obj, handlerId);
|
|
40
|
-
};
|
|
41
|
-
}, [obj, propertyName]);
|
|
42
|
-
return value;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=use-property.js.map
|
package/dist/use-property.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-property.js","sourceRoot":"","sources":["../src/use-property.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAM5C,MAAM,WAAW,GAAG,CAAC,GAAW,EAAU,EAAE,CACxC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,WAAW,CACvB,GAAyB,EACzB,YAAe;IAEf,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAmB,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAE,GAAG,CAAC,YAAY,CAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAE5G,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,QAAQ,CAAC,SAAS,CAAC,CAAC;YACpB,OAAO;QACX,CAAC;QAED,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAS,CAAC,CAAC;QAEpC,MAAM,MAAM,GAAG,WAAW,WAAW,CAAC,YAAsB,CAAC,EAAE,CAAC;QAChE,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE;YACvC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAS,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACR,OAAO,CAAC,uBAAuB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACpD,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC;IAExB,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
package/dist/use-setting.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
interface SettingTypeMap {
|
|
2
|
-
boolean: boolean;
|
|
3
|
-
int: number;
|
|
4
|
-
double: number;
|
|
5
|
-
string: string;
|
|
6
|
-
strv: string[];
|
|
7
|
-
}
|
|
8
|
-
type SettingType = keyof SettingTypeMap;
|
|
9
|
-
/**
|
|
10
|
-
* Subscribes to a GSettings key and returns its current value alongside a
|
|
11
|
-
* setter, similar to `useState`.
|
|
12
|
-
*
|
|
13
|
-
* Creates a `Gio.Settings` instance for the given schema (stable across
|
|
14
|
-
* re-renders), connects to `changed::key`, and re-renders whenever the
|
|
15
|
-
* setting changes. The initial value is read synchronously at mount time.
|
|
16
|
-
* Calling the returned setter writes the new value to GSettings, which in
|
|
17
|
-
* turn triggers a re-render through the `changed` signal.
|
|
18
|
-
*
|
|
19
|
-
* @param schemaId - The GSettings schema ID (e.g. `"org.gnome.desktop.interface"`)
|
|
20
|
-
* @param key - The settings key in kebab-case (e.g. `"color-scheme"`)
|
|
21
|
-
* @param type - The value type, used to select the appropriate GSettings getter/setter
|
|
22
|
-
* @returns A `[value, setValue]` tuple kept in sync with the GSettings backend
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```tsx
|
|
26
|
-
* const [colorScheme, setColorScheme] = useSetting("org.gnome.desktop.interface", "color-scheme", "string");
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```tsx
|
|
31
|
-
* const [fontSize, setFontSize] = useSetting("com.example.myapp", "font-size", "int");
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function useSetting<T extends SettingType>(schemaId: string, key: string, type: T): [SettingTypeMap[T], (value: SettingTypeMap[T]) => void];
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=use-setting.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-setting.d.ts","sourceRoot":"","sources":["../src/use-setting.ts"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,KAAK,WAAW,GAAG,MAAM,cAAc,CAAC;AA8BxC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,WAAW,EAC5C,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,GACR,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAwBzD"}
|