@multiplatform.one/vite-plugin-gnome 7.88.4 → 7.88.5

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 CHANGED
@@ -67,6 +67,20 @@ const corePatches = [
67
67
  find: /native\.unstable_TextAncestorContext/g,
68
68
  replace: "(native.unstable_TextAncestorContext || native.TextAncestorContext)"
69
69
  },
70
+ {
71
+ name: "core-text-line-cap-inline",
72
+ module: "@tamagui/core",
73
+ precondition: corePrecondition,
74
+ find: /(textMultiLine: \{\s*)display: "-webkit-box",/,
75
+ replace: "$1display: \"inline\","
76
+ },
77
+ {
78
+ name: "core-text-line-cap-label",
79
+ module: "@tamagui/core",
80
+ precondition: corePrecondition,
81
+ find: /(\n\s*)supportedProps\.style = \[(\s*)numberOfLines != null && numberOfLines > 1 && \{ WebkitLineClamp: numberOfLines \},/,
82
+ replace: "$1if (numberOfLines != null && numberOfLines > 1) { supportedProps.lines = numberOfLines; supportedProps.ellipsize = 3; }$1supportedProps.style = [$2numberOfLines != null && numberOfLines > 1 && { WebkitLineClamp: numberOfLines },"
83
+ },
70
84
  {
71
85
  name: "core-init-platform-chain",
72
86
  module: "@tamagui/core",
package/lib/index.mjs CHANGED
@@ -65,6 +65,20 @@ const corePatches = [
65
65
  find: /native\.unstable_TextAncestorContext/g,
66
66
  replace: "(native.unstable_TextAncestorContext || native.TextAncestorContext)"
67
67
  },
68
+ {
69
+ name: "core-text-line-cap-inline",
70
+ module: "@tamagui/core",
71
+ precondition: corePrecondition,
72
+ find: /(textMultiLine: \{\s*)display: "-webkit-box",/,
73
+ replace: "$1display: \"inline\","
74
+ },
75
+ {
76
+ name: "core-text-line-cap-label",
77
+ module: "@tamagui/core",
78
+ precondition: corePrecondition,
79
+ find: /(\n\s*)supportedProps\.style = \[(\s*)numberOfLines != null && numberOfLines > 1 && \{ WebkitLineClamp: numberOfLines \},/,
80
+ replace: "$1if (numberOfLines != null && numberOfLines > 1) { supportedProps.lines = numberOfLines; supportedProps.ellipsize = 3; }$1supportedProps.style = [$2numberOfLines != null && numberOfLines > 1 && { WebkitLineClamp: numberOfLines },"
81
+ },
68
82
  {
69
83
  name: "core-init-platform-chain",
70
84
  module: "@tamagui/core",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/vite-plugin-gnome",
3
- "version": "7.88.4",
3
+ "version": "7.88.5",
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",
@@ -52,6 +52,8 @@
52
52
  "@tamagui/portal": "2.7.6",
53
53
  "@tamagui/sheet": "2.7.6",
54
54
  "@types/node": "^26.6.5",
55
+ "react": "19.2.5",
56
+ "react-dom": "19.2.5",
55
57
  "typescript": "~5.9.3",
56
58
  "vite": "^8.0.0",
57
59
  "vitest": "^4.1.12"
package/src/index.ts CHANGED
@@ -173,6 +173,29 @@ const corePatches: TamaguiPatch[] = [
173
173
  find: /native\.unstable_TextAncestorContext/g,
174
174
  replace: "(native.unstable_TextAncestorContext || native.TextAncestorContext)",
175
175
  },
176
+ // Text with a line cap (numberOfLines > 1) on GNOME. The vendored RN-Web
177
+ // Text styles it `display: -webkit-box`, and react-gnome only builds a
178
+ // Gtk.Label from an inline <div>; any other div becomes a FlexBox whose
179
+ // auto-created Label takes no textAlign (xalign 0) and no line cap
180
+ // (FZ-9278, upstream FZ-9380). Keep capped text inline so it stays one
181
+ // Label that reads textAlign, and hand the cap to the Label as GTK's own
182
+ // `lines` + `ellipsize` (Pango END), as react-gnome's Text does.
183
+ {
184
+ name: "core-text-line-cap-inline",
185
+ module: "@tamagui/core",
186
+ precondition: corePrecondition,
187
+ find: /(textMultiLine: \{\s*)display: "-webkit-box",/,
188
+ replace: '$1display: "inline",',
189
+ },
190
+ {
191
+ name: "core-text-line-cap-label",
192
+ module: "@tamagui/core",
193
+ precondition: corePrecondition,
194
+ find: /(\n\s*)supportedProps\.style = \[(\s*)numberOfLines != null && numberOfLines > 1 && \{ WebkitLineClamp: numberOfLines \},/,
195
+ replace:
196
+ "$1if (numberOfLines != null && numberOfLines > 1) { supportedProps.lines = numberOfLines; supportedProps.ellipsize = 3; }" +
197
+ "$1supportedProps.style = [$2numberOfLines != null && numberOfLines > 1 && { WebkitLineClamp: numberOfLines },",
198
+ },
176
199
  // @tamagui/core/native.cjs bakes in two copies of Platform from
177
200
  // its vendored react-native-web-internals: `Platform` (initialized
178
201
  // by `init_Platform` — which only calls init_esm$1() and DOESN'T
@@ -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;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAOpD,CAAC;AAEF,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,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAwOD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,kBAAkB,EAK5D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MA8E3B,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,aAAa,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