@g9tm/lynxcontrols 2.5.9 → 2.5.10

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.
Files changed (57) hide show
  1. package/catalog/cards/G9Anchor.md +1 -1
  2. package/catalog/cards/G9AppearancePage.md +2 -2
  3. package/catalog/cards/G9ContrastPanel.md +1 -0
  4. package/catalog/cards/G9DesignNode.md +1 -1
  5. package/catalog/cards/G9Keycap.md +1 -1
  6. package/catalog/cards/G9PersonalThemeSheet.md +3 -3
  7. package/catalog/cards/G9ShortcutList.md +1 -1
  8. package/catalog/cards/G9SwipeView.md +1 -1
  9. package/catalog/cards/G9ThemePreviewCard.md +1 -0
  10. package/catalog/cards/G9ThemeTokenEditor.md +17 -0
  11. package/catalog/cards/G9WallpaperSwatch.md +2 -1
  12. package/catalog/catalog.json +863 -81
  13. package/catalog/index.md +2 -1
  14. package/dist/.tsbuildinfo +1 -1
  15. package/dist/appearance/appearance.css +123 -0
  16. package/dist/appearance/appearance.css.map +1 -1
  17. package/dist/appearance/appearance.d.ts +46 -9
  18. package/dist/appearance/appearance.d.ts.map +1 -1
  19. package/dist/appearance/appearance.jsx +201 -31
  20. package/dist/appearance/index.d.ts +1 -0
  21. package/dist/appearance/index.d.ts.map +1 -1
  22. package/dist/appearance/index.jsx +1 -0
  23. package/dist/appearance/token-editor.d.ts +38 -0
  24. package/dist/appearance/token-editor.d.ts.map +1 -0
  25. package/dist/appearance/token-editor.jsx +170 -0
  26. package/dist/display/theme-preview.d.ts +2 -0
  27. package/dist/display/theme-preview.d.ts.map +1 -1
  28. package/dist/display/theme-preview.jsx +10 -4
  29. package/dist/provider/provider.d.ts.map +1 -1
  30. package/dist/provider/provider.jsx +3 -2
  31. package/dist/swipe/model.d.ts +7 -0
  32. package/dist/swipe/model.d.ts.map +1 -1
  33. package/dist/swipe/model.jsx +8 -1
  34. package/dist/swipe/swipe-view.d.ts +7 -0
  35. package/dist/swipe/swipe-view.d.ts.map +1 -1
  36. package/dist/swipe/swipe-view.jsx +34 -6
  37. package/package.json +2 -2
  38. package/skills/g9-lynx-app/SKILL.md +1 -0
  39. package/skills/g9-lynx-app/references/catalog-index.md +9 -5
  40. package/skills/g9-lynx-app/references/components/anchor.md +1 -1
  41. package/skills/g9-lynx-app/references/components/appearance.md +26 -6
  42. package/skills/g9-lynx-app/references/components/calendar-1.md +21 -37
  43. package/skills/g9-lynx-app/references/components/calendar-2.md +38 -1
  44. package/skills/g9-lynx-app/references/components/canvas.md +1 -1
  45. package/skills/g9-lynx-app/references/components/chat-1.md +58 -61
  46. package/skills/g9-lynx-app/references/components/chat-2.md +110 -34
  47. package/skills/g9-lynx-app/references/components/chat-3.md +50 -0
  48. package/skills/g9-lynx-app/references/components/commands.md +1 -1
  49. package/skills/g9-lynx-app/references/components/design.md +1 -1
  50. package/skills/g9-lynx-app/references/components/display-1.md +1 -1
  51. package/skills/g9-lynx-app/references/components/display-3.md +1 -0
  52. package/skills/g9-lynx-app/references/components/media-1.md +75 -77
  53. package/skills/g9-lynx-app/references/components/media-2.md +131 -3
  54. package/skills/g9-lynx-app/references/components/native-media.md +16 -0
  55. package/skills/g9-lynx-app/references/components/projects.md +91 -3
  56. package/skills/g9-lynx-app/references/components/swipe.md +1 -1
  57. package/skills/g9-lynx-app/references/hosting.md +83 -0
@@ -1,16 +1,144 @@
1
1
  # `@g9tm/lynxcontrols-media` (part 2 of 2) (generated)
2
2
 
3
+ # G9HuddleStrip
4
+
5
+ `import { G9HuddleStrip } from '@g9tm/lynxcontrols-media';`
6
+
7
+ The huddle strip above a chat's composer (G9Hub HuddleBar): who is in it with speaking rings, Join or my controls.
8
+
9
+ Props:
10
+ - `countLabel`: (count: number) => void
11
+ - `joinLabel`: string
12
+ - `people`: object[]
13
+ - `title`: string
14
+ - `onJoin?`: () => void
15
+ - `onPeople?`: () => void
16
+ - `busyLabel?`: string
17
+ - `peopleLabel?`: string
18
+
19
+ Example: `<G9HuddleStrip countLabel={countLabel} joinLabel="joinLabel" people={people} title="Label" />`
20
+
21
+ # G9ImageCropper
22
+
23
+ `import { G9ImageCropper } from '@g9tm/lynxcontrols-media';`
24
+
25
+ Drag to place, pinch or the slider to zoom; the crop rectangle in image pixels comes out.
26
+
27
+ Props:
28
+ - `src`: string
29
+ - `onChange?`: (crop: { readonly x: number; readonly y: number; readonly width: number; readonly height: number; }, state: G9CropState) => void
30
+ - `zoomLabel?`: string
31
+ - `frame?`: object
32
+ - `image?`: object
33
+ - `maxZoom?`: number
34
+ - `round?`: boolean
35
+ - `zoomControl?`: 'slider' | 'stepper'
36
+
37
+ Example: `<G9ImageCropper src="src" />`
38
+
39
+ # G9IncomingCall
40
+
41
+ `import { G9IncomingCall } from '@g9tm/lynxcontrols-media';`
42
+
43
+ The incoming-call screen: who calls, decline, answer (and with video).
44
+
45
+ Props:
46
+ - `labels`: object
47
+ - `name`: string
48
+ - `onAccept`: (withVideo: boolean) => void
49
+ - `onDecline`: () => void
50
+ - `subtitle`: string
51
+ - `avatarId?`: string
52
+ - `busy?`: boolean
53
+ - `canVideo?`: boolean
54
+
55
+ Example: `<G9IncomingCall labels={labels} name="name" onAccept={() => {}} onDecline={() => {}} subtitle="subtitle" />`
56
+
57
+ # G9Lightbox
58
+
59
+ `import { G9Lightbox } from '@g9tm/lynxcontrols-media';`
60
+
61
+ The photos full screen on black: swipe between them (Lynx's native `<viewpager>`, snapping), the position «۲ / ۵», a close button; fades in with opacity only.
62
+
63
+ Props:
64
+ - `index`: number
65
+ - `items`: object[]
66
+ - `onClose`: () => void
67
+ - `open`: boolean
68
+ - `renderItem?`: (item, index) => ReactNode
69
+ - `onError?`: (item: G9MediaItem, index: number) => void
70
+ - `onIndexChange?`: (index: number) => void
71
+ - `onPlay?`: (item: G9MediaItem, index: number) => void
72
+
73
+ Example: `<G9Lightbox index={1} items={items} onClose={() => {}} open />`
74
+
75
+ # G9MediaGrid
76
+
77
+ `import { G9MediaGrid } from '@g9tm/lynxcontrols-media';`
78
+
79
+ 1–4 tiles (and «+k» on the fourth) in a chat or feed post; a tap opens the photo.
80
+
81
+ Props:
82
+ - `items`: object[]
83
+ - `width`: number
84
+ - `formatSize?`: (bytes: number) => void
85
+ - `onCancel?`: (index: number) => void
86
+ - `onError?`: (index: number) => void
87
+ - `onLoad?`: (index: number) => void
88
+ - `onOpen?`: (index: number) => void
89
+ - `cancelLabel?`: string
90
+
91
+ Example: `<G9MediaGrid items={items} width={1} />`
92
+
93
+ # G9MediaPager
94
+
95
+ `import { G9MediaPager } from '@g9tm/lynxcontrols-media';`
96
+
97
+ Pictures one per page, swiped (Lynx's native `<viewpager>`, snapping), each fitted on the page.
98
+
99
+ Props:
100
+ - `index`: number
101
+ - `items`: object[]
102
+ - `renderItem?`: (item, index) => ReactNode
103
+ - `onError?`: (item: G9MediaItem, index: number) => void
104
+ - `onIndexChange?`: (index: number) => void
105
+ - `onPlay?`: (item: G9MediaItem, index: number) => void
106
+ - `onSwipeClose?`: () => void
107
+ - `onZoomChange?`: (scale: number) => void
108
+
109
+ Example: `<G9MediaPager index={1} items={items} />`
110
+
111
+ # G9MiniCall
112
+
113
+ `import { G9MiniCall } from '@g9tm/lynxcontrols-media';`
114
+
115
+ The minimized call (G9Hub MiniCall): a floating bar with the video or avatar, the timer, mute and hang-up.
116
+
117
+ Props:
118
+ - `micOn`: boolean
119
+ - `onExpand`: () => void
120
+ - `onHangUp`: () => void
121
+ - `onMic`: () => void
122
+ - `title`: string
123
+ - `words`: object
124
+ - `reconnectingLabel?`: string
125
+ - `video?`: ReactNode
126
+
127
+ Example: `<G9MiniCall micOn onExpand={() => {}} onHangUp={() => {}} onMic={() => {}} title="Label" words={words} />`
128
+
3
129
  # G9QualityBars
4
130
 
5
131
  `import { G9QualityBars } from '@g9tm/lynxcontrols-media';`
6
132
 
7
- Four signal bars, the lit ones by quality.
133
+ A call's connection quality as four bars.
8
134
 
9
135
  Props:
10
- - `quality`: 'poor' | 'excellent' | 'good' | 'lost'
136
+ - `quality`: 'unknown' | 'poor' | 'excellent' | 'good' | 'lost'
11
137
  - `size?`: number
138
+ - `color?`: color
139
+ - `accessibilityLabel?`: string
12
140
 
13
- Example: `<G9QualityBars quality="poor" />`
141
+ Example: `<G9QualityBars quality="unknown" />`
14
142
 
15
143
  # G9SelfPip
16
144
 
@@ -0,0 +1,16 @@
1
+ # `@g9tm/lynxcontrols-native/media` (generated)
2
+
3
+ # G9TrackVideo
4
+
5
+ `import { G9TrackVideo } from '@g9tm/lynxcontrols-native/media';`
6
+
7
+ A live call track in `<g9-video track>` (2.5.10, G9Hub 92): a call tile's `video` — the host's RTC engine (LiveKit) draws it, so the app's thread has no RTC code.
8
+
9
+ Props:
10
+ - `track`: string
11
+ - `onError?`: (code: string, message: string) => void
12
+ - `onReady?`: () => void
13
+ - `fit?`: 'contain' | 'cover'
14
+ - `mirror?`: boolean
15
+
16
+ Example: `<G9TrackVideo track="track" />`
@@ -1,5 +1,23 @@
1
1
  # `@g9tm/lynxcontrols-projects` (generated)
2
2
 
3
+ # G9ActivityFeed
4
+
5
+ `import { G9ActivityFeed } from '@g9tm/lynxcontrols-projects';`
6
+
7
+ Changes newest first under a header per day, a rail with a node per entry, «more» paging.
8
+
9
+ Props:
10
+ - `items`: object[]
11
+ - `dayLabel?`: (dayStartMs: number, epochDays: number) => void
12
+ - `onMore?`: () => void
13
+ - `onOpen?`: (item: G9ActivityItem) => void
14
+ - `loading?`: boolean
15
+ - `height?`: number
16
+ - `now?`: number
17
+ - `utcOffsetMinutes?`: number = 0
18
+
19
+ Example: `<G9ActivityFeed items={items} />`
20
+
3
21
  # G9Board
4
22
 
5
23
  `import { G9Board } from '@g9tm/lynxcontrols-projects';`
@@ -18,6 +36,76 @@ Props:
18
36
 
19
37
  Example: `<G9Board columns={columns} getKey={getKey} renderCard={renderCard} />`
20
38
 
39
+ # G9FileBrowser
40
+
41
+ `import { G9FileBrowser } from '@g9tm/lynxcontrols-projects';`
42
+
43
+ A project's files: folders, a breadcrumb, grid or list, previews, multi-select, uploads, menus, sorting.
44
+
45
+ Props:
46
+ - `items`: object[]
47
+ - `selected?`: string[]
48
+ - `columns?`: number
49
+ - `formatSize?`: (bytes: number) => void
50
+ - `menuFor?`: (item: G9FileEntry) => void
51
+ - `onMenu?`: (key: string, item: G9FileEntry) => void
52
+ - `onNavigate?`: (folderId: string | null) => void
53
+ - `onOpen?`: (item: G9FileEntry) => void
54
+
55
+ Example: `<G9FileBrowser items={items} />`
56
+
57
+ # G9FormBuilder
58
+
59
+ `import { G9FormBuilder } from '@g9tm/lynxcontrols-projects';`
60
+
61
+ A form's questions edited: cards dragged to reorder, a kind menu, the options, required, duplicate, delete.
62
+
63
+ Props:
64
+ - `onChange`: (questions: readonly G9FormQuestion[]) => void
65
+ - `questions`: object[]
66
+ - `words`: object
67
+ - `newId?`: () => void
68
+ - `rowHeight?`: number = 220
69
+ - `kinds?`: 'number' | 'text' | 'date' | 'single' | 'longText' | 'multi' | 'dropdown' | 'rating' | 'scale' | 'file'[]
70
+
71
+ Example: `<G9FormBuilder onChange={() => {}} questions={questions} words={words} />`
72
+
73
+ # G9OrgChart
74
+
75
+ `import { G9OrgChart } from '@g9tm/lynxcontrols-projects';`
76
+
77
+ Who reports to whom: a zoomable tree on a wide window, a nested list on a phone.
78
+
79
+ Props:
80
+ - `people`: object[]
81
+ - `onOpen?`: (id: string) => void
82
+ - `focusId?`: string
83
+ - `height?`: number = 480
84
+ - `initialDepth?`: number
85
+ - `layout?`: 'auto' | 'list' | 'tree'
86
+ - `query?`: string
87
+ - `searchPlaceholder?`: string
88
+
89
+ Example: `<G9OrgChart people={people} />`
90
+
91
+ # G9QuestionField
92
+
93
+ `import { G9QuestionField } from '@g9tm/lynxcontrols-projects';`
94
+
95
+ One question answered: its title (with the required mark), the help, the field of its kind, the problem.
96
+
97
+ Props:
98
+ - `onChange`: (answer: G9FormAnswer) => void
99
+ - `question`: object
100
+ - `value`: string | number | object | string[] | G9AnswerFile[]
101
+ - `disabled?`: boolean
102
+ - `onPickFiles?`: () => void
103
+ - `onRemoveFile?`: (fileId: string) => void
104
+ - `problem?`: string
105
+ - `words?`: object
106
+
107
+ Example: `<G9QuestionField onChange={() => {}} question={question} value={value} />`
108
+
21
109
  # G9RuleBuilder
22
110
 
23
111
  `import { G9RuleBuilder } from '@g9tm/lynxcontrols-projects';`
@@ -63,11 +151,11 @@ A Gantt chart: rows and bars an app keeps, moved and resized on the main thread,
63
151
  Props:
64
152
  - `rows`: object[]
65
153
  - `today`: number
154
+ - `announceLabel?`: (row: G9TimelineRow, span: G9DaySpan) => void
66
155
  - `barLabel?`: (row: G9TimelineRow) => void
156
+ - `onAnnounce?`: (text: string) => void
157
+ - `onFocusChange?`: (key: string) => void
67
158
  - `onOpen?`: (key: string) => void
68
159
  - `onSpanChange?`: (key: string, span: G9DaySpan) => void
69
- - `onZoomChange?`: (zoom: G9TimelineZoom) => void
70
- - `todayLabel?`: string
71
- - `labelWidth?`: number = 160
72
160
 
73
161
  Example: `<G9Timeline rows={rows} today={1} />`
@@ -26,6 +26,6 @@ Props:
26
26
  - `cardBackground?`: color
27
27
  - `cardStroke?`: color
28
28
  - `cardStrokeThickness?`: number
29
- - `itemKey?`: string | number
29
+ - `enabled?`: boolean = true
30
30
 
31
31
  Example: `<G9SwipeView />`
@@ -0,0 +1,83 @@
1
+ # Hosting the native elements
2
+
3
+ Six packages draw through an element the host registers: `-richtext` (`<g9-richtext>`), `-canvas` (`<g9-canvas>`),
4
+ `-media` (the call tiles' `<g9-video>`, the blurhash `<g9-blurhash>`), `-chat` (pictures in rich messages),
5
+ `-native` (the elements themselves, `<g9-video>` and the digit-drawing `<input>` / `<textarea>`) and `-web` (the
6
+ browser's versions). An element the host did not register breaks the page's render, so register every element the
7
+ app's screens use, on every host it ships to. The step-by-step host setup is `docs/integration/<platform>.md` in the
8
+ library; this page is the checklist.
9
+
10
+ ## iOS: two pods
11
+
12
+ ```ruby
13
+ pod 'g9lynx-native', :path => '../node_modules/@g9tm/lynxcontrols-native/ios'
14
+ pod 'g9lynx-native-swift', :path => '../node_modules/@g9tm/lynxcontrols-native/ios'
15
+ ```
16
+
17
+ Name both, with the same `:path`. `g9lynx-native` is Objective-C (the modules, `<g9-video>`, the fields);
18
+ `g9lynx-native-swift` holds the Swift views behind `<g9-richtext>`, `<g9-canvas>` and `<g9-blurhash>`. Register the
19
+ elements on each `LynxConfig` (none is process-wide):
20
+
21
+ ```objc
22
+ [config registerUI:G9LCRichTextUI.class withName:@"g9-richtext"];
23
+ [config registerUI:G9LCCanvasUI.class withName:@"g9-canvas"];
24
+ [config registerUI:G9LCBlurhashUI.class withName:@"g9-blurhash"];
25
+ [config registerUI:G9LCVideoUI.class withName:@"g9-video"];
26
+ [G9InputBehaviors registerOn:config];
27
+ ```
28
+
29
+ Hooks, set once before the first page:
30
+
31
+ - `G9LCImages.session`: the `URLSession` that fetches pictures for rich text and the canvas (a pinned client).
32
+ - `[G9LCCanvasFiles setRegister:^(NSData *png, NSString *name, NSString *mime) { … }]`: where an exported board goes
33
+ (default a temporary file); return the `file` the `cvexport` event carries (`id`, `name`, `size`, `mime`, `uri`).
34
+ - `[G9LCVideoTracks registerRenderer:renderer]`: the RTC engine that draws `<g9-video track>` (below).
35
+
36
+ ## Android: behaviours and two hooks
37
+
38
+ ```kotlin
39
+ LynxViewBuilder().addBehaviors(
40
+ hostBehaviors + G9InputBehaviors.create() + G9VideoBehaviors.create() +
41
+ G9RichTextBehaviors.create() + G9CanvasBehaviors.create() + G9BlurhashBehaviors.create(),
42
+ )
43
+ ```
44
+
45
+ Hooks, set once in the `Application`:
46
+
47
+ - `G9NativeImages.fetch = { url -> bytesOrNull }`: how rich text and the canvas fetch pictures (default
48
+ `HttpURLConnection`).
49
+ - `G9CanvasFiles.register = { file, name, mime -> mapOf("id" to …, "uri" to …) }`: where an exported board goes.
50
+ - `G9VideoTracks.register { track, container, mirror, cover -> attachment }`: the RTC engine for `<g9-video track>`.
51
+ - The activity theme: `<item name="android:defaultFocusHighlightEnabled">false</item>` (a key press otherwise dims the
52
+ whole page).
53
+
54
+ ## Web: register the elements on the page
55
+
56
+ The host page (not the Lynx bundle) imports `@g9tm/lynxcontrols-web` and registers what the app uses:
57
+
58
+ ```ts
59
+ import { installG9WebHost, registerG9Canvas, registerG9RichText, registerG9Video } from '@g9tm/lynxcontrols-web';
60
+
61
+ registerG9RichText();
62
+ registerG9Canvas({
63
+ fonts: [{ family: 'G9Board-Excalifont', url: '/fonts/Excalifont.woff2' }],
64
+ registerFile: (blob, name, size) => appFiles.add(blob, name, size), // the exported picture as the app's file
65
+ });
66
+ registerG9Video({ tracks: { attach: (id, video) => liveKit.attach(id, video) } });
67
+ installG9WebHost(view);
68
+ ```
69
+
70
+ ## Desktop (Lynxtron): the canvas page
71
+
72
+ Lynxtron draws `<g9-canvas>` in a page of its own: give the board's controller a `G9CanvasDesktopHost` (prepare the
73
+ page, its address per canvas id, `send`, `onEvent`) from the main process's bridge, and `<G9Canvas desktop={host}>`
74
+ shows it in a `<webview>`. Rich text and video use the web versions inside the desktop page.
75
+
76
+ ## `<g9-video track>`: live call video
77
+
78
+ A call tile's `video` is the app's element. With the track protocol (2.5.10) the app writes
79
+ `<G9TrackVideo track={participant.videoTrackId} mirror={isSelf} fit="cover" />` (`@g9tm/lynxcontrols-native/media`)
80
+ and the host's RTC engine draws it — the page's thread holds no RTC code. The host registers one renderer per
81
+ platform (Android `G9VideoTracks.register`, iOS `G9LCVideoTracks registerRenderer:`, web `registerG9Video({ tracks })`);
82
+ `attach` puts the engine's own view (LiveKit's `VideoView` / `<video>`) into the element and returns how to detach.
83
+ Without a renderer the element sends `error { code: 'no-track-renderer' }`; an unknown track `track-unknown`.