@hanzogui/metro-plugin 7.3.0 → 8.0.0
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/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +9 -11
- package/src/index.ts +11 -11
- package/types/index.d.ts +5 -5
- package/LICENSE +0 -42
package/dist/cjs/index.js
CHANGED
|
@@ -22,15 +22,15 @@ __export(index_exports, {
|
|
|
22
22
|
module.exports = __toCommonJS(index_exports);
|
|
23
23
|
var import_static = require("@hanzogui/static");
|
|
24
24
|
function withGui(metroConfig, optionsIn) {
|
|
25
|
-
const { cssInterop, ...
|
|
25
|
+
const { cssInterop, ...hanzoguiOptionsIn } = optionsIn || {};
|
|
26
26
|
if (cssInterop) {
|
|
27
27
|
console.warn(
|
|
28
|
-
"[@hanzogui/metro-plugin] cssInterop option is deprecated. Use `
|
|
28
|
+
"[@hanzogui/metro-plugin] cssInterop option is deprecated. Use `hanzogui generate` to pre-generate CSS instead."
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
const options = {
|
|
32
|
-
...
|
|
33
|
-
...(0, import_static.loadGuiBuildConfigSync)(
|
|
32
|
+
...hanzoguiOptionsIn,
|
|
33
|
+
...(0, import_static.loadGuiBuildConfigSync)(hanzoguiOptionsIn)
|
|
34
34
|
};
|
|
35
35
|
metroConfig.resolver = {
|
|
36
36
|
...metroConfig.resolver,
|
|
@@ -38,7 +38,7 @@ function withGui(metroConfig, optionsIn) {
|
|
|
38
38
|
};
|
|
39
39
|
metroConfig.transformer = {
|
|
40
40
|
...metroConfig.transformer,
|
|
41
|
-
|
|
41
|
+
hanzogui: options
|
|
42
42
|
};
|
|
43
43
|
return metroConfig;
|
|
44
44
|
}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAwD;AAwCjD,SAAS,QACd,aACA,WACkB;AAClB,QAAM,EAAE,YAAY,GAAG,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAwD;AAwCjD,SAAS,QACd,aACA,WACkB;AAClB,QAAM,EAAE,YAAY,GAAG,kBAAkB,IAAI,aAAa,CAAC;AAE3D,MAAI,YAAY;AACd,YAAQ;AAAA,MACN;AAAA,IACF;AAAA,EACF;AAEA,QAAM,UAAU;AAAA,IACd,GAAG;AAAA,IACH,OAAG,sCAAuB,iBAAiB;AAAA,EAC7C;AAGA,cAAY,WAAW;AAAA,IACrB,GAAI,YAAY;AAAA,IAChB,YAAY,CAAC,GAAG,oBAAI,IAAI,CAAC,GAAI,YAAY,UAAU,cAAc,CAAC,GAAI,KAAK,CAAC,CAAC;AAAA,EAC/E;AAGA,cAAY,cAAc;AAAA,IACxB,GAAG,YAAY;AAAA,IACf,UAAU;AAAA,EACZ;AAEA,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,14 +2,14 @@ import { loadGuiBuildConfigSync } from "@hanzogui/static";
|
|
|
2
2
|
function withGui(metroConfig, optionsIn) {
|
|
3
3
|
const {
|
|
4
4
|
cssInterop,
|
|
5
|
-
...
|
|
5
|
+
...hanzoguiOptionsIn
|
|
6
6
|
} = optionsIn || {};
|
|
7
7
|
if (cssInterop) {
|
|
8
|
-
console.warn("[@hanzogui/metro-plugin] cssInterop option is deprecated. Use `
|
|
8
|
+
console.warn("[@hanzogui/metro-plugin] cssInterop option is deprecated. Use `hanzogui generate` to pre-generate CSS instead.");
|
|
9
9
|
}
|
|
10
10
|
const options = {
|
|
11
|
-
...
|
|
12
|
-
...loadGuiBuildConfigSync(
|
|
11
|
+
...hanzoguiOptionsIn,
|
|
12
|
+
...loadGuiBuildConfigSync(hanzoguiOptionsIn)
|
|
13
13
|
};
|
|
14
14
|
metroConfig.resolver = {
|
|
15
15
|
...metroConfig.resolver,
|
|
@@ -17,7 +17,7 @@ function withGui(metroConfig, optionsIn) {
|
|
|
17
17
|
};
|
|
18
18
|
metroConfig.transformer = {
|
|
19
19
|
...metroConfig.transformer,
|
|
20
|
-
|
|
20
|
+
hanzogui: options
|
|
21
21
|
};
|
|
22
22
|
return metroConfig;
|
|
23
23
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["loadGuiBuildConfigSync","withGui","metroConfig","optionsIn","cssInterop","
|
|
1
|
+
{"version":3,"names":["loadGuiBuildConfigSync","withGui","metroConfig","optionsIn","cssInterop","hanzoguiOptionsIn","console","warn","options","resolver","sourceExts","Set","transformer","hanzogui"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,sBAAA,QAA+C;AAwCjD,SAASC,QACdC,WAAA,EACAC,SAAA,EACkB;EAClB,MAAM;IAAEC,UAAA;IAAY,GAAGC;EAAkB,IAAIF,SAAA,IAAa,CAAC;EAE3D,IAAIC,UAAA,EAAY;IACdE,OAAA,CAAQC,IAAA,CACN,gHACF;EACF;EAEA,MAAMC,OAAA,GAAU;IACd,GAAGH,iBAAA;IACH,GAAGL,sBAAA,CAAuBK,iBAAiB;EAC7C;EAGAH,WAAA,CAAYO,QAAA,GAAW;IACrB,GAAIP,WAAA,CAAYO,QAAA;IAChBC,UAAA,EAAY,CAAC,IAAG,mBAAIC,GAAA,CAAI,CAAC,IAAIT,WAAA,CAAYO,QAAA,EAAUC,UAAA,IAAc,EAAC,GAAI,KAAK,CAAC,CAAC;EAC/E;EAGAR,WAAA,CAAYU,WAAA,GAAc;IACxB,GAAGV,WAAA,CAAYU,WAAA;IACfC,QAAA,EAAUL;EACZ;EAEA,OAAON,WAAA;AACT","ignoreList":[]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2,14 +2,14 @@ import { loadGuiBuildConfigSync } from "@hanzogui/static";
|
|
|
2
2
|
function withGui(metroConfig, optionsIn) {
|
|
3
3
|
const {
|
|
4
4
|
cssInterop,
|
|
5
|
-
...
|
|
5
|
+
...hanzoguiOptionsIn
|
|
6
6
|
} = optionsIn || {};
|
|
7
7
|
if (cssInterop) {
|
|
8
|
-
console.warn("[@hanzogui/metro-plugin] cssInterop option is deprecated. Use `
|
|
8
|
+
console.warn("[@hanzogui/metro-plugin] cssInterop option is deprecated. Use `hanzogui generate` to pre-generate CSS instead.");
|
|
9
9
|
}
|
|
10
10
|
const options = {
|
|
11
|
-
...
|
|
12
|
-
...loadGuiBuildConfigSync(
|
|
11
|
+
...hanzoguiOptionsIn,
|
|
12
|
+
...loadGuiBuildConfigSync(hanzoguiOptionsIn)
|
|
13
13
|
};
|
|
14
14
|
metroConfig.resolver = {
|
|
15
15
|
...metroConfig.resolver,
|
|
@@ -17,7 +17,7 @@ function withGui(metroConfig, optionsIn) {
|
|
|
17
17
|
};
|
|
18
18
|
metroConfig.transformer = {
|
|
19
19
|
...metroConfig.transformer,
|
|
20
|
-
|
|
20
|
+
hanzogui: options
|
|
21
21
|
};
|
|
22
22
|
return metroConfig;
|
|
23
23
|
}
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["loadGuiBuildConfigSync","withGui","metroConfig","optionsIn","cssInterop","
|
|
1
|
+
{"version":3,"names":["loadGuiBuildConfigSync","withGui","metroConfig","optionsIn","cssInterop","hanzoguiOptionsIn","console","warn","options","resolver","sourceExts","Set","transformer","hanzogui"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,sBAAA,QAA+C;AAwCjD,SAASC,QACdC,WAAA,EACAC,SAAA,EACkB;EAClB,MAAM;IAAEC,UAAA;IAAY,GAAGC;EAAkB,IAAIF,SAAA,IAAa,CAAC;EAE3D,IAAIC,UAAA,EAAY;IACdE,OAAA,CAAQC,IAAA,CACN,gHACF;EACF;EAEA,MAAMC,OAAA,GAAU;IACd,GAAGH,iBAAA;IACH,GAAGL,sBAAA,CAAuBK,iBAAiB;EAC7C;EAGAH,WAAA,CAAYO,QAAA,GAAW;IACrB,GAAIP,WAAA,CAAYO,QAAA;IAChBC,UAAA,EAAY,CAAC,IAAG,mBAAIC,GAAA,CAAI,CAAC,IAAIT,WAAA,CAAYO,QAAA,EAAUC,UAAA,IAAc,EAAC,GAAI,KAAK,CAAC,CAAC;EAC/E;EAGAR,WAAA,CAAYU,WAAA,GAAc;IACxB,GAAGV,WAAA,CAAYU,WAAA;IACfC,QAAA,EAAUL;EACZ;EAEA,OAAON,WAAA;AACT","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/metro-plugin",
|
|
3
|
-
"version": "
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
@@ -15,17 +15,15 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "
|
|
19
|
-
"watch": "
|
|
20
|
-
"clean": "
|
|
21
|
-
"clean:build": "
|
|
18
|
+
"build": "hanzogui-build --skip-native",
|
|
19
|
+
"watch": "hanzogui-build --skip-native --watch",
|
|
20
|
+
"clean": "hanzogui-build clean",
|
|
21
|
+
"clean:build": "hanzogui-build clean:build"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@hanzogui/static": "
|
|
25
|
-
"expo": "^55.0.26"
|
|
24
|
+
"@hanzogui/static": "8.0.0"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
|
-
"@hanzogui/build": "
|
|
29
|
-
}
|
|
30
|
-
"author": "Hanzo AI <dev@hanzo.ai>"
|
|
27
|
+
"@hanzogui/build": "8.0.0"
|
|
28
|
+
}
|
|
31
29
|
}
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { loadGuiBuildConfigSync, type GuiOptions } from '@hanzogui/static'
|
|
|
2
2
|
|
|
3
3
|
export type MetroGuiOptions = GuiOptions & {
|
|
4
4
|
/**
|
|
5
|
-
* @deprecated CSS interop is no longer supported. Use `
|
|
5
|
+
* @deprecated CSS interop is no longer supported. Use `hanzogui generate` instead.
|
|
6
6
|
*/
|
|
7
7
|
cssInterop?: boolean
|
|
8
8
|
}
|
|
@@ -21,8 +21,8 @@ type MetroConfigInput = {
|
|
|
21
21
|
* This is now a simplified wrapper that just ensures CSS is enabled and
|
|
22
22
|
* loads your Gui config. For CSS generation, use the CLI:
|
|
23
23
|
*
|
|
24
|
-
* 1. Create a `
|
|
25
|
-
* 2. Run `
|
|
24
|
+
* 1. Create a `hanzogui.build.ts` with `outputCSS` option
|
|
25
|
+
* 2. Run `hanzogui generate` before your build
|
|
26
26
|
* 3. Import the generated CSS in your app's layout
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
@@ -33,8 +33,8 @@ type MetroConfigInput = {
|
|
|
33
33
|
*
|
|
34
34
|
* const config = getDefaultConfig(__dirname, { isCSSEnabled: true })
|
|
35
35
|
* module.exports = withGui(config, {
|
|
36
|
-
* components: ['
|
|
37
|
-
* config: './
|
|
36
|
+
* components: ['hanzogui'],
|
|
37
|
+
* config: './hanzogui.config.ts',
|
|
38
38
|
* })
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
@@ -42,17 +42,17 @@ export function withGui(
|
|
|
42
42
|
metroConfig: MetroConfigInput,
|
|
43
43
|
optionsIn?: MetroGuiOptions
|
|
44
44
|
): MetroConfigInput {
|
|
45
|
-
const { cssInterop, ...
|
|
45
|
+
const { cssInterop, ...hanzoguiOptionsIn } = optionsIn || {}
|
|
46
46
|
|
|
47
47
|
if (cssInterop) {
|
|
48
48
|
console.warn(
|
|
49
|
-
'[@hanzogui/metro-plugin] cssInterop option is deprecated. Use `
|
|
49
|
+
'[@hanzogui/metro-plugin] cssInterop option is deprecated. Use `hanzogui generate` to pre-generate CSS instead.'
|
|
50
50
|
)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const options = {
|
|
54
|
-
...
|
|
55
|
-
...loadGuiBuildConfigSync(
|
|
54
|
+
...hanzoguiOptionsIn,
|
|
55
|
+
...loadGuiBuildConfigSync(hanzoguiOptionsIn),
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
// Ensure CSS files can be resolved
|
|
@@ -61,10 +61,10 @@ export function withGui(
|
|
|
61
61
|
sourceExts: [...new Set([...(metroConfig.resolver?.sourceExts || []), 'css'])],
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
// Store
|
|
64
|
+
// Store hanzogui options for potential use by other tools
|
|
65
65
|
metroConfig.transformer = {
|
|
66
66
|
...metroConfig.transformer,
|
|
67
|
-
|
|
67
|
+
hanzogui: options,
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
return metroConfig
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GuiOptions } from '@hanzogui/static';
|
|
2
2
|
export type MetroGuiOptions = GuiOptions & {
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated CSS interop is no longer supported. Use `
|
|
4
|
+
* @deprecated CSS interop is no longer supported. Use `hanzogui generate` instead.
|
|
5
5
|
*/
|
|
6
6
|
cssInterop?: boolean;
|
|
7
7
|
};
|
|
@@ -17,8 +17,8 @@ type MetroConfigInput = {
|
|
|
17
17
|
* This is now a simplified wrapper that just ensures CSS is enabled and
|
|
18
18
|
* loads your Gui config. For CSS generation, use the CLI:
|
|
19
19
|
*
|
|
20
|
-
* 1. Create a `
|
|
21
|
-
* 2. Run `
|
|
20
|
+
* 1. Create a `hanzogui.build.ts` with `outputCSS` option
|
|
21
|
+
* 2. Run `hanzogui generate` before your build
|
|
22
22
|
* 3. Import the generated CSS in your app's layout
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
@@ -29,8 +29,8 @@ type MetroConfigInput = {
|
|
|
29
29
|
*
|
|
30
30
|
* const config = getDefaultConfig(__dirname, { isCSSEnabled: true })
|
|
31
31
|
* module.exports = withGui(config, {
|
|
32
|
-
* components: ['
|
|
33
|
-
* config: './
|
|
32
|
+
* components: ['hanzogui'],
|
|
33
|
+
* config: './hanzogui.config.ts',
|
|
34
34
|
* })
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
package/LICENSE
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
BSD 3-Clause License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026-present, Hanzo AI, Inc.
|
|
4
|
-
|
|
5
|
-
Portions of this software are derived from upstream code originally licensed under
|
|
6
|
-
the MIT License, with the following copyright notices retained per its terms:
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2020 Nate Wienert
|
|
9
|
-
Copyright (c) 2015-present, Nicolas Gallagher.
|
|
10
|
-
Copyright (c) 2015-present, Facebook, Inc.
|
|
11
|
-
Copyright (c) 2021 Radix
|
|
12
|
-
Copyright (c) 2017 Carmelo Pullara
|
|
13
|
-
Copyright (c) 2018 Framer B.V.
|
|
14
|
-
Copyright (c) 2022 WorkOS
|
|
15
|
-
|
|
16
|
-
All rights reserved.
|
|
17
|
-
|
|
18
|
-
Redistribution and use in source and binary forms, with or without
|
|
19
|
-
modification, are permitted provided that the following conditions are met:
|
|
20
|
-
|
|
21
|
-
1. Redistributions of source code must retain the above copyright notice, this
|
|
22
|
-
list of conditions and the following disclaimer.
|
|
23
|
-
|
|
24
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
25
|
-
this list of conditions and the following disclaimer in the documentation
|
|
26
|
-
and/or other materials provided with the distribution.
|
|
27
|
-
|
|
28
|
-
3. Neither the name of the copyright holder nor the names of its contributors
|
|
29
|
-
may be used to endorse or promote products derived from this software
|
|
30
|
-
without specific prior written permission.
|
|
31
|
-
|
|
32
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
33
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
34
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
35
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
36
|
-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
37
|
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
38
|
-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
39
|
-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
40
|
-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
41
|
-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
42
|
-
POSSIBILITY OF SUCH DAMAGE.
|