react-native-unistyles 3.0.0-alpha.6 → 3.0.0-alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- package/cxx/common/Helpers.h +24 -0
- package/cxx/core/HostStyle.cpp +4 -5
- package/cxx/core/HostStyle.h +4 -0
- package/cxx/core/StyleSheet.h +0 -1
- package/cxx/core/StyleSheetRegistry.cpp +9 -17
- package/cxx/core/StyleSheetRegistry.h +3 -4
- package/cxx/core/UnistyleData.h +22 -0
- package/cxx/core/UnistylesCommitHook.cpp +4 -1
- package/cxx/core/UnistylesRegistry.cpp +33 -49
- package/cxx/core/UnistylesRegistry.h +8 -8
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +4 -3
- package/cxx/hybridObjects/HybridStyleSheet.cpp +8 -11
- package/cxx/parser/Parser.cpp +41 -57
- package/cxx/parser/Parser.h +8 -13
- package/lib/commonjs/specs/ShadowRegistry/index.js +2 -2
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
- package/lib/commonjs/specs/index.web.js +1 -1
- package/lib/commonjs/web/convert/boxShadow.js +77 -0
- package/lib/commonjs/web/convert/boxShadow.js.map +1 -0
- package/lib/commonjs/web/convert/breakpoint.js +25 -0
- package/lib/commonjs/web/convert/breakpoint.js.map +1 -0
- package/lib/commonjs/web/convert/index.js +76 -0
- package/lib/commonjs/web/convert/index.js.map +1 -0
- package/lib/commonjs/web/convert/module.d.js +2 -0
- package/lib/commonjs/web/convert/module.d.js.map +1 -0
- package/lib/commonjs/web/convert/shadow.js +68 -0
- package/lib/commonjs/web/convert/shadow.js.map +1 -0
- package/lib/commonjs/web/convert/style.js +89 -0
- package/lib/commonjs/web/convert/style.js.map +1 -0
- package/lib/commonjs/web/convert/textShadow.js +73 -0
- package/lib/commonjs/web/convert/textShadow.js.map +1 -0
- package/lib/commonjs/web/convert/transform.js +72 -0
- package/lib/commonjs/web/convert/transform.js.map +1 -0
- package/lib/commonjs/web/convert/types.js +9 -0
- package/lib/commonjs/web/convert/types.js.map +1 -0
- package/lib/commonjs/web/convert/utils.js +55 -0
- package/lib/commonjs/web/convert/utils.js.map +1 -0
- package/lib/commonjs/web/create.js +89 -0
- package/lib/commonjs/web/create.js.map +1 -0
- package/lib/commonjs/web/index.js +51 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/commonjs/web/listener/index.js +13 -0
- package/lib/commonjs/web/listener/index.js.map +1 -0
- package/lib/commonjs/web/listener/listener.js +36 -0
- package/lib/commonjs/web/listener/listener.js.map +1 -0
- package/lib/commonjs/web/mock.js +37 -0
- package/lib/commonjs/web/mock.js.map +1 -0
- package/lib/commonjs/web/mq.js +23 -0
- package/lib/commonjs/web/mq.js.map +1 -0
- package/lib/commonjs/web/pseudo.js +11 -0
- package/lib/commonjs/web/pseudo.js.map +1 -0
- package/lib/commonjs/web/registry.js +37 -0
- package/lib/commonjs/web/registry.js.map +1 -0
- package/lib/commonjs/web/runtime.js +164 -0
- package/lib/commonjs/web/runtime.js.map +1 -0
- package/lib/commonjs/web/state.js +121 -0
- package/lib/commonjs/web/state.js.map +1 -0
- package/lib/commonjs/web/utils.js +78 -0
- package/lib/commonjs/web/utils.js.map +1 -0
- package/lib/commonjs/web/variants/getVariants.js +39 -0
- package/lib/commonjs/web/variants/getVariants.js.map +1 -0
- package/lib/commonjs/web/variants/index.js +28 -0
- package/lib/commonjs/web/variants/index.js.map +1 -0
- package/lib/commonjs/web/variants/useVariants.js +75 -0
- package/lib/commonjs/web/variants/useVariants.js.map +1 -0
- package/lib/module/specs/ShadowRegistry/index.js +2 -2
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/specs/StyleSheet/index.js.map +1 -1
- package/lib/module/specs/index.web.js +1 -1
- package/lib/module/specs/index.web.js.map +1 -1
- package/lib/module/web/convert/boxShadow.js +72 -0
- package/lib/module/web/convert/boxShadow.js.map +1 -0
- package/lib/module/web/convert/breakpoint.js +20 -0
- package/lib/module/web/convert/breakpoint.js.map +1 -0
- package/lib/module/web/convert/index.js +71 -0
- package/lib/module/web/convert/index.js.map +1 -0
- package/lib/module/web/convert/module.d.js +2 -0
- package/lib/module/web/convert/module.d.js.map +1 -0
- package/lib/module/web/convert/shadow.js +63 -0
- package/lib/module/web/convert/shadow.js.map +1 -0
- package/lib/module/web/convert/style.js +84 -0
- package/lib/module/web/convert/style.js.map +1 -0
- package/lib/module/web/convert/textShadow.js +68 -0
- package/lib/module/web/convert/textShadow.js.map +1 -0
- package/lib/module/web/convert/transform.js +67 -0
- package/lib/module/web/convert/transform.js.map +1 -0
- package/lib/module/web/convert/types.js +5 -0
- package/lib/module/web/convert/types.js.map +1 -0
- package/lib/module/web/convert/utils.js +43 -0
- package/lib/module/web/convert/utils.js.map +1 -0
- package/lib/module/web/create.js +84 -0
- package/lib/module/web/create.js.map +1 -0
- package/lib/module/web/index.js +24 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/module/web/listener/index.js +4 -0
- package/lib/module/web/listener/index.js.map +1 -0
- package/lib/module/web/listener/listener.js +31 -0
- package/lib/module/web/listener/listener.js.map +1 -0
- package/lib/module/web/mock.js +33 -0
- package/lib/module/web/mock.js.map +1 -0
- package/lib/module/web/mq.js +17 -0
- package/lib/module/web/mq.js.map +1 -0
- package/lib/module/web/pseudo.js +6 -0
- package/lib/module/web/pseudo.js.map +1 -0
- package/lib/module/web/registry.js +33 -0
- package/lib/module/web/registry.js.map +1 -0
- package/lib/module/web/runtime.js +160 -0
- package/lib/module/web/runtime.js.map +1 -0
- package/lib/module/web/state.js +117 -0
- package/lib/module/web/state.js.map +1 -0
- package/lib/module/web/utils.js +65 -0
- package/lib/module/web/utils.js.map +1 -0
- package/lib/module/web/variants/getVariants.js +34 -0
- package/lib/module/web/variants/getVariants.js.map +1 -0
- package/lib/module/web/variants/index.js +5 -0
- package/lib/module/web/variants/index.js.map +1 -0
- package/lib/module/web/variants/useVariants.js +70 -0
- package/lib/module/web/variants/useVariants.js.map +1 -0
- package/lib/typescript/example/App.d.ts.map +1 -1
- package/lib/typescript/example/Typography.d.ts +11 -0
- package/lib/typescript/example/Typography.d.ts.map +1 -0
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +2 -2
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts +2 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/index.web.d.ts +1 -1
- package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/boxShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/breakpoint.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/convert/index.d.ts +1 -1
- package/lib/typescript/src/web/convert/index.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/shadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/style.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/textShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/transform.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/convert/types.d.ts +1 -1
- package/lib/typescript/src/web/convert/types.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/utils.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/create.d.ts +11 -11
- package/lib/typescript/{web → src/web}/create.d.ts.map +1 -1
- package/lib/typescript/{web → src/web}/index.d.ts +12 -12
- package/lib/typescript/{web → src/web}/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener/index.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/listener/listener.d.ts +1 -1
- package/lib/typescript/src/web/listener/listener.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/mock.d.ts +2 -2
- package/lib/typescript/src/web/mock.d.ts.map +1 -0
- package/lib/typescript/src/web/mq.d.ts.map +1 -0
- package/lib/typescript/src/web/pseudo.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/registry.d.ts +1 -1
- package/lib/typescript/src/web/registry.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/runtime.d.ts +6 -6
- package/lib/typescript/src/web/runtime.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/state.d.ts +4 -4
- package/lib/typescript/src/web/state.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/utils.d.ts +5 -3
- package/lib/typescript/src/web/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/getVariants.d.ts +3 -0
- package/lib/typescript/src/web/variants/getVariants.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/index.d.ts +3 -0
- package/lib/typescript/src/web/variants/index.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/useVariants.d.ts +3 -0
- package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -0
- package/package.json +1 -1
- package/plugin/__tests__/dependencies.spec.js +181 -103
- package/plugin/__tests__/ref.spec.js +346 -156
- package/plugin/__tests__/stylesheet.spec.js +148 -55
- package/plugin/index.js +31 -21
- package/plugin/ref.js +67 -15
- package/plugin/style.js +13 -24
- package/plugin/stylesheet.js +44 -1
- package/plugin/variants.js +33 -0
- package/src/specs/ShadowRegistry/index.ts +4 -4
- package/src/specs/StyleSheet/index.ts +3 -1
- package/src/specs/index.web.ts +1 -1
- package/src/types/stylesheet.ts +1 -1
- package/{web → src/web}/convert/breakpoint.ts +1 -1
- package/{web → src/web}/convert/index.ts +1 -1
- package/{web → src/web}/convert/types.ts +1 -1
- package/{web → src/web}/create.ts +36 -33
- package/{web → src/web}/listener/listener.ts +1 -1
- package/{web → src/web}/mock.ts +2 -2
- package/{web → src/web}/registry.ts +1 -1
- package/{web → src/web}/runtime.ts +4 -4
- package/{web → src/web}/state.ts +5 -5
- package/{web → src/web}/utils.ts +5 -5
- package/src/web/variants/getVariants.ts +42 -0
- package/src/web/variants/index.ts +2 -0
- package/{web → src/web/variants}/useVariants.ts +24 -44
- package/lib/typescript/web/convert/boxShadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/breakpoint.d.ts.map +0 -1
- package/lib/typescript/web/convert/index.d.ts.map +0 -1
- package/lib/typescript/web/convert/shadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/style.d.ts.map +0 -1
- package/lib/typescript/web/convert/textShadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/transform.d.ts.map +0 -1
- package/lib/typescript/web/convert/types.d.ts.map +0 -1
- package/lib/typescript/web/convert/utils.d.ts.map +0 -1
- package/lib/typescript/web/listener/index.d.ts.map +0 -1
- package/lib/typescript/web/listener/listener.d.ts.map +0 -1
- package/lib/typescript/web/mock.d.ts.map +0 -1
- package/lib/typescript/web/mq.d.ts.map +0 -1
- package/lib/typescript/web/pseudo.d.ts.map +0 -1
- package/lib/typescript/web/registry.d.ts.map +0 -1
- package/lib/typescript/web/runtime.d.ts.map +0 -1
- package/lib/typescript/web/state.d.ts.map +0 -1
- package/lib/typescript/web/useVariants.d.ts +0 -3
- package/lib/typescript/web/useVariants.d.ts.map +0 -1
- package/lib/typescript/web/utils.d.ts.map +0 -1
- /package/lib/typescript/{web → src/web}/convert/boxShadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/breakpoint.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/shadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/style.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/textShadow.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/transform.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/convert/utils.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/listener/index.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/mq.d.ts +0 -0
- /package/lib/typescript/{web → src/web}/pseudo.d.ts +0 -0
- /package/{web → src/web}/convert/boxShadow.ts +0 -0
- /package/{web → src/web}/convert/module.d.ts +0 -0
- /package/{web → src/web}/convert/shadow.ts +0 -0
- /package/{web → src/web}/convert/style.ts +0 -0
- /package/{web → src/web}/convert/textShadow.ts +0 -0
- /package/{web → src/web}/convert/transform.ts +0 -0
- /package/{web → src/web}/convert/utils.ts +0 -0
- /package/{web → src/web}/index.ts +0 -0
- /package/{web → src/web}/listener/index.ts +0 -0
- /package/{web → src/web}/mq.ts +0 -0
- /package/{web → src/web}/pseudo.ts +0 -0
package/plugin/stylesheet.js
CHANGED
@@ -17,6 +17,19 @@ const UnistyleDependency = {
|
|
17
17
|
NavigationBar: 13
|
18
18
|
}
|
19
19
|
|
20
|
+
function stringToUniqueId(str) {
|
21
|
+
let hash = 0;
|
22
|
+
|
23
|
+
for (let i = 0; i < str.length; i++) {
|
24
|
+
hash = (hash << 5) - hash + str.charCodeAt(i)
|
25
|
+
hash |= 0
|
26
|
+
}
|
27
|
+
|
28
|
+
const absHash = Math.abs(hash)
|
29
|
+
|
30
|
+
return absHash % 1000000000
|
31
|
+
}
|
32
|
+
|
20
33
|
function isUnistylesStyleSheet(t, path, state) {
|
21
34
|
const callee = path.get('callee')
|
22
35
|
|
@@ -28,6 +41,13 @@ function isUnistylesStyleSheet(t, path, state) {
|
|
28
41
|
)
|
29
42
|
}
|
30
43
|
|
44
|
+
function addStyleSheetTag(t, path, state) {
|
45
|
+
const callee = path.get('callee')
|
46
|
+
const uniqueId = stringToUniqueId(state.filename) + ++state.file.tagNumber
|
47
|
+
|
48
|
+
callee.container.arguments.push(t.numericLiteral(uniqueId))
|
49
|
+
}
|
50
|
+
|
31
51
|
function analyzeDependencies(t, state, name, unistyleObj, themeName, rtName) {
|
32
52
|
const debugMessage = deps => {
|
33
53
|
if (state.opts.debug) {
|
@@ -141,7 +161,30 @@ function analyzeDependencies(t, state, name, unistyleObj, themeName, rtName) {
|
|
141
161
|
}
|
142
162
|
}
|
143
163
|
|
164
|
+
function getUnistyle(t, property) {
|
165
|
+
const propertyValue = t.isArrowFunctionExpression(property.value)
|
166
|
+
? property.value.body
|
167
|
+
: property.value
|
168
|
+
|
169
|
+
if (t.isObjectExpression(propertyValue)) {
|
170
|
+
return propertyValue
|
171
|
+
}
|
172
|
+
|
173
|
+
if (t.isBlockStatement(propertyValue)) {
|
174
|
+
const returnStatement = propertyValue.body
|
175
|
+
.find(value => t.isReturnStatement(value))
|
176
|
+
|
177
|
+
return returnStatement
|
178
|
+
? returnStatement.argument
|
179
|
+
: null
|
180
|
+
}
|
181
|
+
|
182
|
+
return null
|
183
|
+
}
|
184
|
+
|
144
185
|
module.exports = {
|
145
186
|
isUnistylesStyleSheet,
|
146
|
-
analyzeDependencies
|
187
|
+
analyzeDependencies,
|
188
|
+
addStyleSheetTag,
|
189
|
+
getUnistyle
|
147
190
|
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
function isUsingVariants(t, path) {
|
2
|
+
const callee = path.get('callee')
|
3
|
+
|
4
|
+
return (
|
5
|
+
t.isMemberExpression(callee) &&
|
6
|
+
t.isIdentifier(callee.node.object, { name: 'styles' }) &&
|
7
|
+
t.isIdentifier(callee.node.property, { name: 'useVariants' }) &&
|
8
|
+
t.isObjectExpression(path.node.arguments[0])
|
9
|
+
)
|
10
|
+
}
|
11
|
+
|
12
|
+
function extractVariants(t, path, state) {
|
13
|
+
const arg = path.node.arguments[0]
|
14
|
+
|
15
|
+
const variantDeclaration = t.variableDeclaration('const', [
|
16
|
+
t.variableDeclarator(
|
17
|
+
t.identifier('__uni__variants'),
|
18
|
+
arg
|
19
|
+
)
|
20
|
+
])
|
21
|
+
|
22
|
+
// Replace useVariants argument with __uni__variants
|
23
|
+
path.node.arguments[0] = t.identifier('__uni__variants')
|
24
|
+
|
25
|
+
path.insertBefore(variantDeclaration)
|
26
|
+
|
27
|
+
state.file.hasVariants = true
|
28
|
+
}
|
29
|
+
|
30
|
+
module.exports = {
|
31
|
+
isUsingVariants,
|
32
|
+
extractVariants
|
33
|
+
}
|
@@ -4,10 +4,10 @@ import type { ShadowNode, Unistyle, ViewHandle } from './types'
|
|
4
4
|
|
5
5
|
interface ShadowRegistry extends UnistylesShadowRegistrySpec {
|
6
6
|
// Babel API
|
7
|
-
add(handle?: ViewHandle, style?: Unistyle): void,
|
7
|
+
add(handle?: ViewHandle, style?: Unistyle, variants?: Record<string, string | boolean>): void,
|
8
8
|
remove(handle?: ViewHandle, style?: Unistyle): void,
|
9
9
|
// JSI
|
10
|
-
link(node: ShadowNode, style: Unistyle): void,
|
10
|
+
link(node: ShadowNode, style: Unistyle, variants?: Record<string, string | boolean>): void,
|
11
11
|
unlink(node: ShadowNode, style: Unistyle): void
|
12
12
|
}
|
13
13
|
|
@@ -26,12 +26,12 @@ const findShadowNodeForHandle = (handle: ViewHandle) => {
|
|
26
26
|
return node
|
27
27
|
}
|
28
28
|
|
29
|
-
HybridShadowRegistry.add = (handle, style) => {
|
29
|
+
HybridShadowRegistry.add = (handle, style, variants) => {
|
30
30
|
if (!handle || !style?.__unid) {
|
31
31
|
return
|
32
32
|
}
|
33
33
|
|
34
|
-
HybridShadowRegistry.link(findShadowNodeForHandle(handle), style)
|
34
|
+
HybridShadowRegistry.link(findShadowNodeForHandle(handle), style, variants ?? {})
|
35
35
|
}
|
36
36
|
|
37
37
|
HybridShadowRegistry.remove = (handle, style) => {
|
@@ -41,4 +41,6 @@ HybridUnistylesStyleSheet.jsMethods = {
|
|
41
41
|
processColor
|
42
42
|
}
|
43
43
|
|
44
|
-
|
44
|
+
type PrivateMethods = 'jsMethods'
|
45
|
+
|
46
|
+
export const StyleSheet = HybridUnistylesStyleSheet as Omit<UnistylesStyleSheet, PrivateMethods>
|
package/src/specs/index.web.ts
CHANGED
package/src/types/stylesheet.ts
CHANGED
@@ -5,7 +5,7 @@ import type { UnistylesMiniRuntime } from '../specs'
|
|
5
5
|
import type { ReactNativeStyleSheet } from './breakpoints'
|
6
6
|
import type { ExtractVariantNames } from './variants'
|
7
7
|
import type { CSSProperties } from 'react'
|
8
|
-
import type { Pseudo } from '
|
8
|
+
import type { Pseudo } from '../web/pseudo'
|
9
9
|
|
10
10
|
// these props are treated differently to nest breakpoints and media queries
|
11
11
|
type NestedKeys = 'shadowOffset' | 'transform' | 'textShadowOffset'
|
@@ -2,7 +2,7 @@ import type { MediaQuery } from 'typestyle/lib/types'
|
|
2
2
|
import { UnistylesState } from '../state'
|
3
3
|
import { keyInObject } from '../utils'
|
4
4
|
import { isUnistylesMq, parseMq } from '../mq'
|
5
|
-
import { Orientation } from '../../
|
5
|
+
import { Orientation } from '../../specs/types'
|
6
6
|
|
7
7
|
export const convertBreakpoint = (breakpoint: string): MediaQuery => {
|
8
8
|
if (Object.values(Orientation).includes(breakpoint as Orientation)) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { NestedCSSProperties } from 'typestyle/lib/types'
|
2
|
-
import type { UnistylesValues } from '../../
|
2
|
+
import type { UnistylesValues } from '../../types'
|
3
3
|
import { media } from 'typestyle'
|
4
4
|
import { isPseudo } from '../pseudo'
|
5
5
|
import { convertBreakpoint } from './breakpoint'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { TextStyle, ViewStyle } from 'react-native'
|
2
|
-
import type { ToDeepUnistyles } from '../../
|
2
|
+
import type { ToDeepUnistyles } from '../../types/stylesheet'
|
3
3
|
|
4
4
|
export type ShadowOffset = ToDeepUnistyles<{ width: number, height: number }>
|
5
5
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { TypeStyle } from 'typestyle'
|
2
|
-
import type { ReactNativeStyleSheet } from '../
|
3
|
-
import type { StyleSheetWithSuperPowers, StyleSheet } from '../
|
2
|
+
import type { ReactNativeStyleSheet } from '../types'
|
3
|
+
import type { StyleSheetWithSuperPowers, StyleSheet } from '../types/stylesheet'
|
4
4
|
import { UnistylesRegistry } from './registry'
|
5
5
|
import { keyInObject, reduceObject, toReactNativeClassName } from './utils'
|
6
6
|
import { UnistylesRuntime } from './runtime'
|
7
|
-
import { createUseVariants } from './
|
7
|
+
import { createUseVariants, getVariants } from './variants'
|
8
8
|
import { UnistylesListener } from './listener'
|
9
|
-
import type { UnistyleDependency } from '../
|
9
|
+
import type { UnistyleDependency } from '../specs/NativePlatform'
|
10
10
|
|
11
11
|
type ListenToDependenciesProps = {
|
12
12
|
value: StyleSheet[keyof StyleSheet],
|
@@ -16,10 +16,13 @@ type ListenToDependenciesProps = {
|
|
16
16
|
args?: Array<any>
|
17
17
|
}
|
18
18
|
|
19
|
+
type WebUnistyle = ReturnType<typeof UnistylesRegistry.createStyles>
|
20
|
+
|
19
21
|
export const create = (stylesheet: StyleSheetWithSuperPowers<StyleSheet>) => {
|
20
22
|
const computedStylesheet = typeof stylesheet === 'function'
|
21
23
|
? stylesheet(UnistylesRuntime.theme, UnistylesRuntime.miniRuntime)
|
22
24
|
: stylesheet
|
25
|
+
let lastlySelectedVariants: Record<string, any> = {}
|
23
26
|
|
24
27
|
const listenToDependencies = ({ key, className, unistyles, value, args = [] } : ListenToDependenciesProps) => {
|
25
28
|
const dependencies = ('uni__dependencies' in value ? value['uni__dependencies'] : []) as Array<UnistyleDependency>
|
@@ -48,44 +51,42 @@ export const create = (stylesheet: StyleSheetWithSuperPowers<StyleSheet>) => {
|
|
48
51
|
|
49
52
|
const styles = reduceObject(computedStylesheet, (value, key) => {
|
50
53
|
if (typeof value === 'function') {
|
51
|
-
const
|
52
|
-
const
|
53
|
-
const disposeMap = new Map<number, VoidFunction | undefined>()
|
54
|
+
const webUnistyleByRef = new Map<HTMLElement, WebUnistyle>()
|
55
|
+
const disposeByRef = new Map<HTMLElement, VoidFunction | undefined>()
|
54
56
|
|
55
57
|
return (...args: Array<any>) => {
|
56
|
-
const [
|
57
|
-
const result = value(...args
|
58
|
-
const
|
59
|
-
const
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
58
|
+
const [ref] = args.slice(-1)
|
59
|
+
const result = value(...args)
|
60
|
+
const variants = Object.fromEntries(getVariants({ [key]: result } as ReactNativeStyleSheet<StyleSheet>, lastlySelectedVariants))
|
61
|
+
const resultWithVariants = {
|
62
|
+
...result,
|
63
|
+
...variants[key]
|
64
|
+
}
|
65
|
+
|
66
|
+
if (ref instanceof HTMLElement) {
|
67
|
+
const storedWebUnistyle = webUnistyleByRef.get(ref)
|
68
|
+
const webUnistyle = storedWebUnistyle ?? UnistylesRegistry.createStyles(resultWithVariants, key)
|
69
|
+
|
70
|
+
webUnistyleByRef.set(ref, webUnistyle)
|
71
|
+
disposeByRef.get(ref)?.()
|
72
|
+
disposeByRef.set(ref, listenToDependencies({
|
66
73
|
key,
|
67
74
|
value,
|
68
|
-
unistyles,
|
69
|
-
className,
|
75
|
+
unistyles: webUnistyle.unistyles,
|
76
|
+
className: webUnistyle.className,
|
70
77
|
args
|
71
78
|
}))
|
79
|
+
ref.classList.add(webUnistyle.className)
|
72
80
|
|
73
|
-
|
74
|
-
|
81
|
+
if (storedWebUnistyle) {
|
82
|
+
UnistylesRegistry.updateStyles(webUnistyle.unistyles, resultWithVariants, webUnistyle.className)
|
83
|
+
}
|
75
84
|
|
76
|
-
const entry = UnistylesRegistry.createStyles(result, key)
|
77
85
|
|
78
|
-
|
79
|
-
|
80
|
-
disposeMap.set(id, listenToDependencies({
|
81
|
-
key,
|
82
|
-
value,
|
83
|
-
unistyles: entry.unistyles,
|
84
|
-
className: entry.className,
|
85
|
-
args
|
86
|
-
}))
|
86
|
+
return
|
87
|
+
}
|
87
88
|
|
88
|
-
return toReactNativeClassName(
|
89
|
+
return toReactNativeClassName(null, resultWithVariants)
|
89
90
|
}
|
90
91
|
}
|
91
92
|
|
@@ -96,7 +97,9 @@ export const create = (stylesheet: StyleSheetWithSuperPowers<StyleSheet>) => {
|
|
96
97
|
return toReactNativeClassName(className, value)
|
97
98
|
}) as ReactNativeStyleSheet<StyleSheet>
|
98
99
|
|
99
|
-
createUseVariants(styles
|
100
|
+
createUseVariants(styles, newVariants => {
|
101
|
+
lastlySelectedVariants = newVariants
|
102
|
+
})
|
100
103
|
|
101
104
|
return styles
|
102
105
|
}
|
package/{web → src/web}/mock.ts
RENAMED
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { UnistylesNavigationBar as NavigationBarSpec } from '../
|
2
|
-
import type { UnistylesStatusBar as StatusBarSpec } from '../
|
1
|
+
import type { UnistylesNavigationBar as NavigationBarSpec } from '../specs/NavigtionBar'
|
2
|
+
import type { UnistylesStatusBar as StatusBarSpec } from '../specs/StatusBar'
|
3
3
|
|
4
4
|
export const StatusBar: StatusBarSpec = {
|
5
5
|
width: 0,
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { UnistyleDependency } from '../
|
2
|
-
import { ColorScheme, Orientation, type AppTheme, type AppThemeName } from '../
|
3
|
-
import type { UnistylesMiniRuntime } from '../
|
4
|
-
import { WebContentSizeCategory } from '../
|
1
|
+
import { UnistyleDependency } from '../specs/NativePlatform'
|
2
|
+
import { ColorScheme, Orientation, type AppTheme, type AppThemeName } from '../specs/types'
|
3
|
+
import type { UnistylesMiniRuntime } from '../specs/UnistylesRuntime'
|
4
|
+
import { WebContentSizeCategory } from '../types'
|
5
5
|
import { UnistylesListener } from './listener'
|
6
6
|
import { NavigationBar, StatusBar } from './mock'
|
7
7
|
import { UnistylesState } from './state'
|
package/{web → src/web}/state.ts
RENAMED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { type ReactElement, createElement, createRef } from 'react'
|
2
|
-
import type { UnistylesTheme } from '../
|
3
|
-
import type { UnistylesConfig } from '../
|
4
|
-
import type { AppBreakpoint, AppThemeName } from '../
|
5
|
-
import type { UnistylesBreakpoints, UnistylesThemes } from '../
|
2
|
+
import type { UnistylesTheme } from '../types'
|
3
|
+
import type { UnistylesConfig } from '../specs/StyleSheet'
|
4
|
+
import type { AppBreakpoint, AppThemeName } from '../specs/types'
|
5
|
+
import type { UnistylesBreakpoints, UnistylesThemes } from '../global'
|
6
6
|
import { UnistylesRuntime } from './runtime'
|
7
7
|
import { isServer, schemeToTheme } from './utils'
|
8
8
|
import { UnistylesListener } from './listener'
|
9
|
-
import { UnistyleDependency } from '../
|
9
|
+
import { UnistyleDependency } from '../specs/NativePlatform'
|
10
10
|
|
11
11
|
class UnistylesStateBuilder {
|
12
12
|
private readonly isSSR = isServer()
|
package/{web → src/web}/utils.ts
RENAMED
@@ -1,16 +1,16 @@
|
|
1
|
-
import { ColorScheme, type AppThemeName} from '../
|
2
|
-
import type { UnistylesValues } from '../
|
1
|
+
import { ColorScheme, type AppThemeName} from '../specs/types'
|
2
|
+
import type { UnistylesValues } from '../types'
|
3
3
|
|
4
4
|
export const reduceObject = <TObj extends Record<string, any>, TReducer>(
|
5
5
|
obj: TObj,
|
6
6
|
reducer: (value: TObj[keyof TObj], key: keyof TObj) => TReducer,
|
7
7
|
) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, reducer(value as TObj[keyof TObj], key)])) as { [K in keyof TObj]: TReducer }
|
8
8
|
|
9
|
-
export const toReactNativeClassName = (className: string, values: UnistylesValues) => {
|
10
|
-
const returnValue = {
|
9
|
+
export const toReactNativeClassName = (className: string | null, values: UnistylesValues) => {
|
10
|
+
const returnValue = className ? {
|
11
11
|
$$css: true,
|
12
12
|
[className]: className
|
13
|
-
}
|
13
|
+
} : {}
|
14
14
|
|
15
15
|
Object.defineProperties(returnValue, reduceObject(values, value => ({
|
16
16
|
value,
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import type { ReactNativeStyleSheet, StyleSheet } from '../../types'
|
2
|
+
import { deepMergeObjects } from '../utils'
|
3
|
+
|
4
|
+
type StylesWithVariants = {
|
5
|
+
variants: Record<string, any>,
|
6
|
+
compoundVariants?: Array<Record<string, any> & {
|
7
|
+
styles: Record<string, any>
|
8
|
+
}>
|
9
|
+
}
|
10
|
+
const hasVariants = <T extends object>(value: [string, T]): value is [string, T & StylesWithVariants] => 'variants' in value[1]
|
11
|
+
|
12
|
+
export const getVariants = (styles: ReactNativeStyleSheet<StyleSheet>, selectedVariants: Record<string, any>) => {
|
13
|
+
return Object.entries(styles)
|
14
|
+
.filter(hasVariants)
|
15
|
+
.filter(([_key, { variants }]) => Object.keys(variants).some(variant => variant in variants))
|
16
|
+
.map(([key, { variants, compoundVariants = [] }]) => {
|
17
|
+
const variantStyles = Object.entries(variants).flatMap(([variant, styles]) => {
|
18
|
+
const selectedVariant = selectedVariants[variant]
|
19
|
+
const selectedVariantStyles = styles[selectedVariant] ?? styles['default']
|
20
|
+
|
21
|
+
if (!selectedVariantStyles) {
|
22
|
+
return []
|
23
|
+
}
|
24
|
+
|
25
|
+
return selectedVariantStyles
|
26
|
+
})
|
27
|
+
|
28
|
+
const compoundVariantStyles = compoundVariants.flatMap(compoundVariant => {
|
29
|
+
const { styles, ...conditions } = compoundVariant
|
30
|
+
|
31
|
+
if (Object.entries(conditions).some(([variant, value]) => String(selectedVariants[variant]) !== String(value))) {
|
32
|
+
return []
|
33
|
+
}
|
34
|
+
|
35
|
+
return styles
|
36
|
+
})
|
37
|
+
|
38
|
+
const mergedVariantStyles = deepMergeObjects(...variantStyles, ...compoundVariantStyles)
|
39
|
+
|
40
|
+
return [key, mergedVariantStyles] as const
|
41
|
+
})
|
42
|
+
}
|
@@ -1,19 +1,11 @@
|
|
1
1
|
import { useMemo, useRef, useState } from 'react'
|
2
2
|
import type { TypeStyle } from 'typestyle'
|
3
|
-
import type { ReactNativeStyleSheet, StyleSheet } from '
|
4
|
-
import {
|
5
|
-
import { UnistylesRegistry } from '
|
3
|
+
import type { ReactNativeStyleSheet, StyleSheet } from '../../types'
|
4
|
+
import { equal, reduceObject } from '../utils'
|
5
|
+
import { UnistylesRegistry } from '../registry'
|
6
|
+
import { getVariants } from './getVariants'
|
6
7
|
|
7
|
-
|
8
|
-
variants: Record<string, any>,
|
9
|
-
compoundVariants?: Array<Record<string, any> & {
|
10
|
-
styles: Record<string, any>
|
11
|
-
}>
|
12
|
-
}
|
13
|
-
|
14
|
-
const hasVariants = <T extends object>(value: [string, T]): value is [string, T & StylesWithVariants] => 'variants' in value[1]
|
15
|
-
|
16
|
-
export const createUseVariants = (styles: ReactNativeStyleSheet<StyleSheet>) => {
|
8
|
+
export const createUseVariants = (styles: ReactNativeStyleSheet<StyleSheet>, setSelectedVariants: (variants: Record<string, any>) => void) => {
|
17
9
|
const useVariants = (selectedVariants: Record<string, any>) => {
|
18
10
|
const [unistylesMap] = useState(() => new Map<string, TypeStyle>())
|
19
11
|
const [classNameMap] = useState(() => new Map<string, string>())
|
@@ -24,40 +16,17 @@ export const createUseVariants = (styles: ReactNativeStyleSheet<StyleSheet>) =>
|
|
24
16
|
|
25
17
|
if (variantsChanged) {
|
26
18
|
lastSelectedVariantsRef.current = selectedVariants
|
19
|
+
setSelectedVariants(selectedVariants)
|
27
20
|
}
|
28
21
|
|
29
22
|
const combinedVariantStyles = useMemo(() => {
|
30
|
-
|
31
|
-
.filter(hasVariants)
|
32
|
-
.filter(([_key, { variants }]) => Object.keys(variants).some(variant => variant in variants))
|
33
|
-
.map(([key, { variants, compoundVariants = [] }]) => {
|
34
|
-
const variantStyles = Object.entries(variants).flatMap(([variant, styles]) => {
|
35
|
-
const selectedVariant = selectedVariants[variant]
|
36
|
-
const selectedVariantStyles = styles[selectedVariant] ?? styles['default']
|
37
|
-
|
38
|
-
if (!selectedVariantStyles) {
|
39
|
-
return []
|
40
|
-
}
|
41
|
-
|
42
|
-
return selectedVariantStyles
|
43
|
-
})
|
44
|
-
|
45
|
-
const compoundVariantStyles = compoundVariants.flatMap(compoundVariant => {
|
46
|
-
const { styles, ...conditions } = compoundVariant
|
47
|
-
|
48
|
-
if (Object.entries(conditions).some(([variant, value]) => String(selectedVariants[variant]) !== String(value))) {
|
49
|
-
return []
|
50
|
-
}
|
51
|
-
|
52
|
-
return styles
|
53
|
-
})
|
23
|
+
const result = getVariants(styles, selectedVariants)
|
54
24
|
|
55
|
-
|
56
|
-
|
57
|
-
|
25
|
+
result.forEach(([key, value]) => {
|
26
|
+
selectedVariantStylesMap.set(key, value)
|
27
|
+
})
|
58
28
|
|
59
|
-
|
60
|
-
})
|
29
|
+
return result
|
61
30
|
}, [lastSelectedVariantsRef.current])
|
62
31
|
|
63
32
|
if (unistylesMap.size === 0 && combinedVariantStyles.length > 0) {
|
@@ -88,8 +57,19 @@ export const createUseVariants = (styles: ReactNativeStyleSheet<StyleSheet>) =>
|
|
88
57
|
enumerable: false,
|
89
58
|
configurable: true
|
90
59
|
})))
|
91
|
-
|
92
|
-
styleEntry
|
60
|
+
|
61
|
+
if (styleEntry) {
|
62
|
+
Object.keys(styleEntry ?? {}).forEach(key => {
|
63
|
+
if (!key.startsWith('variant-')) {
|
64
|
+
return
|
65
|
+
}
|
66
|
+
|
67
|
+
// @ts-expect-error - remove old variants
|
68
|
+
delete styleEntry[key]
|
69
|
+
})
|
70
|
+
// @ts-expect-error - apply variant className
|
71
|
+
styleEntry[className] = className
|
72
|
+
}
|
93
73
|
})
|
94
74
|
}
|
95
75
|
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"boxShadow.d.ts","sourceRoot":"","sources":["../../../../web/convert/boxShadow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAkB9D,eAAO,MAAM,iBAAiB,WAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,mBAoD/D,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"breakpoint.d.ts","sourceRoot":"","sources":["../../../../web/convert/breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAMrD,eAAO,MAAM,iBAAiB,eAAgB,MAAM,KAAG,UActD,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../web/convert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAWtD,eAAO,MAAM,kBAAkB,UAAW,eAAe,wBAiExD,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../../../web/convert/shadow.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,qBAAsB,aAAa,CAAC,MAAM,CAAC,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAAe,GAAG,CAAC,MAAM,CAAC,SAiE5H,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../web/convert/style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAgF9D,eAAO,MAAM,QAAQ,QAAS,MAAM,SAAS,GAAG,wBAY/C,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"textShadow.d.ts","sourceRoot":"","sources":["../../../../web/convert/textShadow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAiB9D,eAAO,MAAM,kBAAkB,WAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,mBAkDhE,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../web/convert/transform.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAK9D,KAAK,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;AAmC5C,eAAO,MAAM,iBAAiB,eAAgB,UAAU,KAAG,mBA+C1D,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../web/convert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAE7E,eAAO,MAAM,kBAAkB,sEAAuE,CAAA;AAEtG,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAErF,eAAO,MAAM,iBAAiB,2EAA4E,CAAA;AAE1G,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAEnF,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,SAAS,CAAA;AAE9C,MAAM,MAAM,aAAa,GAAG,MAAM,SAAS,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../web/convert/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyC,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAA;AAEnG,eAAO,MAAM,WAAW,QAAS,MAAM,SAAS,GAAG,KAAG,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAgD,CAAA;AAExI,eAAO,MAAM,YAAY,QAAS,MAAM,YAA0E,CAAA;AAElH,eAAO,MAAM,WAAW,QAAS,MAAM,YAAwE,CAAA;AAE/G,eAAO,MAAM,qBAAqB,UAAW,MAAM,oBAAiC,CAAA;AAEpF,eAAO,MAAM,cAAc,UAAW,MAAM,YAAW,MAAM,WAyB5D,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,IAAI,SAAS,aAAa,OAAO,IAAI,cAAc,MAAM,UAAU,GAAG,KAAG,SAAS,CAAC,IAAI,CAazH,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../web/listener/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../../web/listener/listener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAGnE,qBAAa,wBAAwB;IACjC,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,SAAS,CAAoG;IAErH,UAAU,eAAgB,kBAAkB,UAE3C;IAED,aAAa,aAUZ;IAED,YAAY,iBAAkB,KAAK,CAAC,kBAAkB,CAAC,YAAY,YAAY,gBAM9E;CACJ;AAED,eAAO,MAAM,iBAAiB,0BAAiC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../web/mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC5F,OAAO,KAAK,EAAE,kBAAkB,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEjF,eAAO,MAAM,SAAS,EAAE,aAUvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,iBAS3B,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;;;;;CAQnC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mq.d.ts","sourceRoot":"","sources":["../../../web/mq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAMrD,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,UAUpC,CAAA;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,YAAgC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"pseudo.d.ts","sourceRoot":"","sources":["../../../web/pseudo.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,kDAKV,CAAA;AAEV,eAAO,MAAM,QAAQ,aAAc,MAAM,YAAyC,CAAA;AAElF,MAAM,MAAM,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../web/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,SAAS,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAInD,cAAM,wBAAwB;IAC1B,YAAY,eAAgB,eAAe,OAAO,MAAM,GAAG,MAAM;;;MAwBhE;IAED,YAAY,cAAe,SAAS,cAAc,eAAe,aAAa,MAAM,UAKnF;CACJ;AAED,eAAO,MAAM,iBAAiB,0BAAiC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../web/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAMrD,cAAM,uBAAuB;IACzB,UAAU,wBAAuB;IACjC,SAAS,wBAAsB;IAE/B,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,YAAY;IAYpB,IAAI,WAAW,gBASd;IAED,IAAI,SAAS,uEAEZ;IAED,IAAI,mBAAmB,2BAEtB;IAED,IAAI,UAAU,4EAEb;IAED,IAAI,WAAW,gBAMd;IAED,IAAI,KAAK,0CAYR;IAED,IAAI,UAAU,WAEb;IAED,IAAI,MAAM;;;MAYT;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,MAAM;;;;;;MAQT;IAED,IAAI,SAAS,wDAEZ;IAED,IAAI,GAAG,YAEN;IAED,IAAI,iBAAiB,YAEpB;IAED,IAAI,aAAa,+DAEhB;IAED,IAAI,WAAW,IAAI,oBAAoB,CAsBtC;IAED,QAAQ,cAAe,YAAY,UAQlC;IAED,iBAAiB,cAAe,OAAO,UAQtC;IAED,0BAA0B,QAAS,MAAM,UAAU,MAAM,UAMxD;IAED,gBAAgB,aAAW;IAE3B,WAAW,cAAe,YAAY,WAAW,CAAC,YAAY,EAAE,QAAQ,KAAK,QAAQ,UAQpF;IAED,eAAe,iGAA4B;CAC9C;AAED,eAAO,MAAM,gBAAgB,yBAAgC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../web/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA4B,MAAM,OAAO,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,eAAe,CAAA;AAM1E,cAAM,qBAAqB;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IACnC,QAAQ,CAAC,IAAI,EAAS,KAAK,CAAC,YAAY,CAAC,CAAA;IAEzC,MAAM,8BAAoC;IAC1C,SAAS,CAAC,EAAE,YAAY,CAAA;IAExB,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAElC,iBAAiB,UAAQ;IAEzB,IAAI,WAAY,eAAe,UAU9B;IAED,OAAO,CAAC,UAAU,CAIjB;IAED,OAAO,CAAC,YAAY,CAyBnB;IAED,OAAO,CAAC,eAAe,CAmCtB;IAED,SAAS;;;CAyCZ;AAED,eAAO,MAAM,cAAc,uBAA8B,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useVariants.d.ts","sourceRoot":"","sources":["../../../web/useVariants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAarE,eAAO,MAAM,iBAAiB,WAAY,qBAAqB,CAAC,UAAU,CAAC,SAmF1E,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../web/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAC,MAAM,oBAAoB,CAAA;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,eAAO,MAAM,YAAY,GAAI,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,OAC9D,IAAI,WACA,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,IAAI,KAAK,QAAQ,KACmD,GAAG,CAAe,IAAV,MAAM,IAAI,GAAG,QAAQ,GAAE,CAAA;AAErJ,eAAO,MAAM,sBAAsB,cAAe,MAAM,UAAU,eAAe;;;CAahF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,WAAW,KAAG,GAAG,IAAI,MAAM,CAAe,CAAA;AAElH,eAAO,MAAM,aAAa,WAAY,WAAW,KAAG,YAQnD,CAAA;AAED,eAAO,MAAM,SAAS,QAAS,MAAM,WAAW,MAAM,WAM5B,CAAA;AAE1B,eAAO,MAAM,QAAQ,eAAsC,CAAA;AAE3D;;EAEE;AACF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,cAAc,KAAK,CAAC,CAAC,CAAC,MAqBxF,CAAA;AAED,eAAO,MAAM,IAAI,YAAa,MAAM,SAA2D,CAAA;AAE/F,eAAO,MAAM,KAAK,GAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAqBlC,CAAA"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|