@multiplatform.one/vite-plugin-gnome 6.7.0 → 7.1.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/lib/index.cjs +30 -0
- package/lib/index.mjs +30 -1
- package/package.json +4 -4
- package/src/index.ts +30 -0
- package/types/index.d.ts +22 -0
- package/types/index.d.ts.map +1 -1
package/lib/index.cjs
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
//#region src/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* Platform-suffixed extensions for the GNOME target, in resolution order.
|
|
6
|
+
*
|
|
7
|
+
* Metro resolves `index.ios.ts` over `index.ts` on iOS; this is the same
|
|
8
|
+
* mechanism for GJS, which is how a workspace package ships a real GNOME
|
|
9
|
+
* implementation (`platform`'s `index.gnome.ts`, and the `Adw.AlertDialog` /
|
|
10
|
+
* `Gio.File` backends for `desktop` when they land) instead of a flag nothing
|
|
11
|
+
* sets.
|
|
12
|
+
*
|
|
13
|
+
* Prepend to the GNOME config's `resolve.extensions`, **ahead of**
|
|
14
|
+
* `@react-gnome/vite-plugin`'s `gnomeExtensions`:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* extensions: [...gnomePlatformExtensions, ...gnomeExtensions],
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Order matters in both directions. Ahead of `.native.*`, because a module
|
|
21
|
+
* with both variants means the `.gnome.*` one — GTK reports `isNative`, so
|
|
22
|
+
* the native file is the fallback, not the answer. And `.tsx` before `.ts`
|
|
23
|
+
* within each pair, matching Vite's own default ordering.
|
|
24
|
+
*/
|
|
25
|
+
const gnomePlatformExtensions = [
|
|
26
|
+
".gnome.tsx",
|
|
27
|
+
".gnome.ts",
|
|
28
|
+
".gnome.jsx",
|
|
29
|
+
".gnome.js",
|
|
30
|
+
".gnome.mjs",
|
|
31
|
+
".gnome.json"
|
|
32
|
+
];
|
|
4
33
|
const sheetPatch = {
|
|
5
34
|
name: "sheet-animated-view-relative-position",
|
|
6
35
|
module: "@tamagui/sheet",
|
|
@@ -216,6 +245,7 @@ function tamaguiLinkedAliases(options) {
|
|
|
216
245
|
}
|
|
217
246
|
|
|
218
247
|
//#endregion
|
|
248
|
+
exports.gnomePlatformExtensions = gnomePlatformExtensions;
|
|
219
249
|
exports.tamaguiAliases = tamaguiAliases;
|
|
220
250
|
exports.tamaguiLinkedAliases = tamaguiLinkedAliases;
|
|
221
251
|
exports.tamaguiPatchAnchors = tamaguiPatchAnchors;
|
package/lib/index.mjs
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
//#region src/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* Platform-suffixed extensions for the GNOME target, in resolution order.
|
|
4
|
+
*
|
|
5
|
+
* Metro resolves `index.ios.ts` over `index.ts` on iOS; this is the same
|
|
6
|
+
* mechanism for GJS, which is how a workspace package ships a real GNOME
|
|
7
|
+
* implementation (`platform`'s `index.gnome.ts`, and the `Adw.AlertDialog` /
|
|
8
|
+
* `Gio.File` backends for `desktop` when they land) instead of a flag nothing
|
|
9
|
+
* sets.
|
|
10
|
+
*
|
|
11
|
+
* Prepend to the GNOME config's `resolve.extensions`, **ahead of**
|
|
12
|
+
* `@react-gnome/vite-plugin`'s `gnomeExtensions`:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* extensions: [...gnomePlatformExtensions, ...gnomeExtensions],
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* Order matters in both directions. Ahead of `.native.*`, because a module
|
|
19
|
+
* with both variants means the `.gnome.*` one — GTK reports `isNative`, so
|
|
20
|
+
* the native file is the fallback, not the answer. And `.tsx` before `.ts`
|
|
21
|
+
* within each pair, matching Vite's own default ordering.
|
|
22
|
+
*/
|
|
23
|
+
const gnomePlatformExtensions = [
|
|
24
|
+
".gnome.tsx",
|
|
25
|
+
".gnome.ts",
|
|
26
|
+
".gnome.jsx",
|
|
27
|
+
".gnome.js",
|
|
28
|
+
".gnome.mjs",
|
|
29
|
+
".gnome.json"
|
|
30
|
+
];
|
|
2
31
|
const sheetPatch = {
|
|
3
32
|
name: "sheet-animated-view-relative-position",
|
|
4
33
|
module: "@tamagui/sheet",
|
|
@@ -214,4 +243,4 @@ function tamaguiLinkedAliases(options) {
|
|
|
214
243
|
}
|
|
215
244
|
|
|
216
245
|
//#endregion
|
|
217
|
-
export { tamaguiAliases, tamaguiLinkedAliases, tamaguiPatchAnchors, tamaguiPlugin };
|
|
246
|
+
export { gnomePlatformExtensions, tamaguiAliases, tamaguiLinkedAliases, tamaguiPatchAnchors, tamaguiPlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/vite-plugin-gnome",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Vite plugin that makes Tamagui render under react-gnome (GTK4/GJS) — bundle patches for @tamagui/core's native lazy-init chains, the sheet/portal native builds, the hover/animation gates, plus the Tamagui-specific resolver aliases. Pairs with @react-gnome/vite-plugin (generic GJS aliases/conditions/define).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@tamagui/core": "2.
|
|
52
|
-
"@tamagui/portal": "2.
|
|
53
|
-
"@tamagui/sheet": "2.
|
|
51
|
+
"@tamagui/core": "2.7.6",
|
|
52
|
+
"@tamagui/portal": "2.7.6",
|
|
53
|
+
"@tamagui/sheet": "2.7.6",
|
|
54
54
|
"@types/node": "^25.6.0",
|
|
55
55
|
"typescript": "~5.9.3",
|
|
56
56
|
"vite": "^8.0.0",
|
package/src/index.ts
CHANGED
|
@@ -32,6 +32,36 @@
|
|
|
32
32
|
|
|
33
33
|
import type { Plugin } from "vite";
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Platform-suffixed extensions for the GNOME target, in resolution order.
|
|
37
|
+
*
|
|
38
|
+
* Metro resolves `index.ios.ts` over `index.ts` on iOS; this is the same
|
|
39
|
+
* mechanism for GJS, which is how a workspace package ships a real GNOME
|
|
40
|
+
* implementation (`platform`'s `index.gnome.ts`, and the `Adw.AlertDialog` /
|
|
41
|
+
* `Gio.File` backends for `desktop` when they land) instead of a flag nothing
|
|
42
|
+
* sets.
|
|
43
|
+
*
|
|
44
|
+
* Prepend to the GNOME config's `resolve.extensions`, **ahead of**
|
|
45
|
+
* `@react-gnome/vite-plugin`'s `gnomeExtensions`:
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* extensions: [...gnomePlatformExtensions, ...gnomeExtensions],
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* Order matters in both directions. Ahead of `.native.*`, because a module
|
|
52
|
+
* with both variants means the `.gnome.*` one — GTK reports `isNative`, so
|
|
53
|
+
* the native file is the fallback, not the answer. And `.tsx` before `.ts`
|
|
54
|
+
* within each pair, matching Vite's own default ordering.
|
|
55
|
+
*/
|
|
56
|
+
export const gnomePlatformExtensions: readonly string[] = [
|
|
57
|
+
".gnome.tsx",
|
|
58
|
+
".gnome.ts",
|
|
59
|
+
".gnome.jsx",
|
|
60
|
+
".gnome.js",
|
|
61
|
+
".gnome.mjs",
|
|
62
|
+
".gnome.json",
|
|
63
|
+
];
|
|
64
|
+
|
|
35
65
|
/** One Vite `resolve.alias` entry (the array form Vite accepts). */
|
|
36
66
|
export interface TamaguiAliasEntry {
|
|
37
67
|
find: string | RegExp;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import type { Plugin } from "vite";
|
|
2
|
+
/**
|
|
3
|
+
* Platform-suffixed extensions for the GNOME target, in resolution order.
|
|
4
|
+
*
|
|
5
|
+
* Metro resolves `index.ios.ts` over `index.ts` on iOS; this is the same
|
|
6
|
+
* mechanism for GJS, which is how a workspace package ships a real GNOME
|
|
7
|
+
* implementation (`platform`'s `index.gnome.ts`, and the `Adw.AlertDialog` /
|
|
8
|
+
* `Gio.File` backends for `desktop` when they land) instead of a flag nothing
|
|
9
|
+
* sets.
|
|
10
|
+
*
|
|
11
|
+
* Prepend to the GNOME config's `resolve.extensions`, **ahead of**
|
|
12
|
+
* `@react-gnome/vite-plugin`'s `gnomeExtensions`:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* extensions: [...gnomePlatformExtensions, ...gnomeExtensions],
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* Order matters in both directions. Ahead of `.native.*`, because a module
|
|
19
|
+
* with both variants means the `.gnome.*` one — GTK reports `isNative`, so
|
|
20
|
+
* the native file is the fallback, not the answer. And `.tsx` before `.ts`
|
|
21
|
+
* within each pair, matching Vite's own default ordering.
|
|
22
|
+
*/
|
|
23
|
+
export declare const gnomePlatformExtensions: readonly string[];
|
|
2
24
|
/** One Vite `resolve.alias` entry (the array form Vite accepts). */
|
|
3
25
|
export interface TamaguiAliasEntry {
|
|
4
26
|
find: string | RegExp;
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,oEAAoE;AACpE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,eAAe,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;IAC/D,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,M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