one 2.13.10 → 2.14.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/android/src/main/java/dev/onejs/one/OneKotlinHostView.kt +53 -14
- package/android/src/main/java/dev/onejs/one/OneNativeSourceKeyedState.kt +23 -0
- package/android/src/main/java/dev/onejs/one/OneNativeSourceViewDispatch.kt +16 -3
- package/dist/cjs/platform/native-source/view.native.cjs +4 -4
- package/dist/cjs/platform/native-source/view.native.js +4 -4
- package/dist/cjs/platform/native-source/view.native.js.map +1 -1
- package/dist/cjs/platform/native-source/wire.native.cjs +152 -49
- package/dist/cjs/platform/native-source/wire.native.js +152 -49
- package/dist/cjs/platform/native-source/wire.native.js.map +1 -1
- package/dist/cjs/platform/native-source/wireProps.native.cjs +138 -0
- package/dist/cjs/platform/native-source/wireProps.native.js +140 -0
- package/dist/cjs/platform/native-source/wireProps.native.js.map +1 -0
- package/dist/cjs/platform/swift/index.native.cjs +12 -8
- package/dist/cjs/platform/swift/index.native.js +12 -8
- package/dist/cjs/platform/swift/index.native.js.map +1 -1
- package/dist/esm/platform/native-source/view.native.js +5 -5
- package/dist/esm/platform/native-source/view.native.js.map +1 -1
- package/dist/esm/platform/native-source/wire.native.js +149 -49
- package/dist/esm/platform/native-source/wire.native.js.map +1 -1
- package/dist/esm/platform/native-source/wireProps.native.js +113 -0
- package/dist/esm/platform/native-source/wireProps.native.js.map +1 -0
- package/dist/esm/platform/swift/index.native.js +13 -9
- package/dist/esm/platform/swift/index.native.js.map +1 -1
- package/ios/OneNativeComposition.swift +1 -0
- package/ios/OneNativeHostingController.swift +113 -0
- package/ios/OneSwiftHostComponentView.mm +28 -4
- package/ios/OneSwiftHostView.swift +63 -9
- package/ios/OneSwiftPackage.swift +6 -1
- package/package.json +13 -13
- package/src/platform/native-source/view.native.tsx +4 -5
- package/src/platform/native-source/wire.native.ts +108 -26
- package/src/platform/native-source/wireProps.native.test.ts +57 -0
- package/src/platform/native-source/wireProps.native.ts +124 -0
- package/src/platform/swift/index.native.tsx +9 -7
- package/src/platform/swift/types.ts +4 -2
- package/types/platform/native-source/view.native.d.ts.map +1 -1
- package/types/platform/native-source/wire.native.d.ts +3 -0
- package/types/platform/native-source/wire.native.d.ts.map +1 -1
- package/types/platform/native-source/wireProps.native.d.ts +15 -0
- package/types/platform/native-source/wireProps.native.d.ts.map +1 -0
- package/types/platform/swift/index.native.d.ts.map +1 -1
- package/types/platform/swift/types.d.ts +4 -1
- package/types/platform/swift/types.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "one",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"description": "One is a React framework for web, iOS, and Android apps.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"sideEffects": [
|
|
@@ -282,15 +282,15 @@
|
|
|
282
282
|
"@react-navigation/routers": "8.0.0-alpha.21",
|
|
283
283
|
"@rozenite/middleware": "^2.5.0",
|
|
284
284
|
"@ungap/structured-clone": "^1.2.0",
|
|
285
|
-
"@vxrn/color-scheme": "2.
|
|
286
|
-
"@vxrn/compiler": "2.
|
|
287
|
-
"@vxrn/resolve": "2.
|
|
288
|
-
"@vxrn/tslib-lite": "2.
|
|
289
|
-
"@vxrn/use-isomorphic-layout-effect": "2.
|
|
290
|
-
"@vxrn/utils": "2.
|
|
285
|
+
"@vxrn/color-scheme": "2.14.1",
|
|
286
|
+
"@vxrn/compiler": "2.14.1",
|
|
287
|
+
"@vxrn/resolve": "2.14.1",
|
|
288
|
+
"@vxrn/tslib-lite": "2.14.1",
|
|
289
|
+
"@vxrn/use-isomorphic-layout-effect": "2.14.1",
|
|
290
|
+
"@vxrn/utils": "2.14.1",
|
|
291
291
|
"citty": "^0.1.6",
|
|
292
292
|
"core-js": "^3.38.1",
|
|
293
|
-
"create-vxrn": "2.
|
|
293
|
+
"create-vxrn": "2.14.1",
|
|
294
294
|
"escape-string-regexp": "^5.0.0",
|
|
295
295
|
"fast-deep-equal": "^3.1.3",
|
|
296
296
|
"fast-glob": "^3.3.3",
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
"tsconfig-paths": "^4",
|
|
313
313
|
"use-latest-callback": "^0.3.5",
|
|
314
314
|
"vite": "^8.2.2",
|
|
315
|
-
"vxrn": "2.
|
|
315
|
+
"vxrn": "2.14.1",
|
|
316
316
|
"web-streams-polyfill": "^4.3.0",
|
|
317
317
|
"ws": "^8.21.0",
|
|
318
318
|
"xxhashjs": "^0.2.2"
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
"@babel/types": "^7.28.5",
|
|
343
343
|
"babel-dead-code-elimination": "1.0.10",
|
|
344
344
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
345
|
-
"@vxrn/vite-plugin-metro": "2.
|
|
345
|
+
"@vxrn/vite-plugin-metro": "2.14.1"
|
|
346
346
|
},
|
|
347
347
|
"peerDependenciesMeta": {
|
|
348
348
|
"@react-native/babel-preset": {
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
"@types/react-dom": "^19.3.0",
|
|
417
417
|
"@types/react-test-renderer": "^19.1.0",
|
|
418
418
|
"@types/xxhashjs": "^0.2.4",
|
|
419
|
-
"@vxrn/emitter": "2.
|
|
419
|
+
"@vxrn/emitter": "2.14.1",
|
|
420
420
|
"depcheck": "^1.4.7",
|
|
421
421
|
"esbuild": "^0.25.12",
|
|
422
422
|
"immer": "^10.1.1",
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
"@babel/types": "^7.28.5",
|
|
445
445
|
"babel-dead-code-elimination": "1.0.10",
|
|
446
446
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
447
|
-
"@vxrn/vite-plugin-metro": "2.
|
|
447
|
+
"@vxrn/vite-plugin-metro": "2.14.1"
|
|
448
448
|
},
|
|
449
449
|
"publishConfig": {
|
|
450
450
|
"access": "public"
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
},
|
|
615
|
-
"releaseSourceCommit": "
|
|
615
|
+
"releaseSourceCommit": "e780d1ad0bdf938d0e21a5cdff99a0cc78184030",
|
|
616
616
|
"repository": {
|
|
617
617
|
"type": "git",
|
|
618
618
|
"url": "git+https://github.com/onejs/one.git",
|
|
@@ -4,8 +4,8 @@ import NativeKotlinHost from '../specs/OneKotlinHostNativeComponent'
|
|
|
4
4
|
import type { KotlinSourceViewProps } from './viewTypes'
|
|
5
5
|
import {
|
|
6
6
|
decodeNativeSourceCallback,
|
|
7
|
-
encodeNativeSourceProps,
|
|
8
7
|
} from './wire.native'
|
|
8
|
+
import { RESYNC_EVENT, useNativeSourceProps } from './wireProps.native'
|
|
9
9
|
|
|
10
10
|
export type { KotlinSourceViewProps } from './viewTypes'
|
|
11
11
|
|
|
@@ -16,8 +16,8 @@ export function KotlinSourceView({
|
|
|
16
16
|
props,
|
|
17
17
|
wires,
|
|
18
18
|
}: KotlinSourceViewProps) {
|
|
19
|
+
const keyed = useNativeSourceProps(props, wires, view !== '')
|
|
19
20
|
const [contentSize, setContentSize] = useState<{ width: number; height: number }>()
|
|
20
|
-
const encoded = wires ? encodeNativeSourceProps(props, wires.props, wires.structs) : props
|
|
21
21
|
return (
|
|
22
22
|
<View style={props.style} collapsable={false}>
|
|
23
23
|
{/* yoga uses the natural child size while retaining parent flex and stretch. */}
|
|
@@ -26,10 +26,9 @@ export function KotlinSourceView({
|
|
|
26
26
|
source={source}
|
|
27
27
|
view={view}
|
|
28
28
|
contractHash={contractHash}
|
|
29
|
-
props={
|
|
30
|
-
typeof value === 'function' ? true : value
|
|
31
|
-
)}
|
|
29
|
+
props={keyed.text}
|
|
32
30
|
onHostEvent={(event) => {
|
|
31
|
+
if (event.nativeEvent.name === RESYNC_EVENT) return keyed.resync()
|
|
33
32
|
const callback = props[event.nativeEvent.name]
|
|
34
33
|
if (typeof callback === 'function') {
|
|
35
34
|
const args = JSON.parse(event.nativeEvent.args) as unknown[]
|
|
@@ -69,28 +69,52 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
69
69
|
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
// the path to the value being encoded, kept as a stack so a large array costs
|
|
73
|
+
// no string per element; only an error turns it into text.
|
|
74
|
+
const trail: (string | number)[] = []
|
|
75
|
+
|
|
76
|
+
function trailText(): string {
|
|
77
|
+
let text = String(trail[0])
|
|
78
|
+
for (let i = 1; i < trail.length; i++) {
|
|
79
|
+
text += typeof trail[i] === 'number' ? `[${trail[i]}]` : `.${trail[i]}`
|
|
80
|
+
}
|
|
81
|
+
return text
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// a struct with no wired fields is already json-shaped, so it passes through
|
|
85
|
+
const plainStructs = new WeakMap<object, boolean>()
|
|
86
|
+
|
|
87
|
+
function encodeValue(value: unknown, wire: NativeSourceWire, structs: NativeSourceStructs): unknown {
|
|
78
88
|
switch (wire.kind) {
|
|
79
89
|
case 'date':
|
|
80
|
-
if (!(value instanceof Date)) throw new TypeError(`${
|
|
90
|
+
if (!(value instanceof Date)) throw new TypeError(`${trailText()}: expected Date`)
|
|
81
91
|
return value
|
|
82
92
|
case 'data':
|
|
83
|
-
if (!(value instanceof Uint8Array)) throw new TypeError(`${
|
|
93
|
+
if (!(value instanceof Uint8Array)) throw new TypeError(`${trailText()}: expected Uint8Array`)
|
|
84
94
|
return base64Encode(value)
|
|
85
95
|
case 'enum':
|
|
86
96
|
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
87
|
-
throw new TypeError(`${
|
|
97
|
+
throw new TypeError(`${trailText()}: expected an enum value`)
|
|
88
98
|
}
|
|
89
99
|
return value
|
|
90
100
|
case 'struct': {
|
|
91
|
-
if (!isRecord(value)) throw new TypeError(`${
|
|
101
|
+
if (!isRecord(value)) throw new TypeError(`${trailText()}: expected ${wire.name}`)
|
|
92
102
|
const table = structs[wire.name]
|
|
93
|
-
if (!table) throw new TypeError(`${
|
|
103
|
+
if (!table) throw new TypeError(`${trailText()}: unknown struct ${wire.name}`)
|
|
104
|
+
let plain = plainStructs.get(table)
|
|
105
|
+
if (plain === undefined) {
|
|
106
|
+
plain = table.fields.every((field) => field.wire === undefined)
|
|
107
|
+
plainStructs.set(table, plain)
|
|
108
|
+
}
|
|
109
|
+
if (plain) {
|
|
110
|
+
for (const field of table.fields) {
|
|
111
|
+
if (value[field.name] === undefined && !field.optional) {
|
|
112
|
+
trail.push(field.name)
|
|
113
|
+
throw new TypeError(`${trailText()}: required`)
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return value
|
|
117
|
+
}
|
|
94
118
|
const out: Record<string, unknown> = {}
|
|
95
119
|
for (const key of Object.keys(value)) {
|
|
96
120
|
if (!table.fields.some((field) => field.name === key)) out[key] = value[key]
|
|
@@ -98,31 +122,46 @@ function encodeValue(
|
|
|
98
122
|
for (const field of table.fields) {
|
|
99
123
|
const present = value[field.name] !== undefined
|
|
100
124
|
if (!present) {
|
|
101
|
-
if (!field.optional)
|
|
125
|
+
if (!field.optional) {
|
|
126
|
+
trail.push(field.name)
|
|
127
|
+
throw new TypeError(`${trailText()}: required`)
|
|
128
|
+
}
|
|
102
129
|
continue
|
|
103
130
|
}
|
|
104
|
-
|
|
105
|
-
field.
|
|
106
|
-
|
|
107
|
-
|
|
131
|
+
if (field.wire === undefined) {
|
|
132
|
+
out[field.name] = value[field.name]
|
|
133
|
+
continue
|
|
134
|
+
}
|
|
135
|
+
trail.push(field.name)
|
|
136
|
+
out[field.name] = encodeValue(value[field.name], field.wire, structs)
|
|
137
|
+
trail.pop()
|
|
108
138
|
}
|
|
109
139
|
return out
|
|
110
140
|
}
|
|
111
|
-
case 'array':
|
|
112
|
-
if (!Array.isArray(value)) throw new TypeError(`${
|
|
113
|
-
|
|
141
|
+
case 'array': {
|
|
142
|
+
if (!Array.isArray(value)) throw new TypeError(`${trailText()}: expected an array`)
|
|
143
|
+
const out = new Array(value.length)
|
|
144
|
+
trail.push(0)
|
|
145
|
+
const at = trail.length - 1
|
|
146
|
+
for (let index = 0; index < value.length; index++) {
|
|
147
|
+
trail[at] = index
|
|
148
|
+
out[index] = encodeValue(value[index], wire.element, structs)
|
|
149
|
+
}
|
|
150
|
+
trail.pop()
|
|
151
|
+
return out
|
|
152
|
+
}
|
|
114
153
|
case 'map': {
|
|
115
|
-
if (!isRecord(value)) throw new TypeError(`${
|
|
154
|
+
if (!isRecord(value)) throw new TypeError(`${trailText()}: expected an object`)
|
|
116
155
|
const out: Record<string, unknown> = {}
|
|
117
156
|
for (const key of Object.keys(value)) {
|
|
118
|
-
|
|
157
|
+
trail.push(key)
|
|
158
|
+
out[key] = encodeValue(value[key], wire.value, structs)
|
|
159
|
+
trail.pop()
|
|
119
160
|
}
|
|
120
161
|
return out
|
|
121
162
|
}
|
|
122
163
|
case 'nullable':
|
|
123
|
-
return value === null || value === undefined
|
|
124
|
-
? null
|
|
125
|
-
: encodeValue(value, wire.inner, structs, path)
|
|
164
|
+
return value === null || value === undefined ? null : encodeValue(value, wire.inner, structs)
|
|
126
165
|
}
|
|
127
166
|
}
|
|
128
167
|
|
|
@@ -195,6 +234,17 @@ function decodeValue(
|
|
|
195
234
|
}
|
|
196
235
|
}
|
|
197
236
|
|
|
237
|
+
function encodeAt(
|
|
238
|
+
path: (string | number)[],
|
|
239
|
+
value: unknown,
|
|
240
|
+
wire: NativeSourceWire,
|
|
241
|
+
structs: NativeSourceStructs
|
|
242
|
+
): unknown {
|
|
243
|
+
trail.length = 0
|
|
244
|
+
trail.push(...path)
|
|
245
|
+
return encodeValue(value, wire, structs)
|
|
246
|
+
}
|
|
247
|
+
|
|
198
248
|
export function encodeNativeSourceArgs(
|
|
199
249
|
args: unknown[],
|
|
200
250
|
wires: (NativeSourceWire | null | undefined)[],
|
|
@@ -204,7 +254,7 @@ export function encodeNativeSourceArgs(
|
|
|
204
254
|
const wire = wires[index]
|
|
205
255
|
return wire === undefined || wire === null
|
|
206
256
|
? arg
|
|
207
|
-
:
|
|
257
|
+
: encodeAt(['args', index], arg, wire, structs)
|
|
208
258
|
})
|
|
209
259
|
}
|
|
210
260
|
|
|
@@ -224,11 +274,43 @@ export function encodeNativeSourceProps(
|
|
|
224
274
|
const out: Record<string, unknown> = { ...props }
|
|
225
275
|
for (const name of Object.keys(wires)) {
|
|
226
276
|
if (out[name] === undefined) continue
|
|
227
|
-
out[name] =
|
|
277
|
+
out[name] = encodeAt(['props', name], out[name], wires[name], structs)
|
|
228
278
|
}
|
|
229
279
|
return out
|
|
230
280
|
}
|
|
231
281
|
|
|
282
|
+
export function encodeNativeSourceProp(
|
|
283
|
+
name: string,
|
|
284
|
+
value: unknown,
|
|
285
|
+
wires: NativeSourceViewWires | undefined
|
|
286
|
+
): unknown {
|
|
287
|
+
const wire = wires?.props[name]
|
|
288
|
+
return wire === undefined ? value : encodeAt(['props', name], value, wire, wires!.structs)
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function encodeNativeSourceListItem(
|
|
292
|
+
name: string,
|
|
293
|
+
index: number,
|
|
294
|
+
item: unknown,
|
|
295
|
+
element: NativeSourceWire,
|
|
296
|
+
structs: NativeSourceStructs
|
|
297
|
+
): unknown {
|
|
298
|
+
return encodeAt(['props', name, index], item, element, structs)
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// a view's props as the json text its native host decodes: wired values
|
|
302
|
+
// encoded, and true for each callback the element passed
|
|
303
|
+
export function stringifyNativeSourceProps(
|
|
304
|
+
props: Record<string, unknown>,
|
|
305
|
+
wires: NativeSourceViewWires | undefined
|
|
306
|
+
): string {
|
|
307
|
+
const out = wires ? encodeNativeSourceProps(props, wires.props, wires.structs) : { ...props }
|
|
308
|
+
for (const key of Object.keys(out)) {
|
|
309
|
+
if (typeof out[key] === 'function') out[key] = true
|
|
310
|
+
}
|
|
311
|
+
return JSON.stringify(out)
|
|
312
|
+
}
|
|
313
|
+
|
|
232
314
|
export function decodeNativeSourceCallback(
|
|
233
315
|
args: unknown[],
|
|
234
316
|
wires: (NativeSourceWire | null | undefined)[],
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { nextDocument } from './wireProps.native'
|
|
3
|
+
|
|
4
|
+
const rows = (n: number) => Array.from({ length: n }, (_, i) => ({ id: i }))
|
|
5
|
+
|
|
6
|
+
describe('nextDocument', () => {
|
|
7
|
+
it('sends every prop first, with a seq', () => {
|
|
8
|
+
const doc = nextDocument({ title: 'a', rows: rows(3), onTap: () => {} }, undefined, null, false)!
|
|
9
|
+
expect(JSON.parse(doc.text)).toEqual({ $seq: 1, title: 'a', rows: [{ id: 0 }, { id: 1 }, { id: 2 }], onTap: true })
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
it('sends only changed props, based on the last seq', () => {
|
|
13
|
+
const first = nextDocument({ title: 'a', count: 1 }, undefined, null, false)!
|
|
14
|
+
expect(nextDocument({ title: 'a', count: 1 }, undefined, first, false)).toBeNull()
|
|
15
|
+
const second = nextDocument({ title: 'b', count: 1 }, undefined, first, false)!
|
|
16
|
+
expect(JSON.parse(second.text)).toEqual({ $seq: 2, $base: 1, title: 'b' })
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it('sends null for a removed prop', () => {
|
|
20
|
+
const first = nextDocument({ title: 'a', count: 1 }, undefined, null, false)!
|
|
21
|
+
const second = nextDocument({ title: 'a' }, undefined, first, false)!
|
|
22
|
+
expect(JSON.parse(second.text)).toEqual({ $seq: 2, $base: 1, count: null })
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('sends a long array as indexed changes by element identity', () => {
|
|
26
|
+
const list = rows(100)
|
|
27
|
+
const first = nextDocument({ rows: list }, undefined, null, false)!
|
|
28
|
+
const next = list.slice()
|
|
29
|
+
next[5] = { id: 500 }
|
|
30
|
+
next.push({ id: 100 })
|
|
31
|
+
const second = nextDocument({ rows: next }, undefined, first, false)!
|
|
32
|
+
expect(JSON.parse(second.text)).toEqual({
|
|
33
|
+
$seq: 2,
|
|
34
|
+
$base: 1,
|
|
35
|
+
$lists: { rows: { length: 101, set: [[5, { id: 500 }], [100, { id: 100 }]] } },
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it('sends a shrunk array as a length', () => {
|
|
40
|
+
const list = rows(100)
|
|
41
|
+
const first = nextDocument({ rows: list }, undefined, null, false)!
|
|
42
|
+
const second = nextDocument({ rows: list.slice(0, 90) }, undefined, first, false)!
|
|
43
|
+
expect(JSON.parse(second.text).$lists).toEqual({ rows: { length: 90, set: [] } })
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
it('sends the whole array when half of it changed', () => {
|
|
47
|
+
const first = nextDocument({ rows: rows(100) }, undefined, null, false)!
|
|
48
|
+
const second = nextDocument({ rows: rows(100) }, undefined, first, false)!
|
|
49
|
+
expect(JSON.parse(second.text).rows).toHaveLength(100)
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it('sends everything again when asked', () => {
|
|
53
|
+
const first = nextDocument({ title: 'a' }, undefined, null, false)!
|
|
54
|
+
const second = nextDocument({ title: 'a' }, undefined, first, true)!
|
|
55
|
+
expect(JSON.parse(second.text)).toEqual({ $seq: 2, title: 'a' })
|
|
56
|
+
})
|
|
57
|
+
})
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
// the props string of a typed native view host, as keyed changes. the first
|
|
2
|
+
// document of a host instance carries every prop. a later one carries the props
|
|
3
|
+
// that changed, and for a long array prop only the elements whose identity
|
|
4
|
+
// changed. the host holds the decoded props and the `$seq` of the last
|
|
5
|
+
// document it applied; a change whose `$base` is not that seq cannot be applied,
|
|
6
|
+
// so the host answers `$resync` and the next render sends everything again.
|
|
7
|
+
//
|
|
8
|
+
// full: {"$seq":N, ...props}
|
|
9
|
+
// change: {"$seq":N, "$base":M, ...changed props, "$lists":{"rows":{"length":L,"set":[[i,element],...]}}}
|
|
10
|
+
//
|
|
11
|
+
// a changed prop replaces the held value whole, an absent prop keeps it, and a
|
|
12
|
+
// prop removed from the element is sent as null. `$lists` resizes the held array
|
|
13
|
+
// to `length` and replaces the `set` indices; an index past the held length
|
|
14
|
+
// appends and must arrive in order.
|
|
15
|
+
import { useLayoutEffect, useRef, useState } from 'react'
|
|
16
|
+
import {
|
|
17
|
+
encodeNativeSourceListItem,
|
|
18
|
+
encodeNativeSourceProp,
|
|
19
|
+
stringifyNativeSourceProps,
|
|
20
|
+
type NativeSourceViewWires,
|
|
21
|
+
type NativeSourceWire,
|
|
22
|
+
} from './wire.native'
|
|
23
|
+
|
|
24
|
+
// shorter arrays are cheaper to send whole than to diff
|
|
25
|
+
const MIN_LIST = 32
|
|
26
|
+
|
|
27
|
+
export const RESYNC_EVENT = '$resync'
|
|
28
|
+
|
|
29
|
+
interface Sent {
|
|
30
|
+
seq: number
|
|
31
|
+
text: string
|
|
32
|
+
// the arrays last sent, by identity, to diff the next one against
|
|
33
|
+
lists: Record<string, unknown[]>
|
|
34
|
+
// the json of every other prop, to send only what changed
|
|
35
|
+
texts: Record<string, string>
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// the element wire of an array prop (undefined when elements are plain json),
|
|
39
|
+
// or null when the prop is not an array on the wire
|
|
40
|
+
function listElement(wire: NativeSourceWire | undefined): NativeSourceWire | undefined | null {
|
|
41
|
+
if (wire === undefined) return undefined
|
|
42
|
+
if (wire.kind === 'array') return wire.element
|
|
43
|
+
if (wire.kind === 'nullable') return listElement(wire.inner)
|
|
44
|
+
return null
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function nextDocument(
|
|
48
|
+
props: Record<string, unknown>,
|
|
49
|
+
wires: NativeSourceViewWires | undefined,
|
|
50
|
+
prev: Sent | null,
|
|
51
|
+
full: boolean
|
|
52
|
+
): Sent | null {
|
|
53
|
+
const whole = full || prev === null
|
|
54
|
+
const seq = (prev?.seq ?? 0) + 1
|
|
55
|
+
const lists: Record<string, unknown[]> = {}
|
|
56
|
+
const texts: Record<string, string> = {}
|
|
57
|
+
const entries: string[] = []
|
|
58
|
+
const patches: Record<string, { length: number; set: [number, unknown][] }> = {}
|
|
59
|
+
for (const name of Object.keys(props)) {
|
|
60
|
+
const value = props[name]
|
|
61
|
+
if (value === undefined) continue
|
|
62
|
+
const element = listElement(wires?.props[name])
|
|
63
|
+
if (Array.isArray(value) && value.length >= MIN_LIST && element !== null) {
|
|
64
|
+
lists[name] = value
|
|
65
|
+
const before = prev?.lists[name]
|
|
66
|
+
if (!whole && before) {
|
|
67
|
+
const indices: number[] = []
|
|
68
|
+
for (let i = 0; i < value.length; i++) {
|
|
69
|
+
if (i >= before.length || before[i] !== value[i]) indices.push(i)
|
|
70
|
+
}
|
|
71
|
+
if (indices.length === 0 && before.length === value.length) continue
|
|
72
|
+
if (indices.length * 2 < value.length) {
|
|
73
|
+
patches[name] = {
|
|
74
|
+
length: value.length,
|
|
75
|
+
set: indices.map((i) => [
|
|
76
|
+
i,
|
|
77
|
+
element === undefined ? value[i] : encodeNativeSourceListItem(name, i, value[i], element, wires!.structs),
|
|
78
|
+
]),
|
|
79
|
+
}
|
|
80
|
+
continue
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
entries.push(`${JSON.stringify(name)}:${JSON.stringify(encodeNativeSourceProp(name, value, wires))}`)
|
|
84
|
+
continue
|
|
85
|
+
}
|
|
86
|
+
const text = typeof value === 'function' ? 'true' : JSON.stringify(encodeNativeSourceProp(name, value, wires))
|
|
87
|
+
texts[name] = text
|
|
88
|
+
if (!whole && prev.texts[name] === text) continue
|
|
89
|
+
entries.push(`${JSON.stringify(name)}:${text}`)
|
|
90
|
+
}
|
|
91
|
+
if (!whole) {
|
|
92
|
+
for (const name of [...Object.keys(prev.texts), ...Object.keys(prev.lists)]) {
|
|
93
|
+
if (!(name in texts) && !(name in lists)) entries.push(`${JSON.stringify(name)}:null`)
|
|
94
|
+
}
|
|
95
|
+
if (entries.length === 0 && Object.keys(patches).length === 0) return null
|
|
96
|
+
if (Object.keys(patches).length > 0) entries.push(`"$lists":${JSON.stringify(patches)}`)
|
|
97
|
+
}
|
|
98
|
+
const head = whole ? `"$seq":${seq}` : `"$seq":${seq},"$base":${prev.seq}`
|
|
99
|
+
return { seq, text: `{${[head, ...entries].join(',')}}`, lists, texts }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function useNativeSourceProps(
|
|
103
|
+
props: Record<string, unknown>,
|
|
104
|
+
wires: NativeSourceViewWires | undefined,
|
|
105
|
+
keyed: boolean
|
|
106
|
+
): { text: string; resync: () => void } {
|
|
107
|
+
const sent = useRef<Sent | null>(null)
|
|
108
|
+
const needFull = useRef(false)
|
|
109
|
+
const [, rerender] = useState(0)
|
|
110
|
+
const next = keyed ? nextDocument(props, wires, sent.current, needFull.current) : null
|
|
111
|
+
// render stays pure: the document counts as sent once this render commits
|
|
112
|
+
useLayoutEffect(() => {
|
|
113
|
+
if (next) {
|
|
114
|
+
sent.current = next
|
|
115
|
+
needFull.current = false
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
const resync = () => {
|
|
119
|
+
needFull.current = true
|
|
120
|
+
rerender((n) => n + 1)
|
|
121
|
+
}
|
|
122
|
+
if (!keyed) return { text: stringifyNativeSourceProps(props, wires), resync }
|
|
123
|
+
return { text: (next ?? sent.current!).text, resync }
|
|
124
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// the component a device build answers a `.swift` import with: the swift
|
|
2
2
|
// package compiled into the app, rendered by its registered view or by one of
|
|
3
3
|
// its typed views.
|
|
4
|
+
import { StyleSheet } from 'react-native'
|
|
4
5
|
import NativeSwiftHost from '../specs/OneSwiftHostNativeComponent'
|
|
5
6
|
import {
|
|
6
7
|
decodeNativeSourceCallback,
|
|
7
|
-
encodeNativeSourceProps,
|
|
8
8
|
} from '../native-source/wire.native'
|
|
9
|
+
import { RESYNC_EVENT, useNativeSourceProps } from '../native-source/wireProps.native'
|
|
9
10
|
import type { SwiftPackageViewProps } from './types'
|
|
10
11
|
|
|
11
12
|
export type { SwiftPackageViewProps } from './types'
|
|
@@ -18,18 +19,19 @@ export function SwiftPackageView({
|
|
|
18
19
|
fill,
|
|
19
20
|
wires,
|
|
20
21
|
}: SwiftPackageViewProps) {
|
|
21
|
-
const
|
|
22
|
+
const keyed = useNativeSourceProps(props, wires, view !== '')
|
|
23
|
+
const style = StyleSheet.flatten(props.style)
|
|
24
|
+
const fills = fill || (style?.flex ?? 0) > 0 || (style?.flexGrow ?? 0) > 0
|
|
22
25
|
return (
|
|
23
26
|
<NativeSwiftHost
|
|
24
27
|
packageName={packageName}
|
|
25
28
|
view={view}
|
|
26
29
|
contractHash={contractHash}
|
|
27
30
|
// a typed view's host learns which callbacks the element passed
|
|
28
|
-
props={
|
|
29
|
-
|
|
30
|
-
)}
|
|
31
|
-
fill={fill}
|
|
31
|
+
props={keyed.text}
|
|
32
|
+
fill={fills}
|
|
32
33
|
onHostEvent={(event) => {
|
|
34
|
+
if (event.nativeEvent.name === RESYNC_EVENT) return keyed.resync()
|
|
33
35
|
const callback = props[event.nativeEvent.name]
|
|
34
36
|
if (typeof callback === 'function') {
|
|
35
37
|
const args = JSON.parse(event.nativeEvent.args) as unknown[]
|
|
@@ -41,7 +43,7 @@ export function SwiftPackageView({
|
|
|
41
43
|
)
|
|
42
44
|
}
|
|
43
45
|
}}
|
|
44
|
-
style={fill ? { flex: 1 } :
|
|
46
|
+
style={fill ? { flex: 1 } : style}
|
|
45
47
|
/>
|
|
46
48
|
)
|
|
47
49
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native'
|
|
1
2
|
import type { NativeSourceViewWires } from '../native-source/wire.native'
|
|
2
3
|
|
|
3
4
|
export interface SwiftPackageViewProps {
|
|
@@ -9,8 +10,9 @@ export interface SwiftPackageViewProps {
|
|
|
9
10
|
contractHash: string
|
|
10
11
|
// the importing element's props: a typed view's stored properties, or the
|
|
11
12
|
// json the @main view's view(props:) reads
|
|
12
|
-
props: Record<string, unknown>
|
|
13
|
-
// the imported file's @main is an App: the root fills its parent
|
|
13
|
+
props: Record<string, unknown> & { style?: StyleProp<ViewStyle> }
|
|
14
|
+
// the imported file's @main is an App: the root fills its parent. a typed
|
|
15
|
+
// view also fills when its element style sets flex or flexGrow
|
|
14
16
|
fill: boolean
|
|
15
17
|
// wire formats for props and callback arguments carrying Date, Data or
|
|
16
18
|
// struct payloads; absent when every prop crosses as plain json
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.native.d.ts","sourceRoot":"","sources":["../../../src/platform/native-source/view.native.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAMxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,KAAK,GACN,EAAE,qBAAqB,+
|
|
1
|
+
{"version":3,"file":"view.native.d.ts","sourceRoot":"","sources":["../../../src/platform/native-source/view.native.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAMxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,KAAK,GACN,EAAE,qBAAqB,+BAmCvB"}
|
|
@@ -36,5 +36,8 @@ export declare function base64Decode(text: string): Uint8Array;
|
|
|
36
36
|
export declare function encodeNativeSourceArgs(args: unknown[], wires: (NativeSourceWire | null | undefined)[], structs: NativeSourceStructs): unknown[];
|
|
37
37
|
export declare function decodeNativeSourceResult(value: unknown, wire: NativeSourceWire | null | undefined, structs: NativeSourceStructs): unknown;
|
|
38
38
|
export declare function encodeNativeSourceProps(props: Record<string, unknown>, wires: Record<string, NativeSourceWire>, structs: NativeSourceStructs): Record<string, unknown>;
|
|
39
|
+
export declare function encodeNativeSourceProp(name: string, value: unknown, wires: NativeSourceViewWires | undefined): unknown;
|
|
40
|
+
export declare function encodeNativeSourceListItem(name: string, index: number, item: unknown, element: NativeSourceWire, structs: NativeSourceStructs): unknown;
|
|
41
|
+
export declare function stringifyNativeSourceProps(props: Record<string, unknown>, wires: NativeSourceViewWires | undefined): string;
|
|
39
42
|
export declare function decodeNativeSourceCallback(args: unknown[], wires: (NativeSourceWire | null | undefined)[], structs: NativeSourceStructs, event: string): unknown[];
|
|
40
43
|
//# sourceMappingURL=wire.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.native.d.ts","sourceRoot":"","sources":["../../../src/platform/native-source/wire.native.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,gBAAgB,CAAA;CACxB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAEjD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,qBAAqB,EAAE,CAAA;CAAE,CAAC,CAAA;AAKrF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IACvC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;IACtD,OAAO,EAAE,mBAAmB,CAAA;CAC7B;AAID,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAYtD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAkBrD;
|
|
1
|
+
{"version":3,"file":"wire.native.d.ts","sourceRoot":"","sources":["../../../src/platform/native-source/wire.native.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,gBAAgB,CAAA;CACxB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAEjD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,qBAAqB,EAAE,CAAA;CAAE,CAAC,CAAA;AAKrF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IACvC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;IACtD,OAAO,EAAE,mBAAmB,CAAA;CAC7B;AAID,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAYtD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAkBrD;AAsLD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,EAAE,EACf,KAAK,EAAE,CAAC,gBAAgB,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAC9C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,EAAE,CAOX;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EACzC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAET;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACvC,OAAO,EAAE,mBAAmB,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOzB;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,qBAAqB,GAAG,SAAS,GACvC,OAAO,CAGT;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAET;AAID,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,KAAK,EAAE,qBAAqB,GAAG,SAAS,GACvC,MAAM,CAMR;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,OAAO,EAAE,EACf,KAAK,EAAE,CAAC,gBAAgB,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAC9C,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,MAAM,GACZ,OAAO,EAAE,CAOX"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type NativeSourceViewWires } from './wire.native';
|
|
2
|
+
export declare const RESYNC_EVENT = "$resync";
|
|
3
|
+
interface Sent {
|
|
4
|
+
seq: number;
|
|
5
|
+
text: string;
|
|
6
|
+
lists: Record<string, unknown[]>;
|
|
7
|
+
texts: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
export declare function nextDocument(props: Record<string, unknown>, wires: NativeSourceViewWires | undefined, prev: Sent | null, full: boolean): Sent | null;
|
|
10
|
+
export declare function useNativeSourceProps(props: Record<string, unknown>, wires: NativeSourceViewWires | undefined, keyed: boolean): {
|
|
11
|
+
text: string;
|
|
12
|
+
resync: () => void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=wireProps.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wireProps.native.d.ts","sourceRoot":"","sources":["../../../src/platform/native-source/wireProps.native.ts"],"names":[],"mappings":"AAeA,OAAO,EAIL,KAAK,qBAAqB,EAE3B,MAAM,eAAe,CAAA;AAKtB,eAAO,MAAM,YAAY,YAAY,CAAA;AAErC,UAAU,IAAI;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IAEZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;IAEhC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B;AAWD,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,KAAK,EAAE,qBAAqB,GAAG,SAAS,EACxC,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,IAAI,EAAE,OAAO,GACZ,IAAI,GAAG,IAAI,CAgDb;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,KAAK,EAAE,qBAAqB,GAAG,SAAS,EACxC,KAAK,EAAE,OAAO,GACb;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CAkBtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/platform/swift/index.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/platform/swift/index.native.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,KAAK,GACN,EAAE,qBAAqB,+BA4BvB"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
1
2
|
import type { NativeSourceViewWires } from '../native-source/wire.native';
|
|
2
3
|
export interface SwiftPackageViewProps {
|
|
3
4
|
packageName: string;
|
|
4
5
|
view: string;
|
|
5
6
|
contractHash: string;
|
|
6
|
-
props: Record<string, unknown
|
|
7
|
+
props: Record<string, unknown> & {
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
};
|
|
7
10
|
fill: boolean;
|
|
8
11
|
wires?: NativeSourceViewWires;
|
|
9
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/platform/swift/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAEzE,MAAM,WAAW,qBAAqB;IAEpC,WAAW,EAAE,MAAM,CAAA;IAEnB,IAAI,EAAE,MAAM,CAAA;IAEZ,YAAY,EAAE,MAAM,CAAA;IAGpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/platform/swift/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAEzE,MAAM,WAAW,qBAAqB;IAEpC,WAAW,EAAE,MAAM,CAAA;IAEnB,IAAI,EAAE,MAAM,CAAA;IAEZ,YAAY,EAAE,MAAM,CAAA;IAGpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;KAAE,CAAA;IAGjE,IAAI,EAAE,OAAO,CAAA;IAGb,KAAK,CAAC,EAAE,qBAAqB,CAAA;CAC9B"}
|