@tamagui/vite-plugin-cjs 1.144.3 → 1.144.4
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/.turbo/turbo-build.log +0 -2
- package/package.json +2 -2
- package/dist/cjs/extensions.mjs +0 -47
- package/dist/cjs/extensions.mjs.map +0 -1
- package/dist/cjs/extensions.native.js +0 -47
- package/dist/cjs/extensions.native.js.map +0 -1
- package/dist/cjs/extract.mjs +0 -226
- package/dist/cjs/extract.mjs.map +0 -1
- package/dist/cjs/extract.native.js +0 -274
- package/dist/cjs/extract.native.js.map +0 -1
- package/dist/cjs/index.mjs +0 -31
- package/dist/cjs/index.mjs.map +0 -1
- package/dist/cjs/index.native.js +0 -31
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/cjs/loadTamagui.mjs +0 -89
- package/dist/cjs/loadTamagui.mjs.map +0 -1
- package/dist/cjs/loadTamagui.native.js +0 -90
- package/dist/cjs/loadTamagui.native.js.map +0 -1
- package/dist/cjs/plugin.mjs +0 -228
- package/dist/cjs/plugin.mjs.map +0 -1
- package/dist/cjs/plugin.native.js +0 -244
- package/dist/cjs/plugin.native.js.map +0 -1
- package/dist/esm/extensions.native.js +0 -14
- package/dist/esm/extensions.native.js.map +0 -1
- package/dist/esm/extract.native.js +0 -216
- package/dist/esm/extract.native.js.map +0 -1
- package/dist/esm/index.native.js +0 -3
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/loadTamagui.native.js +0 -36
- package/dist/esm/loadTamagui.native.js.map +0 -1
- package/dist/esm/plugin.native.js +0 -184
- package/dist/esm/plugin.native.js.map +0 -1
package/dist/cjs/index.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if ((from && typeof from == 'object') || typeof from == 'function')
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
!__hasOwnProp.call(to, key) &&
|
|
9
|
-
key !== except &&
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => from[key],
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
13
|
-
})
|
|
14
|
-
return to
|
|
15
|
-
},
|
|
16
|
-
__reExport = (target, mod, secondTarget) => (
|
|
17
|
-
__copyProps(target, mod, 'default'),
|
|
18
|
-
secondTarget && __copyProps(secondTarget, mod, 'default')
|
|
19
|
-
)
|
|
20
|
-
var __toCommonJS = (mod) =>
|
|
21
|
-
__copyProps(
|
|
22
|
-
__defProp({}, '__esModule', {
|
|
23
|
-
value: !0,
|
|
24
|
-
}),
|
|
25
|
-
mod
|
|
26
|
-
)
|
|
27
|
-
var index_exports = {}
|
|
28
|
-
module.exports = __toCommonJS(index_exports)
|
|
29
|
-
__reExport(index_exports, require('./plugin.mjs'), module.exports)
|
|
30
|
-
__reExport(index_exports, require('./extract.mjs'), module.exports)
|
|
31
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/cjs/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["index_exports","module","exports","__toCommonJS","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAH,aAAA;AAAAI,UAAA,CAAAJ,aAAA,EAAcK,OAAA,kBAAdJ,MAAA,CAAAC,OAAA;AACAE,UAAA,CAAAJ,aAAA,EAAcK,OAAA,mBADdJ,MAAA,CAAAC,OAAA","ignoreList":[]}
|
package/dist/cjs/index.native.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if ((from && typeof from == 'object') || typeof from == 'function')
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
!__hasOwnProp.call(to, key) &&
|
|
9
|
-
key !== except &&
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => from[key],
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
13
|
-
})
|
|
14
|
-
return to
|
|
15
|
-
},
|
|
16
|
-
__reExport = (target, mod, secondTarget) => (
|
|
17
|
-
__copyProps(target, mod, 'default'),
|
|
18
|
-
secondTarget && __copyProps(secondTarget, mod, 'default')
|
|
19
|
-
)
|
|
20
|
-
var __toCommonJS = (mod) =>
|
|
21
|
-
__copyProps(
|
|
22
|
-
__defProp({}, '__esModule', {
|
|
23
|
-
value: !0,
|
|
24
|
-
}),
|
|
25
|
-
mod
|
|
26
|
-
)
|
|
27
|
-
var index_exports = {}
|
|
28
|
-
module.exports = __toCommonJS(index_exports)
|
|
29
|
-
__reExport(index_exports, require('./plugin.native.js'), module.exports)
|
|
30
|
-
__reExport(index_exports, require('./extract.native.js'), module.exports)
|
|
31
|
-
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,wBAAAH,MADd,CAAAC,OAAA","ignoreList":[]}
|
package/dist/cjs/loadTamagui.mjs
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
var __create = Object.create
|
|
2
|
-
var __defProp = Object.defineProperty
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
-
__hasOwnProp = Object.prototype.hasOwnProperty
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, {
|
|
10
|
-
get: all[name],
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
})
|
|
13
|
-
},
|
|
14
|
-
__copyProps = (to, from, except, desc) => {
|
|
15
|
-
if ((from && typeof from == 'object') || typeof from == 'function')
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
!__hasOwnProp.call(to, key) &&
|
|
18
|
-
key !== except &&
|
|
19
|
-
__defProp(to, key, {
|
|
20
|
-
get: () => from[key],
|
|
21
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
22
|
-
})
|
|
23
|
-
return to
|
|
24
|
-
}
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (
|
|
26
|
-
(target = mod != null ? __create(__getProtoOf(mod)) : {}),
|
|
27
|
-
__copyProps(
|
|
28
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
30
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
32
|
-
isNodeMode || !mod || !mod.__esModule
|
|
33
|
-
? __defProp(target, 'default', {
|
|
34
|
-
value: mod,
|
|
35
|
-
enumerable: !0,
|
|
36
|
-
})
|
|
37
|
-
: target,
|
|
38
|
-
mod
|
|
39
|
-
)
|
|
40
|
-
),
|
|
41
|
-
__toCommonJS = (mod) =>
|
|
42
|
-
__copyProps(
|
|
43
|
-
__defProp({}, '__esModule', {
|
|
44
|
-
value: !0,
|
|
45
|
-
}),
|
|
46
|
-
mod
|
|
47
|
-
)
|
|
48
|
-
var loadTamagui_exports = {}
|
|
49
|
-
__export(loadTamagui_exports, {
|
|
50
|
-
cleanup: () => cleanup,
|
|
51
|
-
disableStatic: () => disableStatic,
|
|
52
|
-
loadTamaguiBuildConfig: () => loadTamaguiBuildConfig,
|
|
53
|
-
tamaguiOptions: () => tamaguiOptions,
|
|
54
|
-
})
|
|
55
|
-
module.exports = __toCommonJS(loadTamagui_exports)
|
|
56
|
-
var StaticWorker = __toESM(require('@tamagui/static-worker'), 1)
|
|
57
|
-
let tamaguiOptions = null,
|
|
58
|
-
disableStatic = !1,
|
|
59
|
-
watcherDispose = null,
|
|
60
|
-
isLoading = null
|
|
61
|
-
async function loadTamaguiBuildConfig(optionsIn) {
|
|
62
|
-
if (tamaguiOptions) return
|
|
63
|
-
if (isLoading) return await isLoading
|
|
64
|
-
let resolve
|
|
65
|
-
isLoading = new Promise((res) => {
|
|
66
|
-
resolve = res
|
|
67
|
-
})
|
|
68
|
-
try {
|
|
69
|
-
;(tamaguiOptions = await StaticWorker.loadTamaguiBuildConfig({
|
|
70
|
-
...optionsIn,
|
|
71
|
-
platform: 'web',
|
|
72
|
-
})),
|
|
73
|
-
(disableStatic = !!tamaguiOptions.disable),
|
|
74
|
-
!optionsIn?.disableWatchTamaguiConfig &&
|
|
75
|
-
!disableStatic &&
|
|
76
|
-
(await StaticWorker.loadTamagui({
|
|
77
|
-
components: ['tamagui'],
|
|
78
|
-
platform: 'web',
|
|
79
|
-
...tamaguiOptions,
|
|
80
|
-
}))
|
|
81
|
-
} finally {
|
|
82
|
-
resolve(), (isLoading = null)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
async function cleanup() {
|
|
86
|
-
watcherDispose && (watcherDispose(), (watcherDispose = null)),
|
|
87
|
-
await StaticWorker.destroyPool()
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=loadTamagui.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["loadTamagui_exports","__export","cleanup","disableStatic","loadTamaguiBuildConfig","tamaguiOptions","module","exports","__toCommonJS","StaticWorker","__toESM","require","watcherDispose","isLoading","optionsIn","resolve","Promise","res","platform","disable","disableWatchTamaguiConfig","loadTamagui","components","destroyPool"],"sources":["../../src/loadTamagui.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA,OAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAR,mBAAA;AAAA,IAAAS,YAAA,GAA8BC,OAAA,CAAAC,OAAA;AAGvB,IAAIN,cAAA,GAAwC;EACxCF,aAAA,GAAgB;EAGvBS,cAAA,GAAsC;EACtCC,SAAA,GAAkC;AAEtC,eAAsBT,uBAAuBU,SAAA,EAAqC;EAChF,IAAIT,cAAA,EAAgB;EACpB,IAAIQ,SAAA,EAAW,OAAO,MAAMA,SAAA;EAE5B,IAAIE,OAAA;EACJF,SAAA,GAAY,IAAIG,OAAA,CAASC,GAAA,IAAQ;IAC/BF,OAAA,GAAUE,GAAA;EACZ,CAAC;EAED,IAAI;IACFZ,cAAA,GAAiB,MAAMI,YAAA,CAAaL,sBAAA,CAAuB;MACzD,GAAGU,SAAA;MACHI,QAAA,EAAU;IACZ,CAAC,GAEDf,aAAA,GAAgB,EAAQE,cAAA,CAAec,OAAA,EAGnC,CAACL,SAAA,EAAWM,yBAAA,IAA6B,CAACjB,aAAA,KAC5C,MAAMM,YAAA,CAAaY,WAAA,CAAY;MAC7BC,UAAA,EAAY,CAAC,SAAS;MACtBJ,QAAA,EAAU;MACV,GAAGb;IACL,CAAC;EAEL,UAAE;IACAU,OAAA,CAAS,GACTF,SAAA,GAAY;EACd;AACF;AAKA,eAAsBX,QAAA,EAAU;EAC1BU,cAAA,KACFA,cAAA,CAAe,GACfA,cAAA,GAAiB,OAEnB,MAAMH,YAAA,CAAac,WAAA,CAAY;AACjC","ignoreList":[]}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var __create = Object.create
|
|
2
|
-
var __defProp = Object.defineProperty
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
-
__hasOwnProp = Object.prototype.hasOwnProperty
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, {
|
|
10
|
-
get: all[name],
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
})
|
|
13
|
-
},
|
|
14
|
-
__copyProps = (to, from, except, desc) => {
|
|
15
|
-
if ((from && typeof from == 'object') || typeof from == 'function')
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
!__hasOwnProp.call(to, key) &&
|
|
18
|
-
key !== except &&
|
|
19
|
-
__defProp(to, key, {
|
|
20
|
-
get: () => from[key],
|
|
21
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
22
|
-
})
|
|
23
|
-
return to
|
|
24
|
-
}
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (
|
|
26
|
-
(target = mod != null ? __create(__getProtoOf(mod)) : {}),
|
|
27
|
-
__copyProps(
|
|
28
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
30
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
32
|
-
isNodeMode || !mod || !mod.__esModule
|
|
33
|
-
? __defProp(target, 'default', {
|
|
34
|
-
value: mod,
|
|
35
|
-
enumerable: !0,
|
|
36
|
-
})
|
|
37
|
-
: target,
|
|
38
|
-
mod
|
|
39
|
-
)
|
|
40
|
-
),
|
|
41
|
-
__toCommonJS = (mod) =>
|
|
42
|
-
__copyProps(
|
|
43
|
-
__defProp({}, '__esModule', {
|
|
44
|
-
value: !0,
|
|
45
|
-
}),
|
|
46
|
-
mod
|
|
47
|
-
)
|
|
48
|
-
var loadTamagui_exports = {}
|
|
49
|
-
__export(loadTamagui_exports, {
|
|
50
|
-
cleanup: () => cleanup,
|
|
51
|
-
disableStatic: () => disableStatic,
|
|
52
|
-
loadTamaguiBuildConfig: () => loadTamaguiBuildConfig,
|
|
53
|
-
tamaguiOptions: () => tamaguiOptions,
|
|
54
|
-
})
|
|
55
|
-
module.exports = __toCommonJS(loadTamagui_exports)
|
|
56
|
-
var StaticWorker = __toESM(require('@tamagui/static-worker'), 1),
|
|
57
|
-
tamaguiOptions = null,
|
|
58
|
-
disableStatic = !1,
|
|
59
|
-
watcherDispose = null,
|
|
60
|
-
isLoading = null
|
|
61
|
-
async function loadTamaguiBuildConfig(optionsIn) {
|
|
62
|
-
if (!tamaguiOptions) {
|
|
63
|
-
if (isLoading) return await isLoading
|
|
64
|
-
var resolve
|
|
65
|
-
isLoading = new Promise((res) => {
|
|
66
|
-
resolve = res
|
|
67
|
-
})
|
|
68
|
-
try {
|
|
69
|
-
;(tamaguiOptions = await StaticWorker.loadTamaguiBuildConfig({
|
|
70
|
-
...optionsIn,
|
|
71
|
-
platform: 'web',
|
|
72
|
-
})),
|
|
73
|
-
(disableStatic = !!tamaguiOptions.disable),
|
|
74
|
-
!optionsIn?.disableWatchTamaguiConfig &&
|
|
75
|
-
!disableStatic &&
|
|
76
|
-
(await StaticWorker.loadTamagui({
|
|
77
|
-
components: ['tamagui'],
|
|
78
|
-
platform: 'web',
|
|
79
|
-
...tamaguiOptions,
|
|
80
|
-
}))
|
|
81
|
-
} finally {
|
|
82
|
-
resolve(), (isLoading = null)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
async function cleanup() {
|
|
87
|
-
watcherDispose && (watcherDispose(), (watcherDispose = null)),
|
|
88
|
-
await StaticWorker.destroyPool()
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=loadTamagui.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","loadTamagui_exports","__export","cleanup","disableStatic","loadTamaguiBuildConfig","tamaguiOptions","module","exports","StaticWorker","__toESM","require","watcherDispose","isLoading","optionsIn","resolve","Promise","res","platform","disable","disableWatchTamaguiConfig","loadTamagui","components"],"sources":["../../src/loadTamagui.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA,OAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAZ,YAA8B,CAAAK,mBAAA;AAGvB,IAAIQ,YAAA,GAAAC,OAAwC,CACxCC,OAAA,yBAGP,KAAsC;EAAAL,cACtC,GAAkC;EAAAF,aAAA;EAAAQ,cAAA;EAAAC,SAAA;AAEtC,eAAsBR,uBAAuBS,SAAA,EAAqC;EAChF,IAAI,CAAAR,cAAgB;IACpB,IAAIO,SAAW,SAAO,MAAMA,SAAA;IAE5B,IAAIE,OAAA;IACJF,SAAA,GAAY,IAAIG,OAAS,WAAQC,GAAA;MAC/BF,OAAA,GAAUE,GAAA;IACX;IAED,IAAI;MACFX,cAAA,GAAiB,MAAMG,YAAa,CAAAJ,sBAAuB;QACzD,GAAGS,SAAA;QACHI,QAAU;MACX,EAED,EAAAd,aAAA,GAAwB,EAAAE,cAAe,CAAAa,OAGnC,EAAC,CAAAL,SAAW,EAAAM,yBAAA,IAA8B,CAAAhB,aAAA,KAC5C,MAAMK,YAAa,CAAAY,WAAY;QAC7BC,UAAY,EAAC,CACb,SAAU,CACP;QACJJ,QAAA;QAEL,GAAAZ;MACE;IAEF;MACFS,OAAA,IAAAF,SAAA;IAKA;EACM;AAKN","ignoreList":[]}
|
package/dist/cjs/plugin.mjs
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
var __create = Object.create
|
|
2
|
-
var __defProp = Object.defineProperty
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
-
__hasOwnProp = Object.prototype.hasOwnProperty
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, {
|
|
10
|
-
get: all[name],
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
})
|
|
13
|
-
},
|
|
14
|
-
__copyProps = (to, from, except, desc) => {
|
|
15
|
-
if ((from && typeof from == 'object') || typeof from == 'function')
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
!__hasOwnProp.call(to, key) &&
|
|
18
|
-
key !== except &&
|
|
19
|
-
__defProp(to, key, {
|
|
20
|
-
get: () => from[key],
|
|
21
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
22
|
-
})
|
|
23
|
-
return to
|
|
24
|
-
}
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (
|
|
26
|
-
(target = mod != null ? __create(__getProtoOf(mod)) : {}),
|
|
27
|
-
__copyProps(
|
|
28
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
30
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
32
|
-
isNodeMode || !mod || !mod.__esModule
|
|
33
|
-
? __defProp(target, 'default', {
|
|
34
|
-
value: mod,
|
|
35
|
-
enumerable: !0,
|
|
36
|
-
})
|
|
37
|
-
: target,
|
|
38
|
-
mod
|
|
39
|
-
)
|
|
40
|
-
),
|
|
41
|
-
__toCommonJS = (mod) =>
|
|
42
|
-
__copyProps(
|
|
43
|
-
__defProp({}, '__esModule', {
|
|
44
|
-
value: !0,
|
|
45
|
-
}),
|
|
46
|
-
mod
|
|
47
|
-
)
|
|
48
|
-
var plugin_exports = {}
|
|
49
|
-
__export(plugin_exports, {
|
|
50
|
-
tamaguiPlugin: () => tamaguiPlugin,
|
|
51
|
-
})
|
|
52
|
-
module.exports = __toCommonJS(plugin_exports)
|
|
53
|
-
var Static = __toESM(require('@tamagui/static-worker'), 1),
|
|
54
|
-
import_node_url = require('node:url'),
|
|
55
|
-
import_vite = require('vite'),
|
|
56
|
-
import_extract = require('./extract.mjs'),
|
|
57
|
-
import_loadTamagui = require('./loadTamagui.mjs')
|
|
58
|
-
const import_meta = {},
|
|
59
|
-
resolve = (name) => (0, import_node_url.fileURLToPath)(import_meta.resolve(name))
|
|
60
|
-
function tamaguiPlugin({ optimize, disableResolveConfig, ...tamaguiOptionsIn } = {}) {
|
|
61
|
-
const shouldAddCompiler = !!optimize
|
|
62
|
-
let watcher,
|
|
63
|
-
loaded = !1
|
|
64
|
-
const enableNativeEnv = !!globalThis.__vxrnEnableNativeEnv,
|
|
65
|
-
extensions = [
|
|
66
|
-
'.web.mjs',
|
|
67
|
-
'.web.js',
|
|
68
|
-
'.web.jsx',
|
|
69
|
-
'.web.ts',
|
|
70
|
-
'.web.tsx',
|
|
71
|
-
'.mjs',
|
|
72
|
-
'.js',
|
|
73
|
-
'.mts',
|
|
74
|
-
'.ts',
|
|
75
|
-
'.jsx',
|
|
76
|
-
'.tsx',
|
|
77
|
-
'.json',
|
|
78
|
-
]
|
|
79
|
-
async function load() {
|
|
80
|
-
if (
|
|
81
|
-
!loaded &&
|
|
82
|
-
((loaded = !0),
|
|
83
|
-
await (0, import_loadTamagui.loadTamaguiBuildConfig)(tamaguiOptionsIn),
|
|
84
|
-
!import_loadTamagui.tamaguiOptions.disableWatchTamaguiConfig)
|
|
85
|
-
) {
|
|
86
|
-
if (!Static) throw new Error('Not loaded')
|
|
87
|
-
watcher = Static.watchTamaguiConfig({
|
|
88
|
-
components: ['tamagui'],
|
|
89
|
-
config: './src/tamagui.config.ts',
|
|
90
|
-
...import_loadTamagui.tamaguiOptions,
|
|
91
|
-
}).catch((err) => {
|
|
92
|
-
console.error(` [Tamagui] Error watching config: ${err}`)
|
|
93
|
-
})
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
const compatPlugins = [
|
|
97
|
-
{
|
|
98
|
-
name: 'tamagui-base-web-only',
|
|
99
|
-
enforce: 'pre',
|
|
100
|
-
async buildEnd() {
|
|
101
|
-
await watcher?.then((res) => {
|
|
102
|
-
res?.dispose()
|
|
103
|
-
})
|
|
104
|
-
},
|
|
105
|
-
async transform(code, id) {
|
|
106
|
-
if (id.includes('expo-linear-gradient'))
|
|
107
|
-
return (0, import_vite.transformWithEsbuild)(code, id, {
|
|
108
|
-
loader: 'jsx',
|
|
109
|
-
jsx: 'automatic',
|
|
110
|
-
// 👈
|
|
111
|
-
})
|
|
112
|
-
},
|
|
113
|
-
async config(_, env) {
|
|
114
|
-
if ((await load(), !import_loadTamagui.tamaguiOptions))
|
|
115
|
-
throw new Error('No options loaded')
|
|
116
|
-
return {
|
|
117
|
-
environments: {
|
|
118
|
-
client: {
|
|
119
|
-
define: {
|
|
120
|
-
'process.env.TAMAGUI_IS_CLIENT': JSON.stringify(!0),
|
|
121
|
-
'process.env.TAMAGUI_ENVIRONMENT': '"client"',
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
define: {
|
|
126
|
-
// reanimated support
|
|
127
|
-
_frameTimestamp: void 0,
|
|
128
|
-
_WORKLET: !1,
|
|
129
|
-
__DEV__: `${env.mode === 'development'}`,
|
|
130
|
-
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || env.mode),
|
|
131
|
-
'process.env.ENABLE_RSC': JSON.stringify(process.env.ENABLE_RSC || ''),
|
|
132
|
-
'process.env.ENABLE_STEPS': JSON.stringify(process.env.ENABLE_STEPS || ''),
|
|
133
|
-
'process.env.IS_STATIC': JSON.stringify(!1),
|
|
134
|
-
...(env.mode === 'production' && {
|
|
135
|
-
'process.env.TAMAGUI_OPTIMIZE_THEMES': JSON.stringify(!0),
|
|
136
|
-
}),
|
|
137
|
-
},
|
|
138
|
-
resolve:
|
|
139
|
-
disableResolveConfig || enableNativeEnv
|
|
140
|
-
? {}
|
|
141
|
-
: {
|
|
142
|
-
extensions,
|
|
143
|
-
alias: {
|
|
144
|
-
...(import_loadTamagui.tamaguiOptions.platform !== 'native' && {
|
|
145
|
-
'react-native/Libraries/Renderer/shims/ReactFabric':
|
|
146
|
-
resolve('@tamagui/proxy-worm'),
|
|
147
|
-
'react-native/Libraries/Utilities/codegenNativeComponent':
|
|
148
|
-
resolve('@tamagui/proxy-worm'),
|
|
149
|
-
'react-native-svg': resolve('@tamagui/react-native-svg'),
|
|
150
|
-
...(!import_loadTamagui.tamaguiOptions?.useReactNativeWebLite && {
|
|
151
|
-
'react-native': resolve('react-native-web'),
|
|
152
|
-
}),
|
|
153
|
-
}),
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
name: 'tamagui-rnw-lite-web-only',
|
|
161
|
-
// enforce: 'pre',
|
|
162
|
-
// resolveId(source) {
|
|
163
|
-
// const envName = this['environment']?.name as any // vite 5 + 6 compat
|
|
164
|
-
// if (isVite6 && envName !== 'client' && envName !== 'ssr') {
|
|
165
|
-
// return
|
|
166
|
-
// }
|
|
167
|
-
// if (source === 'react-native-svg') {
|
|
168
|
-
// return '@tamagui/react-native-svg'
|
|
169
|
-
// }
|
|
170
|
-
// console.log('cmon', source)
|
|
171
|
-
// if (tamaguiOptions?.useReactNativeWebLite) {
|
|
172
|
-
// if (/^react-native$/.test(source)) {
|
|
173
|
-
// return 'react-native-web'
|
|
174
|
-
// }
|
|
175
|
-
// } else {
|
|
176
|
-
// if (/^react-native$/.test(source)) {
|
|
177
|
-
// return '@tamagui/react-native-web-lite'
|
|
178
|
-
// }
|
|
179
|
-
// }
|
|
180
|
-
// },
|
|
181
|
-
config() {
|
|
182
|
-
if (enableNativeEnv) return {}
|
|
183
|
-
if (import_loadTamagui.tamaguiOptions?.useReactNativeWebLite) {
|
|
184
|
-
const rnwl = resolve(
|
|
185
|
-
import_loadTamagui.tamaguiOptions?.useReactNativeWebLite ===
|
|
186
|
-
'without-animated'
|
|
187
|
-
? '@tamagui/react-native-web-lite/without-animated'
|
|
188
|
-
: '@tamagui/react-native-web-lite'
|
|
189
|
-
),
|
|
190
|
-
rnwlSS = resolve(
|
|
191
|
-
'@tamagui/react-native-web-lite/dist/exports/StyleSheet/compiler/createReactDOMStyle'
|
|
192
|
-
)
|
|
193
|
-
return {
|
|
194
|
-
resolve: {
|
|
195
|
-
alias: [
|
|
196
|
-
// fix reanimated issue not finding this
|
|
197
|
-
{
|
|
198
|
-
find: /react-native.*\/dist\/exports\/StyleSheet\/compiler\/createReactDOMStyle/,
|
|
199
|
-
replacement: rnwlSS,
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
find: /^react-native$/,
|
|
203
|
-
replacement: rnwl,
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
find: /^react-native\/(.+)$/,
|
|
207
|
-
replacement: `${rnwl}/$1`,
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
find: /^react-native-web$/,
|
|
211
|
-
replacement: rnwl,
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
find: /^react-native-web\/(.+)$/,
|
|
215
|
-
replacement: `${rnwl}/$1`,
|
|
216
|
-
},
|
|
217
|
-
],
|
|
218
|
-
},
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
]
|
|
224
|
-
return shouldAddCompiler
|
|
225
|
-
? [...compatPlugins, (0, import_extract.tamaguiExtractPlugin)(tamaguiOptionsIn)]
|
|
226
|
-
: [...compatPlugins]
|
|
227
|
-
}
|
|
228
|
-
//# sourceMappingURL=plugin.mjs.map
|
package/dist/cjs/plugin.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["plugin_exports","__export","tamaguiPlugin","module","exports","__toCommonJS","Static","__toESM","require","import_node_url","import_vite","import_extract","import_loadTamagui","import_meta","resolve","name","fileURLToPath","optimize","disableResolveConfig","tamaguiOptionsIn","shouldAddCompiler","watcher","loaded","enableNativeEnv","globalThis","__vxrnEnableNativeEnv","extensions","load","loadTamaguiBuildConfig","tamaguiOptions","disableWatchTamaguiConfig","Error","watchTamaguiConfig","components","config","catch","err","console","error","compatPlugins","enforce","buildEnd","then","res","dispose","transform","code","id","includes","transformWithEsbuild","loader","jsx","_","env","environments","client","define","JSON","stringify","_frameTimestamp","_WORKLET","__DEV__","mode","process","NODE_ENV","ENABLE_RSC","ENABLE_STEPS","alias","platform","useReactNativeWebLite","rnwl","rnwlSS","find","replacement","tamaguiExtractPlugin"],"sources":["../../src/plugin.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,cAAA;AAAAC,QAAA,CAAAD,cAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,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