@g9tm/lynxcontrols 2.8.4 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/catalog/cards/G9Avatar.md +1 -1
- package/catalog/cards/G9Badge.md +1 -1
- package/catalog/cards/G9Button.md +1 -1
- package/catalog/cards/G9Chip.md +1 -1
- package/catalog/cards/G9ChipStrip.md +1 -1
- package/catalog/cards/G9ContextMenu.md +4 -2
- package/catalog/cards/G9DragChip.md +10 -0
- package/catalog/cards/G9DragSource.md +17 -0
- package/catalog/cards/G9DropTarget.md +15 -0
- package/catalog/cards/G9EmptyState.md +1 -1
- package/catalog/cards/G9IconButton.md +2 -2
- package/catalog/cards/G9InlineMessage.md +1 -1
- package/catalog/cards/G9KeyCapture.md +10 -0
- package/catalog/cards/G9Kpi.md +1 -1
- package/catalog/cards/G9ListRow.md +1 -1
- package/catalog/cards/G9LiveBadge.md +1 -1
- package/catalog/cards/G9LiveDot.md +1 -1
- package/catalog/cards/G9ProgressBar.md +1 -1
- package/catalog/cards/G9ProgressRing.md +1 -1
- package/catalog/cards/G9SafeButton.md +1 -1
- package/catalog/cards/G9SafeIconButton.md +2 -2
- package/catalog/cards/G9StatusPill.md +1 -1
- package/catalog/cards/G9StepTracker.md +1 -1
- package/catalog/cards/G9SwitchRow.md +1 -1
- package/catalog/cards/G9Tag.md +1 -1
- package/catalog/catalog.json +1069 -68
- package/catalog/index.md +6 -2
- package/dist/.tsbuildinfo +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.jsx +1 -1
- package/dist/commands/keys.d.ts +32 -1
- package/dist/commands/keys.d.ts.map +1 -1
- package/dist/commands/keys.jsx +92 -3
- package/dist/desktop/index.d.ts +3 -0
- package/dist/desktop/index.d.ts.map +1 -0
- package/dist/desktop/index.jsx +2 -0
- package/dist/desktop/keys.d.ts +26 -0
- package/dist/desktop/keys.d.ts.map +1 -0
- package/dist/desktop/keys.jsx +30 -0
- package/dist/desktop/window.d.ts +18 -0
- package/dist/desktop/window.d.ts.map +1 -0
- package/dist/desktop/window.jsx +28 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/pointer/drag-session.d.ts +72 -0
- package/dist/pointer/drag-session.d.ts.map +1 -0
- package/dist/pointer/drag-session.jsx +148 -0
- package/dist/pointer/drag.d.ts +78 -0
- package/dist/pointer/drag.d.ts.map +1 -0
- package/dist/pointer/drag.jsx +186 -0
- package/dist/pointer/index.d.ts +5 -0
- package/dist/pointer/index.d.ts.map +1 -0
- package/dist/pointer/index.jsx +4 -0
- package/dist/pointer/point.d.ts +36 -0
- package/dist/pointer/point.d.ts.map +1 -0
- package/dist/pointer/point.jsx +34 -0
- package/dist/pointer/pointer.css +62 -0
- package/dist/pointer/pointer.css.map +1 -0
- package/dist/pointer/secondary.d.ts +54 -0
- package/dist/pointer/secondary.d.ts.map +1 -0
- package/dist/pointer/secondary.jsx +86 -0
- package/dist/popover/popover.d.ts +26 -2
- package/dist/popover/popover.d.ts.map +1 -1
- package/dist/popover/popover.jsx +47 -20
- package/package.json +12 -2
- package/skills/g9-lynx-app/SKILL.md +8 -0
- package/skills/g9-lynx-app/references/catalog-index.md +11 -0
- package/skills/g9-lynx-app/references/components/button.md +6 -6
- package/skills/g9-lynx-app/references/components/code-editor.md +19 -0
- package/skills/g9-lynx-app/references/components/code-log.md +19 -0
- package/skills/g9-lynx-app/references/components/desktop.md +12 -0
- package/skills/g9-lynx-app/references/components/display-1.md +4 -4
- package/skills/g9-lynx-app/references/components/display-2.md +5 -5
- package/skills/g9-lynx-app/references/components/display-3.md +3 -3
- package/skills/g9-lynx-app/references/components/graph.md +19 -0
- package/skills/g9-lynx-app/references/components/list.md +2 -2
- package/skills/g9-lynx-app/references/components/pointer.md +46 -0
- package/skills/g9-lynx-app/references/components/popover.md +4 -2
- package/skills/g9-lynx-app/references/components/toggle.md +2 -2
package/dist/popover/popover.jsx
CHANGED
|
@@ -9,6 +9,7 @@ import { G9Keycap } from "../display/keycap.jsx";
|
|
|
9
9
|
import { useG9Back, useG9LayerItem } from "../host/hooks.jsx";
|
|
10
10
|
import { G9Icon } from "../icon/icon.jsx";
|
|
11
11
|
import { useG9ListKeyboard } from "../list/keyboard.jsx";
|
|
12
|
+
import { useG9SecondaryAction } from "../pointer/secondary.jsx";
|
|
12
13
|
import { useG9Core, useG9Direction, useG9Layout, useG9SafeInsets, useG9Strings } from "../provider/hooks.jsx";
|
|
13
14
|
import { computePopoverPosition } from "./position.jsx";
|
|
14
15
|
function G9OverlayRoot(props) {
|
|
@@ -274,8 +275,19 @@ const G9MenuList = memo(function(props) {
|
|
|
274
275
|
</view>;
|
|
275
276
|
});
|
|
276
277
|
function G9Menu(props) {
|
|
278
|
+
var _pop_placement;
|
|
277
279
|
const { wide } = useG9Layout();
|
|
278
|
-
const
|
|
280
|
+
const point = props.anchorPoint;
|
|
281
|
+
const pointRect = useMemo(()=>point ? {
|
|
282
|
+
x: point.x,
|
|
283
|
+
y: point.y,
|
|
284
|
+
width: 0,
|
|
285
|
+
height: 0
|
|
286
|
+
} : void 0, [
|
|
287
|
+
null == point ? void 0 : point.x,
|
|
288
|
+
null == point ? void 0 : point.y
|
|
289
|
+
]);
|
|
290
|
+
const sheet = 'sheet' === props.mode || 'popover' !== props.mode && !wide && !point;
|
|
279
291
|
const select = (k)=>{
|
|
280
292
|
props.onSelect(k);
|
|
281
293
|
props.onClose();
|
|
@@ -291,8 +303,11 @@ function G9Menu(props) {
|
|
|
291
303
|
id: `${props.id}_List`
|
|
292
304
|
} : {}}/>
|
|
293
305
|
</G9ActionSheet>;
|
|
294
|
-
const { items: _i, onSelect: _s, title: _t, mode: _m, cancelText: _c, ...pop } = props;
|
|
295
|
-
return <G9Popover {...pop}
|
|
306
|
+
const { items: _i, onSelect: _s, title: _t, mode: _m, cancelText: _c, anchorPoint: _p, ...pop } = props;
|
|
307
|
+
return <G9Popover {...pop} {...pointRect ? {
|
|
308
|
+
anchorRect: pointRect,
|
|
309
|
+
placement: null != (_pop_placement = pop.placement) ? _pop_placement : 'bottom-start'
|
|
310
|
+
} : {}} kind="menu">
|
|
296
311
|
<G9MenuList items={props.items} onSelect={select} keyboard={props.open} {...props.id ? {
|
|
297
312
|
id: `${props.id}_List`
|
|
298
313
|
} : {}}/>
|
|
@@ -337,25 +352,37 @@ function G9ActionSheet(props) {
|
|
|
337
352
|
return null;
|
|
338
353
|
}
|
|
339
354
|
function G9ContextMenu(props) {
|
|
355
|
+
var _props_keyboard;
|
|
340
356
|
const [isOpen, setOpen] = useState(false);
|
|
341
|
-
const [
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
|
|
357
|
+
const [at, setAt] = useState(null);
|
|
358
|
+
const secondary = useG9SecondaryAction((a)=>{
|
|
359
|
+
var _props_onOpen;
|
|
360
|
+
setAt({
|
|
361
|
+
rect: a.anchor,
|
|
362
|
+
point: 'mouse' === a.source && 0 === a.anchor.width && 0 === a.anchor.height
|
|
363
|
+
});
|
|
364
|
+
setOpen(true);
|
|
365
|
+
null == (_props_onOpen = props.onOpen) || _props_onOpen.call(props, a.source);
|
|
366
|
+
}, {
|
|
367
|
+
enabled: !props.disabled,
|
|
368
|
+
...false === props.longPress ? {
|
|
369
|
+
longPress: false
|
|
370
|
+
} : {},
|
|
371
|
+
keyboard: null != (_props_keyboard = props.keyboard) ? _props_keyboard : 'focus'
|
|
372
|
+
});
|
|
373
|
+
const { ref, ...bind } = secondary;
|
|
374
|
+
return <view className="g9-context-menu" {...g9IdProps(props.id)} ref={ref} {...false === props.secondaryClick ? {
|
|
375
|
+
...bind,
|
|
376
|
+
bindmousedown: void 0
|
|
377
|
+
} : bind}>
|
|
356
378
|
{props.children}
|
|
357
|
-
<G9Menu open={isOpen} onClose={()=>setOpen(false)} items={props.items} onSelect={props.onSelect} {...
|
|
358
|
-
|
|
379
|
+
<G9Menu open={isOpen} onClose={()=>setOpen(false)} items={props.items} onSelect={props.onSelect} {...at ? at.point ? {
|
|
380
|
+
anchorPoint: {
|
|
381
|
+
x: at.rect.x,
|
|
382
|
+
y: at.rect.y
|
|
383
|
+
}
|
|
384
|
+
} : {
|
|
385
|
+
anchorRect: at.rect
|
|
359
386
|
} : {}} {...props.title ? {
|
|
360
387
|
title: props.title
|
|
361
388
|
} : {}} {...props.id ? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/lynxcontrols",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "ReactLynx controls and overlay infrastructure: provider/host, sheets, popups, toasts, fields, buttons, pickers, tab view, tab bar, edge panel, swipe rows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -187,6 +187,16 @@
|
|
|
187
187
|
"types": "./dist/popover/index.d.ts",
|
|
188
188
|
"default": "./dist/popover/index.jsx"
|
|
189
189
|
},
|
|
190
|
+
"./pointer": {
|
|
191
|
+
"source": "./src/pointer/index.ts",
|
|
192
|
+
"types": "./dist/pointer/index.d.ts",
|
|
193
|
+
"default": "./dist/pointer/index.jsx"
|
|
194
|
+
},
|
|
195
|
+
"./desktop": {
|
|
196
|
+
"source": "./src/desktop/index.ts",
|
|
197
|
+
"types": "./dist/desktop/index.d.ts",
|
|
198
|
+
"default": "./dist/desktop/index.jsx"
|
|
199
|
+
},
|
|
190
200
|
"./commands": {
|
|
191
201
|
"source": "./src/commands/index.ts",
|
|
192
202
|
"types": "./dist/commands/index.d.ts",
|
|
@@ -234,7 +244,7 @@
|
|
|
234
244
|
"build": "rslib build"
|
|
235
245
|
},
|
|
236
246
|
"dependencies": {
|
|
237
|
-
"@g9tm/lynxcontrols-foundation": "2.
|
|
247
|
+
"@g9tm/lynxcontrols-foundation": "2.9.0"
|
|
238
248
|
},
|
|
239
249
|
"peerDependencies": {
|
|
240
250
|
"@lynx-js/react": ">=0.129.3 <0.130.0",
|
|
@@ -36,6 +36,14 @@ disagree, trust `node_modules/@g9tm/lynxcontrols*/catalog/catalog.json` and the
|
|
|
36
36
|
3. **Use the library before writing your own**: a control, a token (`g9Token('Primary')`) or a culture function
|
|
37
37
|
(`formatNumber`, `toNativeDigits`) exists for most needs; give every control a person or a test acts on an `id`.
|
|
38
38
|
|
|
39
|
+
## Clean up at the end
|
|
40
|
+
|
|
41
|
+
Always (the owner, 2026-12-03: old temp files and test Docker images filled drive C and the machine crashed): every
|
|
42
|
+
temporary thing a task makes is removed before the task is reported done — temp files and folders (`%TEMP%`, `/tmp`,
|
|
43
|
+
scratch packs and tarballs), extra git worktrees, scratch apps, the Docker containers, images, volumes and build cache
|
|
44
|
+
it created, and the processes it started (dev servers, watchers, emulators). Remove only what you made, never another
|
|
45
|
+
session's; say in the report what was removed and what could not be.
|
|
46
|
+
|
|
39
47
|
## How the references are made
|
|
40
48
|
|
|
41
49
|
The hand-written files say how to use the library; `references/catalog-index.md` and `references/components/` are
|
|
@@ -24,6 +24,11 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
24
24
|
|
|
25
25
|
- `@g9tm/lynxcontrols-chat`: G9AckBar, G9ChatComposer, G9ChatThread, G9ConversationRow, G9EditHistorySheet, G9EmojiLibrary, G9EmojiPicker, G9FileCard, G9GifPicker, G9KudosDialog, G9LinkPreview, G9MessageBubble, G9MessageMenu, G9MessageMeta, G9MessageText, G9PersonPicker, G9PinnedBar, G9PollCard, G9PollComposer, G9ReactionBar, G9SchedulePicker, G9SlashSuggestions, G9StickerPicker, G9SystemPill, G9ThreadSearch, G9TypingDots → `components/chat-1.md`, `components/chat-2.md`, `components/chat-3.md`
|
|
26
26
|
|
|
27
|
+
## @g9tm/lynxcontrols-code
|
|
28
|
+
|
|
29
|
+
- `@g9tm/lynxcontrols-code/editor`: G9CodeEditor → `components/code-editor.md`
|
|
30
|
+
- `@g9tm/lynxcontrols-code/log`: G9LogView → `components/code-log.md`
|
|
31
|
+
|
|
27
32
|
## @g9tm/lynxcontrols-commerce
|
|
28
33
|
|
|
29
34
|
- `@g9tm/lynxcontrols-commerce`: G9MiniCartBar, G9PriceTag, G9ProductTile, G9QuantityControl → `components/commerce.md`
|
|
@@ -39,6 +44,7 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
39
44
|
- `@g9tm/lynxcontrols/dashboard`: G9DashboardCustomizeSheet, G9DashboardGrid, G9WidgetSkeleton, G9WidgetSlot → `components/dashboard.md`
|
|
40
45
|
- `@g9tm/lynxcontrols/deferred`: G9DeferredContent → `components/deferred.md`
|
|
41
46
|
- `@g9tm/lynxcontrols/design`: G9DesignNode, G9DesignScope → `components/design.md`
|
|
47
|
+
- `@g9tm/lynxcontrols/desktop`: G9KeyCapture → `components/desktop.md`
|
|
42
48
|
- `@g9tm/lynxcontrols/display`: G9ActivityIndicator, G9Avatar, G9Badge, G9CameFromMark, G9CodeBlock, G9CultureDateTimeLabel, G9Delta, G9EmptyState, G9ErrorBoundary, G9Image, G9InlineMessage, G9Keycap, G9Kpi, G9KpiGrid, G9LiveBadge, G9LiveDot, G9LoadState, G9LockOverlay, G9Photo, G9ProgressBar, G9ProgressRing, G9RevealText, G9SecretValue, G9Separator, G9SheetSkeleton, G9ShimmerBand, G9Skeleton, G9SkeletonPage, G9SkeletonRows, G9StatusPill, G9StepTracker, G9Tag, G9ThemePreviewCard, G9TitleWithLine, G9Wave → `components/display-1.md`, `components/display-2.md`, `components/display-3.md`
|
|
43
49
|
- `@g9tm/lynxcontrols/edge-panel`: G9EdgePanel → `components/edge-panel.md`
|
|
44
50
|
- `@g9tm/lynxcontrols/effects`: G9AnimatedCheck, G9Confetti, G9SuccessHeader → `components/effects.md`
|
|
@@ -53,6 +59,7 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
53
59
|
- `@g9tm/lynxcontrols/orb`: G9FloatingOrb, G9HoldButton → `components/orb.md`
|
|
54
60
|
- `@g9tm/lynxcontrols/pickers`: DateTimeSheetBody, G9ComboBox, G9DateTimePicker, G9DayStepper, G9Picker, G9TimeSpanPicker, G9WheelColumn, PickerField, PickerSheetHeader, SelectionValueIcon, TimeSpanSheetBody → `components/pickers.md`
|
|
55
61
|
- `@g9tm/lynxcontrols/plus-button`: G9PlusButton → `components/plus-button.md`
|
|
62
|
+
- `@g9tm/lynxcontrols/pointer`: G9DragChip, G9DragSource, G9DropTarget → `components/pointer.md`
|
|
56
63
|
- `@g9tm/lynxcontrols/popover`: G9ActionSheet, G9ContextMenu, G9Menu, G9MenuList, G9OverlayRoot, G9Popover, G9Tooltip → `components/popover.md`
|
|
57
64
|
- `@g9tm/lynxcontrols/popup`: G9PopupDragHandle, G9PopupView, PopupFrame, PopupInputForm → `components/popup.md`
|
|
58
65
|
- `@g9tm/lynxcontrols/provider`: G9Activity, G9DirectionScope, G9KeepAlive, G9Provider → `components/provider.md`
|
|
@@ -71,6 +78,10 @@ Generated from the installed packages' catalogs (`<package>/catalog`): one line
|
|
|
71
78
|
|
|
72
79
|
- `@g9tm/lynxcontrols-datagrid`: G9DataGrid → `components/datagrid.md`
|
|
73
80
|
|
|
81
|
+
## @g9tm/lynxcontrols-graph
|
|
82
|
+
|
|
83
|
+
- `@g9tm/lynxcontrols-graph`: G9GraphCanvas → `components/graph.md`
|
|
84
|
+
|
|
74
85
|
## @g9tm/lynxcontrols-intro-carousel
|
|
75
86
|
|
|
76
87
|
- `@g9tm/lynxcontrols-intro-carousel`: G9IntroCarousel → `components/intro-carousel.md`
|
|
@@ -8,7 +8,7 @@ Text button (MAUI `G9Button`): variant fill (gradient for the solid variants), 1
|
|
|
8
8
|
|
|
9
9
|
Props:
|
|
10
10
|
- `text?`: string
|
|
11
|
-
- `variant?`: '
|
|
11
|
+
- `variant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "primary"
|
|
12
12
|
- `size?`: 'small' | 'large' | 'medium' | 'hero' = "medium"
|
|
13
13
|
- `leadingIcon?`: icon
|
|
14
14
|
- `onPress?`: () => void
|
|
@@ -43,12 +43,12 @@ Example: `<G9HeaderActionButton />`
|
|
|
43
43
|
Square icon button (MAUI `G9IconButton`): one icon, variant/ghost fill, optional circle, corner badge that is never dimmed (opacity applies to the frame only), loading spinner, minimum touch target.
|
|
44
44
|
|
|
45
45
|
Props:
|
|
46
|
-
- `variant?`: '
|
|
46
|
+
- `variant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "surface"
|
|
47
47
|
- `size?`: 'sm' | 'md' | 'lg'
|
|
48
48
|
- `icon?`: icon
|
|
49
49
|
- `onPress?`: () => void
|
|
50
50
|
- `disabled?`: boolean = false
|
|
51
|
-
- `activeVariant?`: '
|
|
51
|
+
- `activeVariant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "tonal"
|
|
52
52
|
- `badgeText?`: string
|
|
53
53
|
- `badgeColor?`: color = "var(--g9-error)"
|
|
54
54
|
|
|
@@ -80,7 +80,7 @@ Button with guarded execution (MAUI `G9SafeButton`): a tap calls `onPress`, then
|
|
|
80
80
|
|
|
81
81
|
Props:
|
|
82
82
|
- `text?`: string
|
|
83
|
-
- `variant?`: '
|
|
83
|
+
- `variant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "primary"
|
|
84
84
|
- `size?`: 'small' | 'large' | 'medium' | 'hero' = "medium"
|
|
85
85
|
- `leadingIcon?`: icon
|
|
86
86
|
- `onPress?`: () => void
|
|
@@ -97,12 +97,12 @@ Example: `<G9SafeButton />`
|
|
|
97
97
|
Icon button with guarded execution (MAUI `G9SafeIconButton`); see `G9SafeButton`.
|
|
98
98
|
|
|
99
99
|
Props:
|
|
100
|
-
- `variant?`: '
|
|
100
|
+
- `variant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "surface"
|
|
101
101
|
- `size?`: 'sm' | 'md' | 'lg'
|
|
102
102
|
- `icon?`: icon
|
|
103
103
|
- `onPress?`: () => void
|
|
104
104
|
- `disabled?`: boolean = false
|
|
105
|
-
- `activeVariant?`: '
|
|
105
|
+
- `activeVariant?`: 'info' | 'error' | 'text' | 'primary' | 'default' | 'secondary' | 'success' | 'warning' | 'surface' | 'outline' | 'accent' | 'tonal' | 'errorTonal' | 'ghost' | 'inverse' = "tonal"
|
|
106
106
|
- `onExecute?`: (context: G9SafeRunContext) => void
|
|
107
107
|
- `onResult?`: (result: G9SafeRunResult<unknown>) => void
|
|
108
108
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols-code/editor` (generated)
|
|
2
|
+
|
|
3
|
+
# G9CodeEditor
|
|
4
|
+
|
|
5
|
+
`import { G9CodeEditor } from '@g9tm/lynxcontrols-code/editor';`
|
|
6
|
+
|
|
7
|
+
Editable monospace text with line numbers, colours, marks, find, undo / redo; only the visible lines are drawn.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `value?`: string
|
|
11
|
+
- `onChange?`: (change: G9TextChange) => void
|
|
12
|
+
- `onValueChange?`: (value: string) => void
|
|
13
|
+
- `onCopy?`: (text: string) => void
|
|
14
|
+
- `fontSize?`: number = 13
|
|
15
|
+
- `lineHeight?`: number = 20
|
|
16
|
+
- `tabSize?`: number = 2
|
|
17
|
+
- `defaultValue?`: string
|
|
18
|
+
|
|
19
|
+
Example: `<G9CodeEditor />`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols-code/log` (generated)
|
|
2
|
+
|
|
3
|
+
# G9LogView
|
|
4
|
+
|
|
5
|
+
`import { G9LogView } from '@g9tm/lynxcontrols-code/log';`
|
|
6
|
+
|
|
7
|
+
A live, virtualised log: follows the end, pauses on scroll-up, filters by level and search, copies selected rows.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `store`: object
|
|
11
|
+
- `onActivate?`: (entry: G9LogEntry) => void
|
|
12
|
+
- `onCopy?`: (text: string) => void
|
|
13
|
+
- `onLevelsChange?`: (levels: G9LogLevel[]) => void
|
|
14
|
+
- `onQueryChange?`: (query: string) => void
|
|
15
|
+
- `onSelectionChange?`: (entries: G9LogEntry[]) => void
|
|
16
|
+
- `levelColors?`: object
|
|
17
|
+
- `rowHeight?`: number = 22
|
|
18
|
+
|
|
19
|
+
Example: `<G9LogView store={store} />`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/desktop` (generated)
|
|
2
|
+
|
|
3
|
+
# G9KeyCapture
|
|
4
|
+
|
|
5
|
+
`import { G9KeyCapture } from '@g9tm/lynxcontrols/desktop';`
|
|
6
|
+
|
|
7
|
+
Hears the keys pressed anywhere inside (desktop: Lynxtron) and hands them to the page's key handlers.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `children?`: ReactNode
|
|
11
|
+
|
|
12
|
+
Example: `<G9KeyCapture />`
|
|
@@ -26,7 +26,7 @@ Props:
|
|
|
26
26
|
- `size?`: number | string | string | string | string | string = "md"
|
|
27
27
|
- `icon?`: icon
|
|
28
28
|
- `shape?`: 'circle' | 'squircle'
|
|
29
|
-
- `tone?`: '
|
|
29
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
30
30
|
- `gradient?`: boolean
|
|
31
31
|
- `image?`: string
|
|
32
32
|
- `ring?`: string
|
|
@@ -42,7 +42,7 @@ A count or a dot (G9Hub Counter/Badge, tab and bell counts).
|
|
|
42
42
|
Props:
|
|
43
43
|
- `value?`: string | number
|
|
44
44
|
- `appearance?`: 'solid' | 'outline' | 'plain' | 'soft' = "solid"
|
|
45
|
-
- `tone?`: '
|
|
45
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "error"
|
|
46
46
|
- `dot?`: boolean
|
|
47
47
|
- `hideZero?`: boolean = true
|
|
48
48
|
- `max?`: number = 99
|
|
@@ -125,7 +125,7 @@ Props:
|
|
|
125
125
|
- `icon?`: icon = "search"
|
|
126
126
|
- `message?`: string
|
|
127
127
|
- `compact?`: boolean
|
|
128
|
-
- `tone?`: '
|
|
128
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
129
129
|
- `art?`: ReactNode
|
|
130
130
|
- `action?`: object
|
|
131
131
|
|
|
@@ -175,7 +175,7 @@ Props:
|
|
|
175
175
|
- `title?`: string
|
|
176
176
|
- `children?`: ReactNode
|
|
177
177
|
- `icon?`: icon
|
|
178
|
-
- `tone?`: '
|
|
178
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "info"
|
|
179
179
|
- `onDismiss?`: () => void
|
|
180
180
|
- `action?`: object
|
|
181
181
|
|
|
@@ -11,7 +11,7 @@ Props:
|
|
|
11
11
|
- `value`: string
|
|
12
12
|
- `icon?`: icon
|
|
13
13
|
- `onPress?`: () => void
|
|
14
|
-
- `tone?`: '
|
|
14
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
15
15
|
- `loading?`: boolean
|
|
16
16
|
- `trend?`: ReactNode
|
|
17
17
|
- `delta?`: object
|
|
@@ -39,7 +39,7 @@ Example: `<G9KpiGrid />`
|
|
|
39
39
|
|
|
40
40
|
Props:
|
|
41
41
|
- `text`: string
|
|
42
|
-
- `tone?`: '
|
|
42
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
43
43
|
|
|
44
44
|
Example: `<G9LiveBadge text="Label" />`
|
|
45
45
|
|
|
@@ -51,7 +51,7 @@ A live dot with an expanding ring (Riskara Pulse, «online», a running sync).
|
|
|
51
51
|
|
|
52
52
|
Props:
|
|
53
53
|
- `size?`: number = 8
|
|
54
|
-
- `tone?`: '
|
|
54
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "success"
|
|
55
55
|
- `pulse?`: boolean = true
|
|
56
56
|
|
|
57
57
|
Example: `<G9LiveDot />`
|
|
@@ -114,7 +114,7 @@ Props:
|
|
|
114
114
|
- `value?`: number = 0
|
|
115
115
|
- `disabled?`: boolean = false
|
|
116
116
|
- `labelPlacement?`: 'none' | 'above' | 'end' = "none"
|
|
117
|
-
- `progressType?`: '
|
|
117
|
+
- `progressType?`: 'error' | 'primary' | 'success' | 'warning' = "primary"
|
|
118
118
|
- `barHeight?`: number = 10
|
|
119
119
|
- `cornerRadius?`: number = 999
|
|
120
120
|
- `flat?`: boolean
|
|
@@ -132,7 +132,7 @@ Props:
|
|
|
132
132
|
- `value`: number
|
|
133
133
|
- `children?`: ReactNode
|
|
134
134
|
- `size?`: number = 72
|
|
135
|
-
- `tone?`: '
|
|
135
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "primary"
|
|
136
136
|
- `trackColor?`: color
|
|
137
137
|
- `color?`: color
|
|
138
138
|
- `thickness?`: number = 6
|
|
@@ -78,7 +78,7 @@ Props:
|
|
|
78
78
|
- `size?`: 'sm' | 'md' | 'lg'
|
|
79
79
|
- `icon?`: icon
|
|
80
80
|
- `appearance?`: 'solid' | 'outline' | 'plain' | 'soft' = "soft"
|
|
81
|
-
- `tone?`: '
|
|
81
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "neutral"
|
|
82
82
|
- `fillAlpha?`: number = 0.15
|
|
83
83
|
- `bordered?`: boolean
|
|
84
84
|
- `color?`: color
|
|
@@ -94,7 +94,7 @@ Where an order (a delivery, a wizard) is: done, current, to come (ShopManager St
|
|
|
94
94
|
Props:
|
|
95
95
|
- `current`: number
|
|
96
96
|
- `steps`: string[]
|
|
97
|
-
- `tone?`: '
|
|
97
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "primary"
|
|
98
98
|
- `failedAt?`: number
|
|
99
99
|
|
|
100
100
|
Example: `<G9StepTracker current={1} steps={steps} />`
|
|
@@ -109,7 +109,7 @@ Props:
|
|
|
109
109
|
- `text`: string
|
|
110
110
|
- `icon?`: icon
|
|
111
111
|
- `appearance?`: 'solid' | 'outline' | 'plain' | 'soft'
|
|
112
|
-
- `tone?`: '
|
|
112
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
113
113
|
- `emoji?`: string
|
|
114
114
|
|
|
115
115
|
Example: `<G9Tag text="Label" />`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols-graph` (generated)
|
|
2
|
+
|
|
3
|
+
# G9GraphCanvas
|
|
4
|
+
|
|
5
|
+
`import { G9GraphCanvas } from '@g9tm/lynxcontrols-graph';`
|
|
6
|
+
|
|
7
|
+
A node graph editor: app-drawn cards at app-given positions, edges between their ports, lanes behind them.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `nodes`: G9GraphNode[]
|
|
11
|
+
- `renderNode`: (node, state) => ReactNode
|
|
12
|
+
- `onActivate?`: (id: string) => void
|
|
13
|
+
- `onContextMenu?`: (event: G9GraphContextMenuEvent) => void
|
|
14
|
+
- `onDelete?`: (ids: string[]) => void
|
|
15
|
+
- `onDrop?`: (event: G9GraphDropEvent) => void
|
|
16
|
+
- `onEdgePress?`: (id: string) => void
|
|
17
|
+
- `onMove?`: (id: string, x: number, y: number) => void
|
|
18
|
+
|
|
19
|
+
Example: `<G9GraphCanvas nodes={nodes} renderNode={renderNode} />`
|
|
@@ -31,7 +31,7 @@ Props:
|
|
|
31
31
|
- `subtitle?`: string
|
|
32
32
|
- `onPress?`: () => void
|
|
33
33
|
- `disabled?`: boolean = false
|
|
34
|
-
- `iconTone?`: '
|
|
34
|
+
- `iconTone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "neutral"
|
|
35
35
|
- `pressFeedback?`: 'none' | 'tint' = "none"
|
|
36
36
|
|
|
37
37
|
Example: `<G9ListRow title="Label" />`
|
|
@@ -94,7 +94,7 @@ Props:
|
|
|
94
94
|
- `icon?`: icon
|
|
95
95
|
- `subtitle?`: string
|
|
96
96
|
- `disabled?`: boolean = false
|
|
97
|
-
- `iconTone?`: '
|
|
97
|
+
- `iconTone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "neutral"
|
|
98
98
|
- `pressFeedback?`: 'none' | 'tint' = "none"
|
|
99
99
|
|
|
100
100
|
Example: `<G9SwitchRow checked onCheckedChange={() => {}} title="Label" />`
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# `@g9tm/lynxcontrols/pointer` (generated)
|
|
2
|
+
|
|
3
|
+
# G9DragChip
|
|
4
|
+
|
|
5
|
+
`import { G9DragChip } from '@g9tm/lynxcontrols/pointer';`
|
|
6
|
+
|
|
7
|
+
The default preview: the payload's label in a chip.
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
- `payload`: object
|
|
11
|
+
|
|
12
|
+
Example: `<G9DragChip payload={payload} />`
|
|
13
|
+
|
|
14
|
+
# G9DragSource
|
|
15
|
+
|
|
16
|
+
`import { G9DragSource } from '@g9tm/lynxcontrols/pointer';`
|
|
17
|
+
|
|
18
|
+
A drag source around its children (a list row, a card): drawn faded while it is dragged.
|
|
19
|
+
|
|
20
|
+
Props:
|
|
21
|
+
- `payload`: object | () => void
|
|
22
|
+
- `children?`: ReactNode
|
|
23
|
+
- `onDragEnd?`: (drop: G9DropEvent<T> | null) => void
|
|
24
|
+
- `onDragStart?`: (payload: G9DragPayload<T>) => void
|
|
25
|
+
- `renderPreview?`: (payload) => ReactNode
|
|
26
|
+
- `enabled?`: boolean = true
|
|
27
|
+
- `longPress?`: boolean = true
|
|
28
|
+
- `threshold?`: number = 4
|
|
29
|
+
|
|
30
|
+
Example: `<G9DragSource payload={payload} />`
|
|
31
|
+
|
|
32
|
+
# G9DropTarget
|
|
33
|
+
|
|
34
|
+
`import { G9DropTarget } from '@g9tm/lynxcontrols/pointer';`
|
|
35
|
+
|
|
36
|
+
A drop target around its children: outlined while a drag it accepts runs, filled while the drag is over it.
|
|
37
|
+
|
|
38
|
+
Props:
|
|
39
|
+
- `onDrop`: (event: G9DropEvent<T>) => void
|
|
40
|
+
- `children?`: ReactNode
|
|
41
|
+
- `accepts?`: (payload: G9DragPayload<T>) => void
|
|
42
|
+
- `onEnter?`: (payload: G9DragPayload<T>) => void
|
|
43
|
+
- `onLeave?`: (payload: G9DragPayload<T>) => void
|
|
44
|
+
- `enabled?`: boolean = true
|
|
45
|
+
|
|
46
|
+
Example: `<G9DropTarget onDrop={() => {}} />`
|
|
@@ -19,7 +19,7 @@ Example: `<G9ActionSheet onClose={() => {}} open />`
|
|
|
19
19
|
|
|
20
20
|
`import { G9ContextMenu } from '@g9tm/lynxcontrols/popover';`
|
|
21
21
|
|
|
22
|
-
A
|
|
22
|
+
A context menu on its child (G9Hub ContextMenu, a message, a row): a long press on touch (a light haptic, the menu by the child), the right mouse button on a desktop (the menu at the pointer, 2.9.0) and the context-menu
|
|
23
23
|
|
|
24
24
|
Props:
|
|
25
25
|
- `items`: object[]
|
|
@@ -27,7 +27,9 @@ Props:
|
|
|
27
27
|
- `title?`: string
|
|
28
28
|
- `children?`: ReactNode
|
|
29
29
|
- `disabled?`: boolean
|
|
30
|
-
- `onOpen?`: () => void
|
|
30
|
+
- `onOpen?`: (source: G9SecondarySource) => void
|
|
31
|
+
- `keyboard?`: 'focus' | 'off' | 'global'
|
|
32
|
+
- `longPress?`: boolean = true
|
|
31
33
|
|
|
32
34
|
Example: `<G9ContextMenu items={items} onSelect={() => {}} />`
|
|
33
35
|
|
|
@@ -31,7 +31,7 @@ Props:
|
|
|
31
31
|
- `icon?`: icon
|
|
32
32
|
- `onPress?`: () => void
|
|
33
33
|
- `disabled?`: boolean = false
|
|
34
|
-
- `tone?`: '
|
|
34
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral' = "primary"
|
|
35
35
|
- `nodeRef?`: (node: NodesRef | null) => void
|
|
36
36
|
|
|
37
37
|
Example: `<G9Chip text="Label" />`
|
|
@@ -66,7 +66,7 @@ Props:
|
|
|
66
66
|
- `value`: string
|
|
67
67
|
- `size?`: 'sm' | 'md' | 'lg'
|
|
68
68
|
- `appearance?`: 'solid' | 'outline' | 'dashed' | 'soft'
|
|
69
|
-
- `tone?`: '
|
|
69
|
+
- `tone?`: 'info' | 'error' | 'primary' | 'success' | 'warning' | 'accent' | 'neutral'
|
|
70
70
|
- `haptic?`: boolean | string | string | string | string | string | string | string | string | string
|
|
71
71
|
|
|
72
72
|
Example: `<G9ChipStrip items={items} onChange={() => {}} value="value" />`
|