@g9tm/lynxcontrols 2.5.9 → 2.5.11
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/catalog/cards/G9Anchor.md +1 -1
- package/catalog/cards/G9AppearancePage.md +2 -2
- package/catalog/cards/G9ContrastPanel.md +1 -0
- package/catalog/cards/G9DesignNode.md +1 -1
- package/catalog/cards/G9Keycap.md +1 -1
- package/catalog/cards/G9PersonalThemeSheet.md +3 -3
- package/catalog/cards/G9ShortcutList.md +1 -1
- package/catalog/cards/G9SwipeView.md +1 -1
- package/catalog/cards/G9ThemePreviewCard.md +1 -0
- package/catalog/cards/G9ThemeTokenEditor.md +17 -0
- package/catalog/cards/G9WallpaperSwatch.md +2 -1
- package/catalog/catalog.json +1172 -224
- package/catalog/index.md +2 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/appearance/appearance.css +201 -0
- package/dist/appearance/appearance.css.map +1 -1
- package/dist/appearance/appearance.d.ts +75 -9
- package/dist/appearance/appearance.d.ts.map +1 -1
- package/dist/appearance/appearance.jsx +333 -56
- package/dist/appearance/index.d.ts +1 -0
- package/dist/appearance/index.d.ts.map +1 -1
- package/dist/appearance/index.jsx +1 -0
- package/dist/appearance/token-editor.d.ts +52 -0
- package/dist/appearance/token-editor.d.ts.map +1 -0
- package/dist/appearance/token-editor.jsx +205 -0
- package/dist/display/theme-preview.d.ts +2 -0
- package/dist/display/theme-preview.d.ts.map +1 -1
- package/dist/display/theme-preview.jsx +10 -4
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +3 -2
- package/dist/swipe/index.d.ts +1 -1
- package/dist/swipe/index.d.ts.map +1 -1
- package/dist/swipe/index.jsx +1 -1
- package/dist/swipe/model.d.ts +7 -0
- package/dist/swipe/model.d.ts.map +1 -1
- package/dist/swipe/model.jsx +8 -1
- package/dist/swipe/swipe-view.d.ts +7 -0
- package/dist/swipe/swipe-view.d.ts.map +1 -1
- package/dist/swipe/swipe-view.jsx +34 -6
- package/package.json +2 -2
- package/skills/g9-lynx-app/SKILL.md +1 -0
- package/skills/g9-lynx-app/references/catalog-index.md +9 -5
- package/skills/g9-lynx-app/references/components/anchor.md +1 -1
- package/skills/g9-lynx-app/references/components/appearance.md +26 -6
- package/skills/g9-lynx-app/references/components/calendar-1.md +21 -37
- package/skills/g9-lynx-app/references/components/calendar-2.md +38 -1
- package/skills/g9-lynx-app/references/components/canvas.md +1 -1
- package/skills/g9-lynx-app/references/components/chat-1.md +58 -61
- package/skills/g9-lynx-app/references/components/chat-2.md +111 -34
- package/skills/g9-lynx-app/references/components/chat-3.md +61 -0
- package/skills/g9-lynx-app/references/components/commands.md +1 -1
- package/skills/g9-lynx-app/references/components/design.md +1 -1
- package/skills/g9-lynx-app/references/components/display-1.md +1 -1
- package/skills/g9-lynx-app/references/components/display-3.md +1 -0
- package/skills/g9-lynx-app/references/components/media-1.md +75 -77
- package/skills/g9-lynx-app/references/components/media-2.md +131 -3
- package/skills/g9-lynx-app/references/components/native-media.md +34 -0
- package/skills/g9-lynx-app/references/components/projects.md +91 -3
- package/skills/g9-lynx-app/references/components/swipe.md +1 -1
- package/skills/g9-lynx-app/references/hosting.md +83 -0
|
@@ -17,6 +17,24 @@ Props:
|
|
|
17
17
|
|
|
18
18
|
Example: `<G9BlurhashView hash="hash" height={height} width={width} />`
|
|
19
19
|
|
|
20
|
+
# G9CallButton
|
|
21
|
+
|
|
22
|
+
`import { G9CallButton } from '@g9tm/lynxcontrols-media';`
|
|
23
|
+
|
|
24
|
+
One round call button: an icon, on/off/end/accept fills, busy, a badge (2.5.10).
|
|
25
|
+
|
|
26
|
+
Props:
|
|
27
|
+
- `label`: string
|
|
28
|
+
- `onPress`: () => void
|
|
29
|
+
- `size?`: number
|
|
30
|
+
- `icon?`: icon
|
|
31
|
+
- `disabled?`: boolean
|
|
32
|
+
- `onLongPress?`: () => void
|
|
33
|
+
- `caption?`: boolean
|
|
34
|
+
- `tone?`: 'end' | 'accept'
|
|
35
|
+
|
|
36
|
+
Example: `<G9CallButton label="Label" onPress={() => {}} />`
|
|
37
|
+
|
|
20
38
|
# G9CallControls
|
|
21
39
|
|
|
22
40
|
`import { G9CallControls } from '@g9tm/lynxcontrols-media';`
|
|
@@ -25,9 +43,30 @@ The control bar under a call: round buttons, the hang-up red.
|
|
|
25
43
|
|
|
26
44
|
Props:
|
|
27
45
|
- `controls`: object[]
|
|
46
|
+
- `size?`: number
|
|
47
|
+
- `captions?`: boolean
|
|
48
|
+
- `light?`: boolean
|
|
28
49
|
|
|
29
50
|
Example: `<G9CallControls controls={controls} />`
|
|
30
51
|
|
|
52
|
+
# G9CallPreview
|
|
53
|
+
|
|
54
|
+
`import { G9CallPreview } from '@g9tm/lynxcontrols-media';`
|
|
55
|
+
|
|
56
|
+
The pre-join screen (G9Hub PreJoin): the preview, the meter, the switches, a name, devices, the captcha, join.
|
|
57
|
+
|
|
58
|
+
Props:
|
|
59
|
+
- `cameraOn`: boolean
|
|
60
|
+
- `joinLabel`: string
|
|
61
|
+
- `micOn`: boolean
|
|
62
|
+
- `onCamera`: (on: boolean) => void
|
|
63
|
+
- `onJoin`: () => void
|
|
64
|
+
- `onMic`: (on: boolean) => void
|
|
65
|
+
- `words`: object
|
|
66
|
+
- `title?`: string
|
|
67
|
+
|
|
68
|
+
Example: `<G9CallPreview cameraOn joinLabel="joinLabel" micOn onCamera={() => {}} onJoin={() => {}} onMic={() => {}} words={words} />`
|
|
69
|
+
|
|
31
70
|
# G9CallStage
|
|
32
71
|
|
|
33
72
|
`import { G9CallStage } from '@g9tm/lynxcontrols-media';`
|
|
@@ -95,6 +134,24 @@ Props:
|
|
|
95
134
|
|
|
96
135
|
Example: `<G9ClipPlayer seconds={1} />`
|
|
97
136
|
|
|
137
|
+
# G9DeviceSettings
|
|
138
|
+
|
|
139
|
+
`import { G9DeviceSettings } from '@g9tm/lynxcontrols-media';`
|
|
140
|
+
|
|
141
|
+
The call's device settings (G9Hub DeviceSettings).
|
|
142
|
+
|
|
143
|
+
Props:
|
|
144
|
+
- `effects?`: ReactNode
|
|
145
|
+
- `audioOnly?`: object
|
|
146
|
+
- `camera?`: object
|
|
147
|
+
- `layout?`: object
|
|
148
|
+
- `microphone?`: object
|
|
149
|
+
- `route?`: object
|
|
150
|
+
- `speaker?`: object
|
|
151
|
+
- `speakerNote?`: string
|
|
152
|
+
|
|
153
|
+
Example: `<G9DeviceSettings />`
|
|
154
|
+
|
|
98
155
|
# G9DropZone
|
|
99
156
|
|
|
100
157
|
`import { G9DropZone } from '@g9tm/lynxcontrols-media';`
|
|
@@ -113,91 +170,32 @@ Props:
|
|
|
113
170
|
|
|
114
171
|
Example: `<G9DropZone label="Label" onFiles={() => {}} />`
|
|
115
172
|
|
|
116
|
-
#
|
|
173
|
+
# G9EffectsPicker
|
|
117
174
|
|
|
118
|
-
`import {
|
|
175
|
+
`import { G9EffectsPicker } from '@g9tm/lynxcontrols-media';`
|
|
119
176
|
|
|
120
|
-
|
|
177
|
+
Background and noise suppression (G9Hub EffectsPicker): a busy spinner on the tile while the engine applies it.
|
|
121
178
|
|
|
122
179
|
Props:
|
|
123
|
-
- `
|
|
124
|
-
- `
|
|
125
|
-
- `
|
|
126
|
-
- `
|
|
127
|
-
- `
|
|
128
|
-
- `
|
|
129
|
-
- `
|
|
130
|
-
- `
|
|
180
|
+
- `background`: object | object | object
|
|
181
|
+
- `onBackground`: (choice: G9BackgroundChoice) => void
|
|
182
|
+
- `words`: object
|
|
183
|
+
- `columns?`: number = 4
|
|
184
|
+
- `onNoise?`: (mode: G9NoiseMode) => void
|
|
185
|
+
- `backgroundSupported?`: boolean = true
|
|
186
|
+
- `noise?`: 'off' | 'strong' | 'browser'
|
|
187
|
+
- `pictures?`: object[]
|
|
131
188
|
|
|
132
|
-
Example: `<
|
|
189
|
+
Example: `<G9EffectsPicker background={background} onBackground={onBackground} words={words} />`
|
|
133
190
|
|
|
134
|
-
#
|
|
191
|
+
# G9HuddleBadge
|
|
135
192
|
|
|
136
|
-
`import {
|
|
193
|
+
`import { G9HuddleBadge } from '@g9tm/lynxcontrols-media';`
|
|
137
194
|
|
|
138
|
-
|
|
195
|
+
A live huddle's badge (a conversation row's `trailing`): headphones and the count.
|
|
139
196
|
|
|
140
197
|
Props:
|
|
141
|
-
- `
|
|
142
|
-
- `
|
|
143
|
-
- `onAccept`: (withVideo: boolean) => void
|
|
144
|
-
- `onDecline`: () => void
|
|
145
|
-
- `subtitle`: string
|
|
146
|
-
- `busy?`: boolean
|
|
147
|
-
- `canVideo?`: boolean
|
|
148
|
-
- `full?`: boolean
|
|
149
|
-
|
|
150
|
-
Example: `<G9IncomingCall labels={labels} name="name" onAccept={() => {}} onDecline={() => {}} subtitle="subtitle" />`
|
|
151
|
-
|
|
152
|
-
# G9Lightbox
|
|
153
|
-
|
|
154
|
-
`import { G9Lightbox } from '@g9tm/lynxcontrols-media';`
|
|
155
|
-
|
|
156
|
-
The photos full screen on black: swipe between them (Lynx's native `<viewpager>`, snapping), the position «۲ / ۵», a close button; fades in with opacity only.
|
|
157
|
-
|
|
158
|
-
Props:
|
|
159
|
-
- `index`: number
|
|
160
|
-
- `items`: object[]
|
|
161
|
-
- `onClose`: () => void
|
|
162
|
-
- `open`: boolean
|
|
163
|
-
- `renderItem?`: (item, index) => ReactNode
|
|
164
|
-
- `onError?`: (item: G9MediaItem, index: number) => void
|
|
165
|
-
- `onIndexChange?`: (index: number) => void
|
|
166
|
-
- `onPlay?`: (item: G9MediaItem, index: number) => void
|
|
167
|
-
|
|
168
|
-
Example: `<G9Lightbox index={1} items={items} onClose={() => {}} open />`
|
|
169
|
-
|
|
170
|
-
# G9MediaGrid
|
|
171
|
-
|
|
172
|
-
`import { G9MediaGrid } from '@g9tm/lynxcontrols-media';`
|
|
173
|
-
|
|
174
|
-
1–4 tiles (and «+k» on the fourth) in a chat or feed post; a tap opens the photo.
|
|
175
|
-
|
|
176
|
-
Props:
|
|
177
|
-
- `items`: object[]
|
|
178
|
-
- `width`: number
|
|
179
|
-
- `onCancel?`: (index: number) => void
|
|
180
|
-
- `onOpen?`: (index: number) => void
|
|
181
|
-
- `cancelLabel?`: string
|
|
182
|
-
- `radius?`: number
|
|
183
|
-
- `gap?`: number
|
|
184
|
-
- `height?`: number
|
|
185
|
-
|
|
186
|
-
Example: `<G9MediaGrid items={items} width={1} />`
|
|
187
|
-
|
|
188
|
-
# G9MediaPager
|
|
189
|
-
|
|
190
|
-
`import { G9MediaPager } from '@g9tm/lynxcontrols-media';`
|
|
191
|
-
|
|
192
|
-
Pictures one per page, swiped (Lynx's native `<viewpager>`, snapping), each fitted on the page.
|
|
198
|
+
- `count`: number
|
|
199
|
+
- `label?`: string
|
|
193
200
|
|
|
194
|
-
|
|
195
|
-
- `index`: number
|
|
196
|
-
- `items`: object[]
|
|
197
|
-
- `renderItem?`: (item, index) => ReactNode
|
|
198
|
-
- `onError?`: (item: G9MediaItem, index: number) => void
|
|
199
|
-
- `onIndexChange?`: (index: number) => void
|
|
200
|
-
- `onPlay?`: (item: G9MediaItem, index: number) => void
|
|
201
|
-
- `playLabel?`: string
|
|
202
|
-
|
|
203
|
-
Example: `<G9MediaPager index={1} items={items} />`
|
|
201
|
+
Example: `<G9HuddleBadge count={1} />`
|
|
@@ -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
|
-
|
|
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="
|
|
141
|
+
Example: `<G9QualityBars quality="unknown" />`
|
|
14
142
|
|
|
15
143
|
# G9SelfPip
|
|
16
144
|
|
|
@@ -0,0 +1,34 @@
|
|
|
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" />`
|
|
17
|
+
|
|
18
|
+
# G9VideoPlayer
|
|
19
|
+
|
|
20
|
+
`import { G9VideoPlayer } from '@g9tm/lynxcontrols-native/media';`
|
|
21
|
+
|
|
22
|
+
A recording with controls (2.5.11, G9Hub 97: video notes, meeting recordings): `<g9-video>` with play / pause, back and forward 10 s, a bar that seeks where it is tapped, the time and mute — the same on Android, iOS and
|
|
23
|
+
|
|
24
|
+
Props:
|
|
25
|
+
- `src`: string
|
|
26
|
+
- `formatTime?`: (seconds: number) => void
|
|
27
|
+
- `onEnded?`: () => void
|
|
28
|
+
- `onError?`: (code: string, message: string) => void
|
|
29
|
+
- `autoPlay?`: boolean = false
|
|
30
|
+
- `fit?`: 'contain' | 'cover'
|
|
31
|
+
- `muted?`: boolean = false
|
|
32
|
+
- `words?`: object
|
|
33
|
+
|
|
34
|
+
Example: `<G9VideoPlayer id="id" src="src" />`
|
|
@@ -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
|
+
- `onCancelUpload?`: (id: string) => void
|
|
52
|
+
- `onMenu?`: (key: string, item: G9FileEntry) => void
|
|
53
|
+
- `onNavigate?`: (folderId: string | null) => 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' | 'section'[]
|
|
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} />`
|
|
@@ -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`.
|