@g9tm/lynxcontrols 2.3.0 → 2.4.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 +1 -0
- package/bin/g9lynx.mjs +103 -0
- package/bin/g9lynx.test.mjs +80 -0
- package/catalog/cards/DateTimeSheetBody.md +17 -0
- package/catalog/cards/G9ActionRow.md +11 -0
- package/catalog/cards/G9ActionSheet.md +14 -0
- package/catalog/cards/G9Activity.md +11 -0
- package/catalog/cards/G9ActivityIndicator.md +14 -0
- package/catalog/cards/G9AllocationInput.md +17 -0
- package/catalog/cards/G9Anchor.md +17 -0
- package/catalog/cards/G9AnimatedCheck.md +13 -0
- package/catalog/cards/G9AppBar.md +17 -0
- package/catalog/cards/G9AppShell.md +17 -0
- package/catalog/cards/G9Art.md +13 -0
- package/catalog/cards/G9Avatar.md +16 -0
- package/catalog/cards/G9Badge.md +15 -0
- package/catalog/cards/G9Bento.md +13 -0
- package/catalog/cards/G9Button.md +17 -0
- package/catalog/cards/G9CameFromMark.md +9 -0
- package/catalog/cards/G9Card.md +17 -0
- package/catalog/cards/G9CascadePanel.md +17 -0
- package/catalog/cards/G9CheckBox.md +17 -0
- package/catalog/cards/G9Chip.md +17 -0
- package/catalog/cards/G9ChipGroup.md +17 -0
- package/catalog/cards/G9ChoiceList.md +17 -0
- package/catalog/cards/G9Columns.md +13 -0
- package/catalog/cards/G9ComboBox.md +17 -0
- package/catalog/cards/G9CommandPalette.md +15 -0
- package/catalog/cards/G9Confetti.md +15 -0
- package/catalog/cards/G9ConnectionBanner.md +15 -0
- package/catalog/cards/G9ContextMenu.md +15 -0
- package/catalog/cards/G9CornerBadge.md +15 -0
- package/catalog/cards/G9CultureDateTimeLabel.md +16 -0
- package/catalog/cards/G9DateTimePicker.md +17 -0
- package/catalog/cards/G9DayStepper.md +17 -0
- package/catalog/cards/G9DeferredContent.md +17 -0
- package/catalog/cards/G9Delta.md +17 -0
- package/catalog/cards/G9DesignNode.md +13 -0
- package/catalog/cards/G9DesignScope.md +11 -0
- package/catalog/cards/G9DragList.md +15 -0
- package/catalog/cards/G9EdgePanel.md +17 -0
- package/catalog/cards/G9Editor.md +17 -0
- package/catalog/cards/G9EmptyState.md +17 -0
- package/catalog/cards/G9ErrorBoundary.md +13 -0
- package/catalog/cards/G9Expander.md +17 -0
- package/catalog/cards/G9FloatingOrb.md +17 -0
- package/catalog/cards/G9FormField.md +15 -0
- package/catalog/cards/G9HScroll.md +16 -0
- package/catalog/cards/G9HeaderActionButton.md +17 -0
- package/catalog/cards/G9HoldButton.md +17 -0
- package/catalog/cards/G9Host.md +17 -0
- package/catalog/cards/G9Icon.md +16 -0
- package/catalog/cards/G9IconButton.md +17 -0
- package/catalog/cards/G9IconRail.md +15 -0
- package/catalog/cards/G9IconSlot.md +17 -0
- package/catalog/cards/G9Image.md +17 -0
- package/catalog/cards/G9InlineMessage.md +16 -0
- package/catalog/cards/G9KeepAlive.md +11 -0
- package/catalog/cards/G9Keycap.md +13 -0
- package/catalog/cards/G9Kpi.md +17 -0
- package/catalog/cards/G9KpiGrid.md +12 -0
- package/catalog/cards/G9ListRow.md +17 -0
- package/catalog/cards/G9LiveBadge.md +11 -0
- package/catalog/cards/G9LiveDot.md +12 -0
- package/catalog/cards/G9LoadState.md +13 -0
- package/catalog/cards/G9LoadableSheetContent.md +17 -0
- package/catalog/cards/G9LockOverlay.md +15 -0
- package/catalog/cards/G9Menu.md +17 -0
- package/catalog/cards/G9MenuList.md +12 -0
- package/catalog/cards/G9NavCard.md +17 -0
- package/catalog/cards/G9NumPad.md +13 -0
- package/catalog/cards/G9NumberEntry.md +17 -0
- package/catalog/cards/G9OutlinedField.md +17 -0
- package/catalog/cards/G9OverlayRoot.md +12 -0
- package/catalog/cards/G9Page.md +17 -0
- package/catalog/cards/G9PageLoadingOverlay.md +12 -0
- package/catalog/cards/G9Pager.md +16 -0
- package/catalog/cards/G9Photo.md +17 -0
- package/catalog/cards/G9Picker.md +17 -0
- package/catalog/cards/G9PinEntry.md +17 -0
- package/catalog/cards/G9Place.md +17 -0
- package/catalog/cards/G9PlaceScroll.md +13 -0
- package/catalog/cards/G9PlusButton.md +17 -0
- package/catalog/cards/G9Popover.md +17 -0
- package/catalog/cards/G9PopupDragHandle.md +10 -0
- package/catalog/cards/G9PopupView.md +15 -0
- package/catalog/cards/G9Pressable.md +17 -0
- package/catalog/cards/G9ProcessingSheetContent.md +13 -0
- package/catalog/cards/G9ProgressBar.md +17 -0
- package/catalog/cards/G9ProgressRing.md +17 -0
- package/catalog/cards/G9Provider.md +17 -0
- package/catalog/cards/G9PullToRefresh.md +13 -0
- package/catalog/cards/G9RadioGroup.md +17 -0
- package/catalog/cards/G9RangeSlider.md +17 -0
- package/catalog/cards/G9RatingInput.md +17 -0
- package/catalog/cards/G9RevealText.md +15 -0
- package/catalog/cards/G9SafeButton.md +17 -0
- package/catalog/cards/G9SafeIconButton.md +17 -0
- package/catalog/cards/G9SaveBar.md +16 -0
- package/catalog/cards/G9ScaleInput.md +17 -0
- package/catalog/cards/G9ScrollSpyBar.md +12 -0
- package/catalog/cards/G9ScrollerScope.md +10 -0
- package/catalog/cards/G9SearchEntry.md +17 -0
- package/catalog/cards/G9Section.md +16 -0
- package/catalog/cards/G9SectionHeader.md +14 -0
- package/catalog/cards/G9Segmented.md +17 -0
- package/catalog/cards/G9Separator.md +17 -0
- package/catalog/cards/G9SettingsGroup.md +13 -0
- package/catalog/cards/G9Sheet.md +13 -0
- package/catalog/cards/G9SheetBackdropScope.md +10 -0
- package/catalog/cards/G9SheetFooter.md +10 -0
- package/catalog/cards/G9SheetFooterBar.md +11 -0
- package/catalog/cards/G9SheetFrame.md +17 -0
- package/catalog/cards/G9SheetHeader.md +11 -0
- package/catalog/cards/G9SheetScrollIndicator.md +10 -0
- package/catalog/cards/G9SheetScrollRegion.md +11 -0
- package/catalog/cards/G9SheetSkeleton.md +13 -0
- package/catalog/cards/G9ShimmerBand.md +10 -0
- package/catalog/cards/G9ShortcutList.md +11 -0
- package/catalog/cards/G9ShortcutsSheet.md +15 -0
- package/catalog/cards/G9SideNav.md +16 -0
- package/catalog/cards/G9Skeleton.md +13 -0
- package/catalog/cards/G9SkeletonPage.md +13 -0
- package/catalog/cards/G9SkeletonRows.md +13 -0
- package/catalog/cards/G9SplitPane.md +17 -0
- package/catalog/cards/G9StatusPill.md +17 -0
- package/catalog/cards/G9StepSlider.md +16 -0
- package/catalog/cards/G9StepTracker.md +13 -0
- package/catalog/cards/G9Stepper.md +17 -0
- package/catalog/cards/G9SuccessHeader.md +14 -0
- package/catalog/cards/G9Swatch.md +13 -0
- package/catalog/cards/G9SwipeGroup.md +11 -0
- package/catalog/cards/G9SwipeView.md +17 -0
- package/catalog/cards/G9Switch.md +17 -0
- package/catalog/cards/G9SwitchGroup.md +15 -0
- package/catalog/cards/G9SwitchRow.md +17 -0
- package/catalog/cards/G9TabBar.md +17 -0
- package/catalog/cards/G9TabView.md +17 -0
- package/catalog/cards/G9Tag.md +14 -0
- package/catalog/cards/G9TagEntry.md +16 -0
- package/catalog/cards/G9TextEntry.md +17 -0
- package/catalog/cards/G9ThemePreviewCard.md +15 -0
- package/catalog/cards/G9TimeEntry.md +17 -0
- package/catalog/cards/G9TimeSpanPicker.md +17 -0
- package/catalog/cards/G9TitleWithLine.md +13 -0
- package/catalog/cards/G9TopBar.md +13 -0
- package/catalog/cards/G9UnsavedBar.md +16 -0
- package/catalog/cards/G9UpdateBar.md +15 -0
- package/catalog/cards/G9VerticalIconTextButton.md +15 -0
- package/catalog/cards/G9VirtualList.md +17 -0
- package/catalog/cards/G9Wave.md +15 -0
- package/catalog/cards/G9WheelColumn.md +17 -0
- package/catalog/cards/PickerField.md +14 -0
- package/catalog/cards/PickerSheetHeader.md +12 -0
- package/catalog/cards/PopupFrame.md +15 -0
- package/catalog/cards/PopupInputForm.md +11 -0
- package/catalog/cards/SelectionValueIcon.md +12 -0
- package/catalog/cards/TimeSpanSheetBody.md +16 -0
- package/catalog/catalog.json +47936 -0
- package/catalog/index.md +159 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/anchor/index.d.ts +1 -1
- package/dist/anchor/index.d.ts.map +1 -1
- package/dist/anchor/registry.d.ts +5 -0
- package/dist/anchor/registry.d.ts.map +1 -1
- package/dist/base/base.css +1 -0
- package/dist/base/base.css.map +1 -1
- package/dist/button/button-variants.css +4 -0
- package/dist/button/button-variants.css.map +1 -1
- package/dist/button/button.css +12 -5
- package/dist/button/button.css.map +1 -1
- package/dist/button/variant-css.d.ts.map +1 -1
- package/dist/button/variant-css.jsx +2 -1
- package/dist/cascade/cascade.css +2 -1
- package/dist/cascade/cascade.css.map +1 -1
- package/dist/commands/commands.css +12 -6
- package/dist/commands/commands.css.map +1 -1
- package/dist/design/design.d.ts +39 -0
- package/dist/design/design.d.ts.map +1 -0
- package/dist/design/design.jsx +54 -0
- package/dist/design/index.d.ts +3 -0
- package/dist/design/index.d.ts.map +1 -0
- package/dist/design/index.jsx +2 -0
- package/dist/design/probe.d.ts +62 -0
- package/dist/design/probe.d.ts.map +1 -0
- package/dist/design/probe.jsx +141 -0
- package/dist/display/data-uri.d.ts +9 -0
- package/dist/display/data-uri.d.ts.map +1 -0
- package/dist/display/data-uri.jsx +56 -0
- package/dist/display/display.css +10 -3
- package/dist/display/display.css.map +1 -1
- package/dist/display/extras.css +8 -2
- package/dist/display/extras.css.map +1 -1
- package/dist/display/figures.css +28 -7
- package/dist/display/figures.css.map +1 -1
- package/dist/display/figures.d.ts +10 -0
- package/dist/display/figures.d.ts.map +1 -1
- package/dist/display/figures.jsx +28 -5
- package/dist/display/image.d.ts +9 -2
- package/dist/display/image.d.ts.map +1 -1
- package/dist/display/image.jsx +20 -6
- package/dist/display/keycap.css +1 -0
- package/dist/display/keycap.css.map +1 -1
- package/dist/display/motion-figures.css +4 -1
- package/dist/display/motion-figures.css.map +1 -1
- package/dist/display/separator.d.ts.map +1 -1
- package/dist/display/separator.jsx +1 -1
- package/dist/display/status.css +5 -0
- package/dist/display/status.css.map +1 -1
- package/dist/display/theme-preview.css +6 -3
- package/dist/display/theme-preview.css.map +1 -1
- package/dist/edge-panel/edge-panel.css +6 -3
- package/dist/edge-panel/edge-panel.css.map +1 -1
- package/dist/effects/effects.css +4 -2
- package/dist/effects/effects.css.map +1 -1
- package/dist/expander/expander.css +2 -1
- package/dist/expander/expander.css.map +1 -1
- package/dist/fields/extra-entries.css +14 -6
- package/dist/fields/extra-entries.css.map +1 -1
- package/dist/fields/fields.css +21 -10
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/text-entry.d.ts.map +1 -1
- package/dist/fields/text-entry.jsx +3 -0
- package/dist/guide/guide.css +17 -5
- package/dist/guide/guide.css.map +1 -1
- package/dist/header/header.css +6 -2
- package/dist/header/header.css.map +1 -1
- package/dist/icon/icon.d.ts +9 -2
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.jsx +26 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/layout/layout.css +15 -5
- package/dist/layout/layout.css.map +1 -1
- package/dist/layout/scrollers.d.ts +6 -0
- package/dist/layout/scrollers.d.ts.map +1 -1
- package/dist/layout/scrollers.jsx +5 -1
- package/dist/list/list.css +18 -8
- package/dist/list/list.css.map +1 -1
- package/dist/orb/orb.css +2 -1
- package/dist/orb/orb.css.map +1 -1
- package/dist/orb/orb.d.ts.map +1 -1
- package/dist/orb/orb.jsx +9 -4
- package/dist/pickers/day-stepper.css +2 -1
- package/dist/pickers/day-stepper.css.map +1 -1
- package/dist/pickers/pickers.css +19 -9
- package/dist/pickers/pickers.css.map +1 -1
- package/dist/plus-button/plus-button.css +2 -1
- package/dist/plus-button/plus-button.css.map +1 -1
- package/dist/popover/popover.css +9 -4
- package/dist/popover/popover.css.map +1 -1
- package/dist/popup/popup.css +11 -5
- package/dist/popup/popup.css.map +1 -1
- package/dist/popup/service.d.ts.map +1 -1
- package/dist/popup/service.jsx +5 -1
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/provider.css.map +1 -1
- package/dist/provider/provider.d.ts +25 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +48 -12
- package/dist/range-slider/range-slider.css +9 -4
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/selection/selection.css +10 -5
- package/dist/selection/selection.css.map +1 -1
- package/dist/sheet/frame.d.ts +15 -0
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +18 -6
- package/dist/sheet/header.d.ts.map +1 -1
- package/dist/sheet/header.jsx +5 -2
- package/dist/sheet/service.d.ts +5 -0
- package/dist/sheet/service.d.ts.map +1 -1
- package/dist/sheet/service.jsx +9 -6
- package/dist/sheet/sheet.css +1 -0
- package/dist/sheet/sheet.css.map +1 -1
- package/dist/shell/shell.css +19 -8
- package/dist/shell/shell.css.map +1 -1
- package/dist/survey/survey.css +15 -7
- package/dist/survey/survey.css.map +1 -1
- package/dist/swipe/swipe.css +1 -0
- package/dist/swipe/swipe.css.map +1 -1
- package/dist/tab-bar/index.d.ts +1 -1
- package/dist/tab-bar/index.d.ts.map +1 -1
- package/dist/tab-bar/index.jsx +1 -1
- package/dist/tab-bar/model.d.ts +16 -0
- package/dist/tab-bar/model.d.ts.map +1 -1
- package/dist/tab-bar/model.jsx +19 -1
- package/dist/tab-bar/tab-bar.css +25 -1
- package/dist/tab-bar/tab-bar.css.map +1 -1
- package/dist/tab-bar/tab-bar.d.ts +6 -0
- package/dist/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/tab-bar/tab-bar.jsx +61 -11
- package/dist/tabs/tabs.css +3 -1
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/toast/toast.css +9 -4
- package/dist/toast/toast.css.map +1 -1
- package/dist/toggle/choice.css +15 -6
- package/dist/toggle/choice.css.map +1 -1
- package/dist/toggle/toggle.css +12 -6
- package/dist/toggle/toggle.css.map +1 -1
- package/package.json +16 -4
- package/skills/g9-lynx-app/SKILL.md +42 -0
- package/skills/g9-lynx-app/references/adaptive-layout.md +10 -0
- package/skills/g9-lynx-app/references/anchors-guide.md +9 -0
- package/skills/g9-lynx-app/references/catalog-index.md +80 -0
- package/skills/g9-lynx-app/references/common-mistakes.md +12 -0
- package/skills/g9-lynx-app/references/components/anchor.md +30 -0
- package/skills/g9-lynx-app/references/components/barcode-qr.md +19 -0
- package/skills/g9-lynx-app/references/components/barcode.md +37 -0
- package/skills/g9-lynx-app/references/components/base.md +35 -0
- package/skills/g9-lynx-app/references/components/button.md +125 -0
- package/skills/g9-lynx-app/references/components/calendar.md +128 -0
- package/skills/g9-lynx-app/references/components/cascade.md +19 -0
- package/skills/g9-lynx-app/references/components/charts.md +193 -0
- package/skills/g9-lynx-app/references/components/chat.md +98 -0
- package/skills/g9-lynx-app/references/components/commands.md +45 -0
- package/skills/g9-lynx-app/references/components/commerce.md +69 -0
- package/skills/g9-lynx-app/references/components/datagrid.md +19 -0
- package/skills/g9-lynx-app/references/components/deferred.md +19 -0
- package/skills/g9-lynx-app/references/components/design.md +27 -0
- package/skills/g9-lynx-app/references/components/display-1.md +193 -0
- package/skills/g9-lynx-app/references/components/display-2.md +196 -0
- package/skills/g9-lynx-app/references/components/display-3.md +122 -0
- package/skills/g9-lynx-app/references/components/edge-panel.md +19 -0
- package/skills/g9-lynx-app/references/components/effects.md +46 -0
- package/skills/g9-lynx-app/references/components/expander.md +19 -0
- package/skills/g9-lynx-app/references/components/fields.md +174 -0
- package/skills/g9-lynx-app/references/components/header.md +19 -0
- package/skills/g9-lynx-app/references/components/host.md +32 -0
- package/skills/g9-lynx-app/references/components/icon.md +64 -0
- package/skills/g9-lynx-app/references/components/intro-carousel.md +19 -0
- package/skills/g9-lynx-app/references/components/layout-1.md +188 -0
- package/skills/g9-lynx-app/references/components/layout-2.md +18 -0
- package/skills/g9-lynx-app/references/components/list.md +116 -0
- package/skills/g9-lynx-app/references/components/map.md +19 -0
- package/skills/g9-lynx-app/references/components/media.md +115 -0
- package/skills/g9-lynx-app/references/components/orb.md +37 -0
- package/skills/g9-lynx-app/references/components/pickers.md +185 -0
- package/skills/g9-lynx-app/references/components/pilot.md +40 -0
- package/skills/g9-lynx-app/references/components/plus-button.md +19 -0
- package/skills/g9-lynx-app/references/components/popover.md +94 -0
- package/skills/g9-lynx-app/references/components/popup.md +56 -0
- package/skills/g9-lynx-app/references/components/provider.md +43 -0
- package/skills/g9-lynx-app/references/components/range-slider.md +36 -0
- package/skills/g9-lynx-app/references/components/route.md +19 -0
- package/skills/g9-lynx-app/references/components/sheet.md +134 -0
- package/skills/g9-lynx-app/references/components/shell.md +98 -0
- package/skills/g9-lynx-app/references/components/survey.md +55 -0
- package/skills/g9-lynx-app/references/components/swipe.md +31 -0
- package/skills/g9-lynx-app/references/components/tab-bar.md +19 -0
- package/skills/g9-lynx-app/references/components/tabs.md +19 -0
- package/skills/g9-lynx-app/references/components/toggle.md +161 -0
- package/skills/g9-lynx-app/references/lists.md +13 -0
- package/skills/g9-lynx-app/references/localization-rtl.md +13 -0
- package/skills/g9-lynx-app/references/navigation-route.md +21 -0
- package/skills/g9-lynx-app/references/overlays.md +27 -0
- package/skills/g9-lynx-app/references/pilot.md +10 -0
- package/skills/g9-lynx-app/references/platform-rules.md +42 -0
- package/skills/g9-lynx-app/references/provider-and-host.md +37 -0
- package/skills/g9-lynx-app/references/theming.md +18 -0
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ entry `@g9tm/lynxcontrols` re-exports **types only**.
|
|
|
20
20
|
| `/display`, `/effects` | KPIs, deltas, status pills, `G9Image`, success header, confetti, `useG9Fly` | [display-and-effects.md](docs/display-and-effects.md) |
|
|
21
21
|
| `/toggle`, `/fields`, `/survey` | segmented, chips, radio group, stepper, number/time/tag entries, num pad, survey inputs | [choices-entries-and-surveys.md](docs/choices-entries-and-surveys.md) |
|
|
22
22
|
| `/anchor`, `/route`, `/guide` | anchors, the router of open places, the guide and journeys | [anchors-route-guide.md](docs/anchors-route-guide.md) |
|
|
23
|
+
| `/design` | design-only: the design probe (`snapshot`, `hitTest`, a per-frame subscription) and `G9DesignNode` anchors without ids | [design-probe.md](docs/design-probe.md) |
|
|
23
24
|
| `/tailwind` | the Tailwind preset over the G9 tokens | [docs/theming.md](../../docs/theming.md) |
|
|
24
25
|
|
|
25
26
|
Build plugin: `@g9tm/lynxcontrols/rspeedy` exports `pluginG9Lynx()`; add it to the app's `lynx.config` (inline CSS
|
package/bin/g9lynx.mjs
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// `npx g9lynx skills sync [--app <dir>]` (@g9tm/lynxcontrols, LC-02): installs or refreshes the consumer skill in an
|
|
3
|
+
// app — the skill this installed version of the library ships (skills/g9-lynx-app: a router, hand-written references
|
|
4
|
+
// and the references generated from the catalogs) goes to the app's `.agents/skills/g9-lynx-app/`, and a short block
|
|
5
|
+
// between markers in the app's AGENTS.md names it with the rules most often broken. Only what is between the markers
|
|
6
|
+
// is rewritten; a second run with the same version changes nothing.
|
|
7
|
+
import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
8
|
+
import { dirname, join, relative, resolve, sep } from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
|
|
11
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
export const SKILL = 'g9-lynx-app';
|
|
13
|
+
export const BEGIN = '<!-- BEGIN:g9-lynx -->';
|
|
14
|
+
export const END = '<!-- END:g9-lynx -->';
|
|
15
|
+
|
|
16
|
+
/** The block the app's AGENTS.md carries between the markers. */
|
|
17
|
+
export function agentsBlock(version) {
|
|
18
|
+
return [
|
|
19
|
+
BEGIN,
|
|
20
|
+
`## G9LynxControls (${version})`,
|
|
21
|
+
'',
|
|
22
|
+
`This app's UI comes from G9LynxControls. Before UI work read the skill \`.agents/skills/${SKILL}/SKILL.md\`; the`,
|
|
23
|
+
"installed package's code and catalog (`node_modules/@g9tm/lynxcontrols*/catalog/`) win over any text.",
|
|
24
|
+
'',
|
|
25
|
+
'1. One `G9Provider` per LynxView and one `G9Host` per page; overlays need the host above them.',
|
|
26
|
+
'2. Lynx is not the browser: no `Intl`, DOM or `@media`; rows mirror with `g9RowStyle`, never `direction`.',
|
|
27
|
+
'3. Use a G9 control, token or culture function before writing your own; give acted-on controls an `id`.',
|
|
28
|
+
'',
|
|
29
|
+
`Refresh with \`npx g9lynx skills sync\` after updating the library (it rewrites only this block and the skill).`,
|
|
30
|
+
END,
|
|
31
|
+
].join('\n');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function* files(dir) {
|
|
35
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
36
|
+
const path = join(dir, entry.name);
|
|
37
|
+
if (entry.isDirectory()) yield* files(path);
|
|
38
|
+
else yield path;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const same = (a, b) => existsSync(b) && readFileSync(a).equals(readFileSync(b));
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Installs or refreshes the skill in `app`; returns what changed (paths relative to the app). `dryRun` reports what
|
|
46
|
+
* would change and writes nothing (the library's own gate keeps the starter's copy current that way).
|
|
47
|
+
*/
|
|
48
|
+
export function syncSkills(app, { from = join(here, '..', 'skills', SKILL), version, dryRun = false } = {}) {
|
|
49
|
+
const pkg = JSON.parse(readFileSync(join(here, '..', 'package.json'), 'utf8'));
|
|
50
|
+
const v = version ?? pkg.version;
|
|
51
|
+
const target = join(app, '.agents', 'skills', SKILL);
|
|
52
|
+
const changed = [];
|
|
53
|
+
const wanted = new Set();
|
|
54
|
+
for (const source of files(from)) {
|
|
55
|
+
const rel = relative(from, source);
|
|
56
|
+
wanted.add(rel);
|
|
57
|
+
const out = join(target, rel);
|
|
58
|
+
if (same(source, out)) continue;
|
|
59
|
+
if (!dryRun) {
|
|
60
|
+
mkdirSync(dirname(out), { recursive: true });
|
|
61
|
+
cpSync(source, out);
|
|
62
|
+
}
|
|
63
|
+
changed.push(join('.agents', 'skills', SKILL, rel).split(sep).join('/'));
|
|
64
|
+
}
|
|
65
|
+
// what an older version shipped and this one does not
|
|
66
|
+
if (existsSync(target))
|
|
67
|
+
for (const old of [...files(target)]) {
|
|
68
|
+
const rel = relative(target, old);
|
|
69
|
+
if (wanted.has(rel)) continue;
|
|
70
|
+
if (!dryRun) rmSync(old);
|
|
71
|
+
changed.push(join('.agents', 'skills', SKILL, rel).split(sep).join('/'));
|
|
72
|
+
}
|
|
73
|
+
const agents = join(app, 'AGENTS.md');
|
|
74
|
+
const block = agentsBlock(v);
|
|
75
|
+
const before = existsSync(agents) ? readFileSync(agents, 'utf8') : null;
|
|
76
|
+
let after;
|
|
77
|
+
if (before === null) after = `# Agent instructions\n\n${block}\n`;
|
|
78
|
+
else {
|
|
79
|
+
const start = before.indexOf(BEGIN);
|
|
80
|
+
const end = before.indexOf(END);
|
|
81
|
+
after =
|
|
82
|
+
start >= 0 && end > start
|
|
83
|
+
? `${before.slice(0, start)}${block}${before.slice(end + END.length)}`
|
|
84
|
+
: `${before.replace(/\s*$/, '')}\n\n${block}\n`;
|
|
85
|
+
}
|
|
86
|
+
if (after !== before) {
|
|
87
|
+
if (!dryRun) writeFileSync(agents, after);
|
|
88
|
+
changed.push('AGENTS.md');
|
|
89
|
+
}
|
|
90
|
+
return changed;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
94
|
+
const [group, command] = process.argv.slice(2);
|
|
95
|
+
const at = process.argv.indexOf('--app');
|
|
96
|
+
const app = resolve(at > 0 ? (process.argv[at + 1] ?? '.') : '.');
|
|
97
|
+
if (group !== 'skills' || command !== 'sync') {
|
|
98
|
+
console.error('usage: g9lynx skills sync [--app <dir>]');
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
const changed = syncSkills(app);
|
|
102
|
+
console.log(changed.length ? `g9lynx: ${changed.length} file(s) updated in ${app}` : `g9lynx: ${app} is up to date`);
|
|
103
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// LC-02: the consumer skill installed into an app — twice, and the second run changes nothing; the text of the app's
|
|
2
|
+
// AGENTS.md outside the markers is kept; a file an older version shipped is removed; the command line answers.
|
|
3
|
+
import assert from 'node:assert/strict';
|
|
4
|
+
import { execFileSync } from 'node:child_process';
|
|
5
|
+
import { existsSync, mkdtempSync, readFileSync, rmSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
6
|
+
import { tmpdir } from 'node:os';
|
|
7
|
+
import { dirname, join } from 'node:path';
|
|
8
|
+
import { test } from 'node:test';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
import { agentsBlock, BEGIN, END, SKILL, syncSkills } from './g9lynx.mjs';
|
|
11
|
+
|
|
12
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
const bin = join(here, 'g9lynx.mjs');
|
|
14
|
+
const version = JSON.parse(readFileSync(join(here, '..', 'package.json'), 'utf8')).version;
|
|
15
|
+
|
|
16
|
+
test('installs the skill and the AGENTS.md block; a second run changes nothing and keeps the text outside', () => {
|
|
17
|
+
const app = mkdtempSync(join(tmpdir(), 'g9lynx-'));
|
|
18
|
+
try {
|
|
19
|
+
writeFileSync(join(app, 'AGENTS.md'), '# My app\n\nOur own rules stay here.\n');
|
|
20
|
+
const first = syncSkills(app);
|
|
21
|
+
assert.ok(first.includes('AGENTS.md'));
|
|
22
|
+
assert.ok(first.includes(`.agents/skills/${SKILL}/SKILL.md`));
|
|
23
|
+
assert.ok(existsSync(join(app, '.agents', 'skills', SKILL, 'references', 'catalog-index.md')));
|
|
24
|
+
const agents = readFileSync(join(app, 'AGENTS.md'), 'utf8');
|
|
25
|
+
assert.ok(agents.startsWith('# My app\n\nOur own rules stay here.\n'));
|
|
26
|
+
assert.ok(agents.includes(agentsBlock(version)));
|
|
27
|
+
assert.deepEqual(syncSkills(app), []);
|
|
28
|
+
assert.equal(readFileSync(join(app, 'AGENTS.md'), 'utf8'), agents);
|
|
29
|
+
// a dry run reports what a newer version would change and writes nothing
|
|
30
|
+
assert.deepEqual(syncSkills(app, { version: '9.9.9', dryRun: true }), ['AGENTS.md']);
|
|
31
|
+
assert.equal(readFileSync(join(app, 'AGENTS.md'), 'utf8'), agents);
|
|
32
|
+
// the app edits around the block; a newer version rewrites only what is between the markers
|
|
33
|
+
const edited = agents.replace('Our own rules stay here.', 'Our own rules, edited.') + '\nA line after the block.\n';
|
|
34
|
+
writeFileSync(join(app, 'AGENTS.md'), edited);
|
|
35
|
+
assert.deepEqual(syncSkills(app, { version: '9.9.9' }), ['AGENTS.md']);
|
|
36
|
+
const updated = readFileSync(join(app, 'AGENTS.md'), 'utf8');
|
|
37
|
+
assert.ok(updated.includes('Our own rules, edited.'));
|
|
38
|
+
assert.ok(updated.endsWith('\nA line after the block.\n'));
|
|
39
|
+
assert.ok(updated.includes('G9LynxControls (9.9.9)'));
|
|
40
|
+
assert.equal(updated.split(BEGIN).length, 2);
|
|
41
|
+
assert.equal(updated.split(END).length, 2);
|
|
42
|
+
} finally {
|
|
43
|
+
rmSync(app, { recursive: true, force: true });
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('an app without AGENTS.md gets one; a deleted file comes back; a stale file goes', () => {
|
|
48
|
+
const app = mkdtempSync(join(tmpdir(), 'g9lynx-'));
|
|
49
|
+
try {
|
|
50
|
+
syncSkills(app);
|
|
51
|
+
assert.match(readFileSync(join(app, 'AGENTS.md'), 'utf8'), /^# Agent instructions\n\n<!-- BEGIN:g9-lynx -->/);
|
|
52
|
+
unlinkSync(join(app, '.agents', 'skills', SKILL, 'references', 'overlays.md'));
|
|
53
|
+
writeFileSync(join(app, '.agents', 'skills', SKILL, 'references', 'retired.md'), 'old');
|
|
54
|
+
assert.deepEqual(syncSkills(app).sort(), [
|
|
55
|
+
`.agents/skills/${SKILL}/references/overlays.md`,
|
|
56
|
+
`.agents/skills/${SKILL}/references/retired.md`,
|
|
57
|
+
]);
|
|
58
|
+
assert.ok(!existsSync(join(app, '.agents', 'skills', SKILL, 'references', 'retired.md')));
|
|
59
|
+
assert.deepEqual(syncSkills(app), []);
|
|
60
|
+
} finally {
|
|
61
|
+
rmSync(app, { recursive: true, force: true });
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test('the command line: sync into --app, then up to date; a wrong command is a usage error', () => {
|
|
66
|
+
const app = mkdtempSync(join(tmpdir(), 'g9lynx-'));
|
|
67
|
+
try {
|
|
68
|
+
assert.match(
|
|
69
|
+
execFileSync(process.execPath, [bin, 'skills', 'sync', '--app', app], { encoding: 'utf8' }),
|
|
70
|
+
/updated/,
|
|
71
|
+
);
|
|
72
|
+
assert.match(
|
|
73
|
+
execFileSync(process.execPath, [bin, 'skills', 'sync', '--app', app], { encoding: 'utf8' }),
|
|
74
|
+
/up to date/,
|
|
75
|
+
);
|
|
76
|
+
assert.throws(() => execFileSync(process.execPath, [bin, 'nope'], { stdio: 'pipe' }), /usage: g9lynx skills sync/);
|
|
77
|
+
} finally {
|
|
78
|
+
rmSync(app, { recursive: true, force: true });
|
|
79
|
+
}
|
|
80
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# DateTimeSheetBody
|
|
2
|
+
|
|
3
|
+
`import { DateTimeSheetBody } from '@g9tm/lynxcontrols/pickers';`
|
|
4
|
+
|
|
5
|
+
The drum sheet body (MAUI `G9DateTimePickerSheet`): header, live preview, Today/Now chip, the wheels.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `bounds`: object
|
|
9
|
+
- `calendar`: 'gregorian' | 'persian'
|
|
10
|
+
- `cancel`: () => void
|
|
11
|
+
- `culture`: object
|
|
12
|
+
- `done`: (value: G9LocalDateTime) => void
|
|
13
|
+
- `format`: (value: G9LocalDateTime) => void
|
|
14
|
+
- `initial`: object
|
|
15
|
+
- `mode`: 'dateTime' | 'date' | 'time'
|
|
16
|
+
|
|
17
|
+
Example: `<DateTimeSheetBody bounds={bounds} calendar="gregorian" cancel={() => {}} culture={culture} done={() => {}} format={format} initial={initial} mode="dateTime" now={now} showToday title="Label" twentyFourHour />`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# G9ActionRow
|
|
2
|
+
|
|
3
|
+
`import { G9ActionRow } from '@g9tm/lynxcontrols/layout';`
|
|
4
|
+
|
|
5
|
+
The main action(s) of a form or page (SAC ActionRow): on a desk at the end at their own width (a page-wide bar reads as a banner, not a button); on a phone full width for the thumb.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `children?`: ReactNode
|
|
9
|
+
- `top?`: number = 12
|
|
10
|
+
|
|
11
|
+
Example: `<G9ActionRow />`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# G9ActionSheet
|
|
2
|
+
|
|
3
|
+
`import { G9ActionSheet } from '@g9tm/lynxcontrols/popover';`
|
|
4
|
+
|
|
5
|
+
A light bottom panel for a short list of actions (the phone form of a menu).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `onClose`: () => void
|
|
9
|
+
- `open`: boolean
|
|
10
|
+
- `title?`: string
|
|
11
|
+
- `children?`: ReactNode
|
|
12
|
+
- `cancelText?`: string
|
|
13
|
+
|
|
14
|
+
Example: `<G9ActionSheet onClose={() => {}} open />`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# G9Activity
|
|
2
|
+
|
|
3
|
+
`import { G9Activity } from '@g9tm/lynxcontrols/provider';`
|
|
4
|
+
|
|
5
|
+
Marks a kept-mounted region as shown or hidden (nested regions are hidden when any ancestor is).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `mode`: 'visible' | 'hidden'
|
|
9
|
+
- `children?`: ReactNode
|
|
10
|
+
|
|
11
|
+
Example: `<G9Activity mode="visible" />`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# G9ActivityIndicator
|
|
2
|
+
|
|
3
|
+
`import { G9ActivityIndicator } from '@g9tm/lynxcontrols/display';`
|
|
4
|
+
|
|
5
|
+
A spinner: a ring with a transparent quarter rotating once per 800 ms (CSS keyframes, no JavaScript per frame).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `size?`: number = 20
|
|
9
|
+
- `color?`: color = "var(--g9-primary)"
|
|
10
|
+
- `running?`: boolean = false
|
|
11
|
+
- `thickness?`: number = "max(2, size / 10)"
|
|
12
|
+
- `accessibilityLabel?`: string
|
|
13
|
+
|
|
14
|
+
Example: `<G9ActivityIndicator />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9AllocationInput
|
|
2
|
+
|
|
3
|
+
`import { G9AllocationInput } from '@g9tm/lynxcontrols/survey';`
|
|
4
|
+
|
|
5
|
+
Share a total between options (Riskara Split «۱۰۰ سکه», budget splits): − and + per option, a stacked bar of the shares, what is left.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `options`: object[]
|
|
9
|
+
- `value?`: object
|
|
10
|
+
- `onChange?`: (value: Readonly<Record<K, number>>) => void
|
|
11
|
+
- `disabled?`: boolean = false
|
|
12
|
+
- `format?`: (units: number) => void
|
|
13
|
+
- `defaultValue?`: object
|
|
14
|
+
- `step?`: number = 5
|
|
15
|
+
- `total?`: number = 100
|
|
16
|
+
|
|
17
|
+
Example: `<G9AllocationInput options={options} />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9Anchor
|
|
2
|
+
|
|
3
|
+
`import { G9Anchor } from '@g9tm/lynxcontrols/anchor';`
|
|
4
|
+
|
|
5
|
+
Makes any part of a page an anchor: a layout-neutral wrapper (a flex column unless a class is given) that carries the id.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `label?`: () => void
|
|
9
|
+
- `children?`: ReactNode
|
|
10
|
+
- `risk?`: 'none' | 'commit' | 'destructive' = "none"
|
|
11
|
+
- `changes?`: () => void
|
|
12
|
+
- `enabled?`: () => void
|
|
13
|
+
- `capabilities?`: object
|
|
14
|
+
- `kind?`: 'label' | 'image' | 'button' | 'entry' | 'toggle' | 'picker' | 'chips' | 'tab' | 'tab-view' | 'list' | 'scroll' | 'item' | 'card' | 'map' | 'view'
|
|
15
|
+
- `secret?`: boolean = false
|
|
16
|
+
|
|
17
|
+
Example: `<G9Anchor id="id" />`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# G9AnimatedCheck
|
|
2
|
+
|
|
3
|
+
`import { G9AnimatedCheck } from '@g9tm/lynxcontrols/effects';`
|
|
4
|
+
|
|
5
|
+
A check that pops in (G9Hub AnimatedCheck, ShopManager Done): a disc scales up, the check follows.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `size?`: number = 72
|
|
9
|
+
- `color?`: color
|
|
10
|
+
- `haptic?`: boolean = true
|
|
11
|
+
- `accessibilityLabel?`: string
|
|
12
|
+
|
|
13
|
+
Example: `<G9AnimatedCheck />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9AppBar
|
|
2
|
+
|
|
3
|
+
`import { G9AppBar } from '@g9tm/lynxcontrols/header';`
|
|
4
|
+
|
|
5
|
+
The bar at a page's top (ShopManager Head/Bar/Back, mardomi Header, Riskara PhoneHeader, G9Hub PageHeader): back, title or brand with a place line, actions at the end.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `title?`: string
|
|
9
|
+
- `children?`: ReactNode
|
|
10
|
+
- `subtitle?`: string
|
|
11
|
+
- `disabled?`: boolean = false
|
|
12
|
+
- `onBack?`: () => void
|
|
13
|
+
- `backLabel?`: string = "Back"
|
|
14
|
+
- `align?`: 'start' | 'center'
|
|
15
|
+
- `actions?`: ReactNode
|
|
16
|
+
|
|
17
|
+
Example: `<G9AppBar />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9AppShell
|
|
2
|
+
|
|
3
|
+
`import { G9AppShell } from '@g9tm/lynxcontrols/shell';`
|
|
4
|
+
|
|
5
|
+
The app's frame by window size (SAC StaffApp shell, Riskara Frame, G9Hub AppShell): phones get the tab bar (up to four destinations plus «more»), tablets an icon rail, desktops a side nav with a top bar.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `destinations`: object[]
|
|
9
|
+
- `onChange`: (key: K) => void
|
|
10
|
+
- `value`: string
|
|
11
|
+
- `children?`: ReactNode
|
|
12
|
+
- `moreText?`: string
|
|
13
|
+
- `brand?`: ReactNode
|
|
14
|
+
- `navFooter?`: ReactNode
|
|
15
|
+
- `navSearch?`: ReactNode
|
|
16
|
+
|
|
17
|
+
Example: `<G9AppShell destinations={destinations} onChange={() => {}} value="value" />`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# G9Art
|
|
2
|
+
|
|
3
|
+
`import { G9Art } from '@g9tm/lynxcontrols/icon';`
|
|
4
|
+
|
|
5
|
+
An illustration or a logo drawn in the theme (SAC `Art` / `Logo`): any viewBox, `currentColor` painted with a theme token resolved to its value (SVG content cannot read CSS variables).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `svg`: string
|
|
9
|
+
- `color?`: color
|
|
10
|
+
- `height?`: number = 44
|
|
11
|
+
- `accessibilityLabel?`: string
|
|
12
|
+
|
|
13
|
+
Example: `<G9Art svg="svg" />`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# G9Avatar
|
|
2
|
+
|
|
3
|
+
`import { G9Avatar } from '@g9tm/lynxcontrols/display';`
|
|
4
|
+
|
|
5
|
+
A person: photo or initials in a tinted disc (SAC/ShopManager/Riskara Avatar, G9Hub Avatar).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `name`: string
|
|
9
|
+
- `size?`: number | string | string | string | string | string = "md"
|
|
10
|
+
- `tone?`: 'primary' | 'info' | 'success' | 'warning' | 'error' | 'accent' | 'neutral'
|
|
11
|
+
- `gradient?`: boolean
|
|
12
|
+
- `image?`: string
|
|
13
|
+
- `ring?`: string
|
|
14
|
+
- `status?`: 'online' | 'busy' | 'away' | 'offline'
|
|
15
|
+
|
|
16
|
+
Example: `<G9Avatar name="name" />`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# G9Badge
|
|
2
|
+
|
|
3
|
+
`import { G9Badge } from '@g9tm/lynxcontrols/display';`
|
|
4
|
+
|
|
5
|
+
A count or a dot (G9Hub Counter/Badge, tab and bell counts).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `value?`: string | number
|
|
9
|
+
- `appearance?`: 'outline' | 'soft' | 'solid' | 'plain' = "solid"
|
|
10
|
+
- `tone?`: 'primary' | 'info' | 'success' | 'warning' | 'error' | 'accent' | 'neutral' = "error"
|
|
11
|
+
- `dot?`: boolean
|
|
12
|
+
- `hideZero?`: boolean = true
|
|
13
|
+
- `max?`: number = 99
|
|
14
|
+
|
|
15
|
+
Example: `<G9Badge />`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# G9Bento
|
|
2
|
+
|
|
3
|
+
`import { G9Bento } from '@g9tm/lynxcontrols/layout';`
|
|
4
|
+
|
|
5
|
+
A responsive bento row (Riskara Bento): children share 12 columns on wide windows, stack on narrow ones.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `spans`: number[]
|
|
9
|
+
- `children?`: ReactNode
|
|
10
|
+
- `stackBelow?`: 'tablet' | 'desktop' = "tablet"
|
|
11
|
+
- `gap?`: number
|
|
12
|
+
|
|
13
|
+
Example: `<G9Bento spans={spans} />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9Button
|
|
2
|
+
|
|
3
|
+
`import { G9Button } from '@g9tm/lynxcontrols/button';`
|
|
4
|
+
|
|
5
|
+
Text button (MAUI `G9Button`): variant fill (gradient for the solid variants), 12 px corners, no shadow, optional leading/trailing icons, loading state with a spinner.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `text?`: string
|
|
9
|
+
- `variant?`: 'text' | 'primary' | 'default' | 'secondary' | 'info' | 'success' | 'warning' | 'error' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "primary"
|
|
10
|
+
- `size?`: 'small' | 'medium' | 'large' | 'hero' = "medium"
|
|
11
|
+
- `leadingIcon?`: icon
|
|
12
|
+
- `onPress?`: () => void
|
|
13
|
+
- `disabled?`: boolean = false
|
|
14
|
+
- `fontAttributes?`: 'bold' | 'none' | 'italic' | 'boldItalic' = "bold"
|
|
15
|
+
- `loadingText?`: string
|
|
16
|
+
|
|
17
|
+
Example: `<G9Button text="Cancel" variant="outline" />`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# G9CameFromMark
|
|
2
|
+
|
|
3
|
+
`import { G9CameFromMark } from '@g9tm/lynxcontrols/display';`
|
|
4
|
+
|
|
5
|
+
A soft mark on the row the person came back from (SAC `CameFrom`): the primary colour at a fifth, fading out by itself in ~2 s (CSS, nothing runs in script); it never takes a touch.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
|
|
9
|
+
Example: `<G9CameFromMark />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9Card
|
|
2
|
+
|
|
3
|
+
`import { G9Card } from '@g9tm/lynxcontrols/layout';`
|
|
4
|
+
|
|
5
|
+
A card (every app's Card/Panel surface).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `children?`: ReactNode
|
|
9
|
+
- `onPress?`: () => void
|
|
10
|
+
- `disabled?`: boolean = false
|
|
11
|
+
- `appearance?`: 'outlined' | 'filled' | 'elevated' | 'glass'
|
|
12
|
+
- `edge?`: string
|
|
13
|
+
- `enterDelay?`: number
|
|
14
|
+
- `glow?`: string
|
|
15
|
+
- `padding?`: number = 16
|
|
16
|
+
|
|
17
|
+
Example: `<G9Card />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9CascadePanel
|
|
2
|
+
|
|
3
|
+
`import { G9CascadePanel } from '@g9tm/lynxcontrols/cascade';`
|
|
4
|
+
|
|
5
|
+
In-place drill-down navigation (MAUI `G9CascadePanel`): `controller.push(view, { title })` slides a panel in over the current one from any edge, `pop()` slides it back; panels stack to any depth inside whatever container
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `onPanelPopped?`: (depth: number) => void
|
|
9
|
+
- `onPanelPushed?`: (depth: number) => void
|
|
10
|
+
- `rootTitle?`: string
|
|
11
|
+
- `cornerRadius?`: number = 16
|
|
12
|
+
- `rootContent?`: ReactNode
|
|
13
|
+
- `rootContentFactory?`: () => ReactNode
|
|
14
|
+
- `animateRoot?`: boolean = false
|
|
15
|
+
- `animationDurationMs?`: number = 280
|
|
16
|
+
|
|
17
|
+
Example: `<G9CascadePanel />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9CheckBox
|
|
2
|
+
|
|
3
|
+
`import { G9CheckBox } from '@g9tm/lynxcontrols/toggle';`
|
|
4
|
+
|
|
5
|
+
Tri-state check box (MAUI `G9CheckBox`, ADR-0028): tap toggles, indeterminate → checked, never into indeterminate.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `text?`: string
|
|
9
|
+
- `checked?`: boolean
|
|
10
|
+
- `onPress?`: (checked: boolean) => void
|
|
11
|
+
- `disabled?`: boolean = false
|
|
12
|
+
- `onCheckedChange?`: (checked: boolean) => void
|
|
13
|
+
- `onIndeterminateChange?`: (indeterminate: boolean) => void
|
|
14
|
+
- `defaultChecked?`: boolean
|
|
15
|
+
- `defaultIndeterminate?`: boolean
|
|
16
|
+
|
|
17
|
+
Example: `<G9CheckBox text="I agree" checked={agree} onCheckedChange={setAgree} />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9Chip
|
|
2
|
+
|
|
3
|
+
`import { G9Chip } from '@g9tm/lynxcontrols/toggle';`
|
|
4
|
+
|
|
5
|
+
One chip (SAC Chip, G9Hub Chip, ShopManager chip): a filter, a choice, a removable tag.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `text`: string
|
|
9
|
+
- `selected?`: boolean
|
|
10
|
+
- `size?`: 'sm' | 'md' | 'lg' = "md"
|
|
11
|
+
- `icon?`: icon
|
|
12
|
+
- `onPress?`: () => void
|
|
13
|
+
- `disabled?`: boolean = false
|
|
14
|
+
- `tone?`: 'primary' | 'info' | 'success' | 'warning' | 'error' | 'accent' | 'neutral' = "primary"
|
|
15
|
+
- `onRemove?`: () => void
|
|
16
|
+
|
|
17
|
+
Example: `<G9Chip text="Label" />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9ChipGroup
|
|
2
|
+
|
|
3
|
+
`import { G9ChipGroup } from '@g9tm/lynxcontrols/toggle';`
|
|
4
|
+
|
|
5
|
+
Chip group (MAUI `G9ChipGroup`): single or multi selection by item identity, wrap or single-line scroll, colour transition (140 ms) and check mark (120 ms) in CSS, press pulse 0.94 on the main thread.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `items`: object[]
|
|
9
|
+
- `disabled?`: boolean = false
|
|
10
|
+
- `selectionMode?`: 'multiSelection' | 'singleSelection' = "multiSelection"
|
|
11
|
+
- `onSelectedKeyChange?`: (key: string | null, item: G9SelectionItem<unknown> | null) => void
|
|
12
|
+
- `onSelectedKeysChange?`: (keys: readonly string[]) => void
|
|
13
|
+
- `onSelectionChange?`: (items: readonly G9SelectionItem<unknown>[]) => void
|
|
14
|
+
- `chipCornerRadius?`: number = 9
|
|
15
|
+
- `chipHeight?`: number = 36
|
|
16
|
+
|
|
17
|
+
Example: `<G9ChipGroup items={items} />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9ChoiceList
|
|
2
|
+
|
|
3
|
+
`import { G9ChoiceList } from '@g9tm/lynxcontrols/survey';`
|
|
4
|
+
|
|
5
|
+
Cards to choose from (Riskara check-up Single/Multi, ShopManager `choice`, onboarding questions): icon or art, label, a line under it; the chosen card is outlined in the brand colour and announced as selected.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `options`: object[]
|
|
9
|
+
- `value?`: string[]
|
|
10
|
+
- `columns?`: number = 1
|
|
11
|
+
- `onChange?`: (keys: readonly K[]) => void
|
|
12
|
+
- `disabled?`: boolean = false
|
|
13
|
+
- `onPicked?`: (key: K) => void
|
|
14
|
+
- `defaultValue?`: string[]
|
|
15
|
+
- `max?`: number
|
|
16
|
+
|
|
17
|
+
Example: `<G9ChoiceList options={options} />`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# G9Columns
|
|
2
|
+
|
|
3
|
+
`import { G9Columns } from '@g9tm/lynxcontrols/layout';`
|
|
4
|
+
|
|
5
|
+
Form or content columns on wide windows, one column on narrow ones (SAC Cols).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `children?`: ReactNode
|
|
9
|
+
- `from?`: 'tablet' | 'desktop' = "tablet"
|
|
10
|
+
- `gap?`: number = 16
|
|
11
|
+
- `weights?`: number[]
|
|
12
|
+
|
|
13
|
+
Example: `<G9Columns />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9ComboBox
|
|
2
|
+
|
|
3
|
+
`import { G9ComboBox } from '@g9tm/lynxcontrols/pickers';`
|
|
4
|
+
|
|
5
|
+
Searchable single or multi selection in an outlined box (MAUI `G9ComboBox`).
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `items`: G9SelectionItem<unknown>[]
|
|
9
|
+
- `label?`: string
|
|
10
|
+
- `value?`: string
|
|
11
|
+
- `leadingIcon?`: icon
|
|
12
|
+
- `placeholder?`: string
|
|
13
|
+
- `onValueChange?`: (key: string | null, item: T | null) => void
|
|
14
|
+
- `disabled?`: boolean = false
|
|
15
|
+
- `onLeadingPress?`: () => void
|
|
16
|
+
|
|
17
|
+
Example: `<G9ComboBox items={items} />`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# G9CommandPalette
|
|
2
|
+
|
|
3
|
+
`import { G9CommandPalette } from '@g9tm/lynxcontrols/commands';`
|
|
4
|
+
|
|
5
|
+
The command palette (SAC Palette, G9Hub CommandPalette; usually on Mod+K): one search over every place and action.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `commands`: object[]
|
|
9
|
+
- `onClose`: () => void
|
|
10
|
+
- `open`: boolean
|
|
11
|
+
- `placeholder?`: string
|
|
12
|
+
- `emptyText?`: string
|
|
13
|
+
- `platform?`: 'mac' | 'other'
|
|
14
|
+
|
|
15
|
+
Example: `<G9CommandPalette commands={commands} onClose={() => {}} open />`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# G9Confetti
|
|
2
|
+
|
|
3
|
+
`import { G9Confetti } from '@g9tm/lynxcontrols/effects';`
|
|
4
|
+
|
|
5
|
+
A one-shot burst behind a success (mardomi Tracking Confetti, G9Hub delights): each piece moves by a transform transition on the compositor — no JS frame loop.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `fire`: string | number
|
|
9
|
+
- `onDone?`: () => void
|
|
10
|
+
- `colors?`: string[]
|
|
11
|
+
- `durationMs?`: number = 1100
|
|
12
|
+
- `pieces?`: number = 28
|
|
13
|
+
- `spread?`: number = 180
|
|
14
|
+
|
|
15
|
+
Example: `<G9Confetti fire={fire} />`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# G9ConnectionBanner
|
|
2
|
+
|
|
3
|
+
`import { G9ConnectionBanner } from '@g9tm/lynxcontrols/shell';`
|
|
4
|
+
|
|
5
|
+
A slim line when the network is gone or coming back (G9Hub ConnectionBanner); a short «back online» then nothing.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `offlineText`: string
|
|
9
|
+
- `reconnectingText`: string
|
|
10
|
+
- `status`: 'online' | 'offline' | 'reconnecting'
|
|
11
|
+
- `onRetry?`: () => void
|
|
12
|
+
- `backOnlineText?`: string
|
|
13
|
+
- `retryText?`: string
|
|
14
|
+
|
|
15
|
+
Example: `<G9ConnectionBanner offlineText="offlineText" reconnectingText="reconnectingText" status="online" />`
|