@farm.js/core 0.1.65 → 0.1.66
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/{analyzer-PE33SK5W.mjs → analyzer-4UFP4HVP.mjs} +3 -3
- package/dist/analyzer-H7SIX6BJ.cjs +16 -0
- package/dist/{chunk-IP2KHSGF.mjs → chunk-27FPUFWR.mjs} +56 -3
- package/dist/{chunk-JCEFKP5M.mjs → chunk-423SSBYQ.mjs} +6 -0
- package/dist/{chunk-E2TSYUHV.mjs → chunk-435QJNC2.mjs} +2 -2
- package/dist/{chunk-YD4J37RN.cjs → chunk-4OSOLDPL.cjs} +30 -19
- package/dist/{chunk-OSFIUSYK.cjs → chunk-4TVPYN32.cjs} +3 -3
- package/dist/{chunk-ZAUOOGER.mjs → chunk-672ISQIG.mjs} +1 -1
- package/dist/{chunk-C7DCMGC4.cjs → chunk-752IHQTD.cjs} +4 -4
- package/dist/{chunk-7QVRWGBL.cjs → chunk-7ONGIFYX.cjs} +4 -4
- package/dist/{chunk-VHHLKIDZ.mjs → chunk-AZUUKA66.mjs} +7 -7
- package/dist/{chunk-A3G5IY2W.cjs → chunk-BIF5MLTH.cjs} +1 -1
- package/dist/{chunk-HKNYNSOK.mjs → chunk-BYRZ5VTH.mjs} +1 -1
- package/dist/{chunk-V727H3RI.cjs → chunk-CCAUIBIS.cjs} +6 -0
- package/dist/{chunk-32RPJAAS.cjs → chunk-DVKH2RVN.cjs} +2 -2
- package/dist/{chunk-3KJPIO5D.cjs → chunk-E4UDLFWR.cjs} +24 -24
- package/dist/{chunk-EFZGB7JC.cjs → chunk-E5UN4OWX.cjs} +1 -0
- package/dist/{chunk-7GYCZRTH.mjs → chunk-EMNKZGF4.mjs} +4 -4
- package/dist/{chunk-ZQQK4U66.cjs → chunk-HZPKJRYA.cjs} +70 -17
- package/dist/{chunk-TZOGZKI7.cjs → chunk-IT6WRNGB.cjs} +77 -77
- package/dist/{chunk-72JSHQQQ.mjs → chunk-MPIGW42F.mjs} +1 -1
- package/dist/{chunk-WNXVWXG3.cjs → chunk-MPJEIHW2.cjs} +2 -2
- package/dist/{chunk-53ZCZ46B.cjs → chunk-NHQM2Q4I.cjs} +2 -1
- package/dist/{chunk-UYRI6U3P.mjs → chunk-O75GQVUK.mjs} +2 -1
- package/dist/{chunk-6X5NKNBE.mjs → chunk-OB7VKCUZ.mjs} +11 -10
- package/dist/{chunk-T4M52BA5.cjs → chunk-OP7LHY4Y.cjs} +103 -102
- package/dist/{chunk-CZF4XIRZ.cjs → chunk-RY4ABNPE.cjs} +3 -3
- package/dist/{chunk-GRBJ7VKH.mjs → chunk-SK7QSNWE.mjs} +1 -1
- package/dist/{chunk-YUW7F6SK.mjs → chunk-TKK5QHKZ.mjs} +1 -1
- package/dist/{chunk-ZNXTU4YH.mjs → chunk-TM2E623I.mjs} +1 -0
- package/dist/{chunk-ZX2JHEWW.mjs → chunk-UBMHQVWN.mjs} +20 -9
- package/dist/{chunk-TRIDJQ6A.cjs → chunk-VBCQ5WOI.cjs} +2 -2
- package/dist/{chunk-QHRCR44V.mjs → chunk-WFWFECDW.mjs} +1 -1
- package/dist/{chunk-Q75QPLBA.mjs → chunk-WVYRLP5E.mjs} +1 -1
- package/dist/{devtools-SGYOG36E.cjs → devtools-N2JQCMXB.cjs} +2 -2
- package/dist/{devtools-PUVZB3F2.mjs → devtools-NZUVNUP3.mjs} +1 -1
- package/dist/docs.cjs +3 -3
- package/dist/docs.mjs +2 -2
- package/dist/environment/vite.cjs +3 -3
- package/dist/environment/vite.mjs +2 -2
- package/dist/index.cjs +14 -14
- package/dist/index.mjs +13 -13
- package/dist/internal/build-runtime.cjs +15 -15
- package/dist/internal/build-runtime.mjs +14 -14
- package/dist/internal/cli-runtime.cjs +2 -2
- package/dist/internal/cli-runtime.mjs +1 -1
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/config-runtime.cjs +3 -3
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/native-server-fns.cjs +5 -5
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +7 -7
- package/dist/internal/production-runtime.d.mts +7 -0
- package/dist/internal/production-runtime.d.ts +7 -0
- package/dist/internal/production-runtime.mjs +6 -6
- package/dist/{native-tree-HE2FLS72.cjs → native-tree-7LPH57Z4.cjs} +3 -3
- package/dist/{native-tree-YF2DSPKM.mjs → native-tree-VV6WN3GX.mjs} +2 -2
- package/dist/plugin.cjs +7 -7
- package/dist/plugin.mjs +6 -6
- package/dist/{port-UFUZL6RI.mjs → port-CLL4BC4O.mjs} +1 -1
- package/dist/{port-VTLHPZOI.cjs → port-HASZTQGY.cjs} +9 -9
- package/dist/{rsc-pipeline-T3PWURLJ.mjs → rsc-pipeline-7PNVJSTR.mjs} +2 -2
- package/dist/{rsc-pipeline-V4ANLRAA.cjs → rsc-pipeline-Z7QBZOIJ.cjs} +3 -3
- package/dist/{runtime-5AROV2C3.cjs → runtime-FKFCUHSK.cjs} +13 -13
- package/dist/{runtime-LRIQ3XH7.mjs → runtime-QQHX4BP3.mjs} +5 -5
- package/dist/server.cjs +25 -25
- package/dist/server.mjs +9 -9
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +7 -7
- package/dist/vite.mjs +6 -6
- package/package.json +1 -1
- package/dist/analyzer-GHWK46LX.cjs +0 -16
- /package/dist/{chunk-IMK32ERL.cjs → chunk-CHYTADNK.cjs} +0 -0
- /package/dist/{chunk-2L54YV25.mjs → chunk-XBSLKXBL.mjs} +0 -0
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
analyzeFarmMobileRoutes,
|
|
4
4
|
readAliases,
|
|
5
5
|
resolveFile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UBMHQVWN.mjs";
|
|
7
7
|
import "./chunk-IOEXXZK3.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-423SSBYQ.mjs";
|
|
9
|
+
import "./chunk-MPIGW42F.mjs";
|
|
10
10
|
import "./chunk-Y6FXYEAI.mjs";
|
|
11
11
|
export {
|
|
12
12
|
CORE_PORTABLE,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk4OSOLDPLcjs = require('./chunk-4OSOLDPL.cjs');
|
|
7
|
+
require('./chunk-WBTHHTBO.cjs');
|
|
8
|
+
require('./chunk-CCAUIBIS.cjs');
|
|
9
|
+
require('./chunk-BIF5MLTH.cjs');
|
|
10
|
+
require('./chunk-BTZ5O6VM.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.CORE_PORTABLE = _chunk4OSOLDPLcjs.CORE_PORTABLE; exports.analyzeFarmMobileRoutes = _chunk4OSOLDPLcjs.analyzeFarmMobileRoutes; exports.readAliases = _chunk4OSOLDPLcjs.readAliases; exports.resolveFile = _chunk4OSOLDPLcjs.resolveFile;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
parseFarmNativeStylesheet,
|
|
5
5
|
resolveFarmNativeClasses,
|
|
6
6
|
resolveFarmNativeInlineStyle
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-423SSBYQ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
10
10
|
} from "./chunk-LLZSYFOM.mjs";
|
|
@@ -26,12 +26,16 @@ var VOID_TAGS = new Set(
|
|
|
26
26
|
"area base br col embed hr img input link meta source track wbr".split(" ")
|
|
27
27
|
);
|
|
28
28
|
var SKIPPED_TAGS = new Set("link meta template title".split(" "));
|
|
29
|
+
var TABLE_GROUP_TAGS = new Set("table thead tbody tfoot".split(" "));
|
|
30
|
+
var TABLE_CELL_TAGS = new Set("th td".split(" "));
|
|
29
31
|
var INLINE_DEFAULTS = {
|
|
30
32
|
strong: { fontWeight: 700 },
|
|
31
33
|
b: { fontWeight: 700 },
|
|
32
34
|
em: { fontStyle: "italic" },
|
|
33
35
|
i: { fontStyle: "italic" },
|
|
34
|
-
code: { fontFamily: "mono" }
|
|
36
|
+
code: { fontFamily: "mono" },
|
|
37
|
+
th: { fontWeight: 700, textAlign: "center" },
|
|
38
|
+
caption: { textAlign: "center" }
|
|
35
39
|
};
|
|
36
40
|
var ENTITIES = {
|
|
37
41
|
amp: "&",
|
|
@@ -369,6 +373,52 @@ var Converter = class {
|
|
|
369
373
|
else node.submit = this.submitter(element);
|
|
370
374
|
return node;
|
|
371
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* A table as native views: the table and its row groups are columns, a row is a row, and its
|
|
378
|
+
* cells share the row's width, `colspan` cells a wider share, so columns line up from row to row
|
|
379
|
+
* (as `table-layout: fixed` lays them out). A cell's content draws as any block content does.
|
|
380
|
+
*/
|
|
381
|
+
tablePart(element, passed, box, boxDark, flex) {
|
|
382
|
+
const { tag } = element;
|
|
383
|
+
if (TABLE_CELL_TAGS.has(tag)) {
|
|
384
|
+
if (element.parent?.tag !== "tr") this.problem(`<${tag}> outside a row`);
|
|
385
|
+
const rowspan = Number(element.attributes.rowspan ?? 1);
|
|
386
|
+
if (rowspan !== 1) this.problem(`<${tag}> rowspan="${element.attributes.rowspan}"`);
|
|
387
|
+
const colspan = Number(element.attributes.colspan ?? 1);
|
|
388
|
+
const share = Number.isInteger(colspan) && colspan >= 1 ? colspan : 1;
|
|
389
|
+
const cell = box?.width !== void 0 ? { flexGrow: 0, flexShrink: 0, ...box } : { flexGrow: share, flexShrink: 1, flexBasis: 0, ...box };
|
|
390
|
+
const node2 = this.node("View", element, cell, boxDark);
|
|
391
|
+
const children2 = this.blocks(element.children, passed, flex);
|
|
392
|
+
if (children2.length > 0) node2.children = children2;
|
|
393
|
+
return node2;
|
|
394
|
+
}
|
|
395
|
+
const row = tag === "tr";
|
|
396
|
+
const node = this.node("View", element, row ? { ...box, flexDirection: "row" } : box, boxDark);
|
|
397
|
+
const children = [];
|
|
398
|
+
for (const child of element.children) {
|
|
399
|
+
if (typeof child === "string") {
|
|
400
|
+
if (child.trim()) this.problem(`text directly inside <${tag}>`);
|
|
401
|
+
continue;
|
|
402
|
+
}
|
|
403
|
+
if (child.tag === "colgroup" || child.tag === "col") {
|
|
404
|
+
for (const column of [child, ...child.children]) {
|
|
405
|
+
if (typeof column === "string") continue;
|
|
406
|
+
const { width, style, class: className } = column.attributes;
|
|
407
|
+
if (width || style || className) this.problem(`<${column.tag}> sets column styles`);
|
|
408
|
+
}
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
const allowed = row ? TABLE_CELL_TAGS.has(child.tag) : child.tag === "tr" || tag === "table" && (TABLE_GROUP_TAGS.has(child.tag) || child.tag === "caption");
|
|
412
|
+
if (!allowed && !SKIPPED_TAGS.has(child.tag)) {
|
|
413
|
+
this.problem(`<${child.tag}> inside <${tag}>`);
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
const part = this.element(child, passed);
|
|
417
|
+
if (part) children.push(part);
|
|
418
|
+
}
|
|
419
|
+
if (children.length > 0) node.children = children;
|
|
420
|
+
return node;
|
|
421
|
+
}
|
|
372
422
|
element(element, inherited, flexItem = false) {
|
|
373
423
|
if (SKIPPED_TAGS.has(element.tag)) return void 0;
|
|
374
424
|
if (element.attributes.form !== void 0 && CONTROL_TAGS.has(element.tag)) {
|
|
@@ -408,7 +458,7 @@ var Converter = class {
|
|
|
408
458
|
return node;
|
|
409
459
|
}
|
|
410
460
|
const textBox = flexItem && INLINE_TAGS.has(element.tag) && element.tag !== "a" && element.tag !== "br";
|
|
411
|
-
if (BLOCK_TEXT_TAGS.has(element.tag) || textBox) {
|
|
461
|
+
if (BLOCK_TEXT_TAGS.has(element.tag) || element.tag === "caption" || textBox) {
|
|
412
462
|
if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
|
|
413
463
|
this.problem(`<${element.tag}> holds block elements`);
|
|
414
464
|
}
|
|
@@ -507,6 +557,9 @@ var Converter = class {
|
|
|
507
557
|
boxDark
|
|
508
558
|
);
|
|
509
559
|
}
|
|
560
|
+
if (TABLE_GROUP_TAGS.has(element.tag) || element.tag === "tr" || TABLE_CELL_TAGS.has(element.tag)) {
|
|
561
|
+
return this.tablePart(element, passed, box, boxDark, flex);
|
|
562
|
+
}
|
|
510
563
|
if (VIEW_TAGS.has(element.tag)) {
|
|
511
564
|
const node = this.node("View", element, box, boxDark);
|
|
512
565
|
const children = this.blocks(element.children, passed, flex);
|
|
@@ -448,6 +448,9 @@ function utility(token) {
|
|
|
448
448
|
case "shrink-0":
|
|
449
449
|
return { flexShrink: 0 };
|
|
450
450
|
case "flex-nowrap":
|
|
451
|
+
case "table-auto":
|
|
452
|
+
case "table-fixed":
|
|
453
|
+
case "border-collapse":
|
|
451
454
|
return {};
|
|
452
455
|
case "flex-wrap":
|
|
453
456
|
return { flexWrap: "wrap" };
|
|
@@ -746,6 +749,9 @@ function cssColor(value) {
|
|
|
746
749
|
return `#${hex}${Math.round(Math.min(1, alpha) * 255).toString(16).padStart(2, "0")}`;
|
|
747
750
|
}
|
|
748
751
|
var IGNORED_PROPERTIES = /* @__PURE__ */ new Set([
|
|
752
|
+
// A native table always lays out like `table-layout: fixed`, its cells' borders side by side.
|
|
753
|
+
"border-collapse",
|
|
754
|
+
"table-layout",
|
|
749
755
|
// No effect on a static, touch-only screen, or the shell owns it.
|
|
750
756
|
"cursor",
|
|
751
757
|
"outline",
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-MESQF2JC.mjs";
|
|
5
5
|
import {
|
|
6
6
|
normalizeFarmProductionSiteOrigin
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WVYRLP5E.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveFarmAppManifestConfig
|
|
10
10
|
} from "./chunk-SQ5O7I3L.mjs";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-QDWMCFTH.mjs";
|
|
30
30
|
import {
|
|
31
31
|
FARM_VERSION
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-MPIGW42F.mjs";
|
|
33
33
|
import {
|
|
34
34
|
applyFarmBasePath
|
|
35
35
|
} from "./chunk-SF3JB56B.mjs";
|
|
@@ -12,17 +12,17 @@ var _chunkWBTHHTBOcjs = require('./chunk-WBTHHTBO.cjs');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkCCAUIBIScjs = require('./chunk-CCAUIBIS.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkBIF5MLTHcjs = require('./chunk-BIF5MLTH.cjs');
|
|
19
19
|
|
|
20
20
|
// src/mobile/analyzer.ts
|
|
21
21
|
var _crypto = require('crypto');
|
|
22
22
|
var _fs = require('fs');
|
|
23
23
|
var _promises = require('fs/promises');
|
|
24
24
|
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
25
|
-
var ANALYZER_VERSION = `
|
|
25
|
+
var ANALYZER_VERSION = `7:${_chunkBIF5MLTHcjs.FARM_VERSION}`;
|
|
26
26
|
var INTRINSIC_KINDS = {};
|
|
27
27
|
for (const tag of "div section main article header footer nav aside figure hr li".split(" ")) {
|
|
28
28
|
INTRINSIC_KINDS[tag] = "View";
|
|
@@ -41,6 +41,8 @@ Object.assign(INTRINSIC_KINDS, {
|
|
|
41
41
|
ul: "List",
|
|
42
42
|
ol: "List"
|
|
43
43
|
});
|
|
44
|
+
var TABLE_TAGS = new Set("table caption thead tbody tfoot tr th td colgroup col".split(" "));
|
|
45
|
+
var TABLE_STYLE_PROPERTIES = /* @__PURE__ */ new Set(["tableLayout", "borderCollapse"]);
|
|
44
46
|
var INPUT_TYPES = /* @__PURE__ */ new Set(["text", "email", "password", "number", "search", "tel", "url"]);
|
|
45
47
|
var MAPPED_EVENTS = {
|
|
46
48
|
View: /* @__PURE__ */ new Set(["onClick"]),
|
|
@@ -148,13 +150,13 @@ var INLINE_BOX_TAGS = new Set("span strong em b i small label code".split(" "));
|
|
|
148
150
|
function hasBoxStyle(node) {
|
|
149
151
|
const tokens = _nullishCoalesce(node.style, () => ( []));
|
|
150
152
|
const classes = tokens.filter((token) => !token.startsWith("style."));
|
|
151
|
-
const resolved =
|
|
153
|
+
const resolved = _chunkCCAUIBIScjs.resolveFarmNativeClasses.call(void 0, classes.join(" "));
|
|
152
154
|
const keys = [
|
|
153
155
|
...Object.keys(resolved.style),
|
|
154
156
|
...Object.keys(_nullishCoalesce(resolved.dark, () => ( {}))),
|
|
155
157
|
...tokens.filter((token) => token.startsWith("style.")).map((token) => token.slice(6))
|
|
156
158
|
];
|
|
157
|
-
return keys.some((key) => !
|
|
159
|
+
return keys.some((key) => !_chunkCCAUIBIScjs.FARM_NATIVE_TEXT_KEYS.has(key));
|
|
158
160
|
}
|
|
159
161
|
var MAPPED_COMPONENTS = {
|
|
160
162
|
"@farm.js/core": { Link: "Pressable" },
|
|
@@ -188,7 +190,7 @@ var COLOR = "(?:inherit|current|transparent|black|white|(?:slate|gray|zinc|neutr
|
|
|
188
190
|
var SPACE = "(?:\\d+(?:\\.5)?|px|auto)";
|
|
189
191
|
var SIZE = "(?:\\d+(?:\\.5)?|px|auto|full|\\d+/\\d+|min|max|fit)";
|
|
190
192
|
var PORTABLE_CLASSES = [
|
|
191
|
-
/^(?:flex|flex-row|flex-col|flex-row-reverse|flex-col-reverse|flex-wrap|flex-nowrap|flex-wrap-reverse|flex-1|flex-auto|flex-initial|flex-none|grow|grow-0|shrink|shrink-0|hidden|relative|absolute|overflow-hidden|overflow-visible|italic|not-italic|underline|line-through|no-underline|uppercase|lowercase|capitalize|normal-case|text-left|text-center|text-right|text-justify)$/,
|
|
193
|
+
/^(?:flex|flex-row|flex-col|flex-row-reverse|flex-col-reverse|flex-wrap|flex-nowrap|flex-wrap-reverse|flex-1|flex-auto|flex-initial|flex-none|grow|grow-0|shrink|shrink-0|hidden|relative|absolute|overflow-hidden|overflow-visible|italic|not-italic|underline|line-through|no-underline|uppercase|lowercase|capitalize|normal-case|text-left|text-center|text-right|text-justify|table-auto|table-fixed|border-collapse)$/,
|
|
192
194
|
/^(?:items|justify|self|content)-(?:start|end|center|between|around|evenly|stretch|baseline|auto)$/,
|
|
193
195
|
new RegExp(
|
|
194
196
|
`^-?(?:gap|gap-x|gap-y|p|px|py|pt|pr|pb|pl|ps|pe|m|mx|my|mt|mr|mb|ml|ms|me)-${SPACE}$`
|
|
@@ -219,7 +221,7 @@ var BLOCKING_CLASSES = [
|
|
|
219
221
|
],
|
|
220
222
|
[/^(?:space-[xy]-.+|divide-.+)$/, "needs child selectors"],
|
|
221
223
|
[
|
|
222
|
-
/^(?:block|inline|inline-block|inline-flex|table.*|contents|flow-root|list-item)$/,
|
|
224
|
+
/^(?:block|inline|inline-block|inline-flex|table(?!-(?:auto|fixed)$).*|contents|flow-root|list-item)$/,
|
|
223
225
|
"sets a display mode other than flex"
|
|
224
226
|
],
|
|
225
227
|
[
|
|
@@ -467,7 +469,9 @@ function analyzeSource(file, source, parseSync, lang = scriptLang(file)) {
|
|
|
467
469
|
if (isIntrinsic) {
|
|
468
470
|
kind = INTRINSIC_KINDS[tag];
|
|
469
471
|
if (!facts.tags.includes(tag)) facts.tags.push(tag);
|
|
470
|
-
if (!kind
|
|
472
|
+
if (!kind && TABLE_TAGS.has(tag)) {
|
|
473
|
+
block(opening, "unmapped-element", `<${tag}> has no React Native port`, "react-native");
|
|
474
|
+
} else if (!kind) block(opening, "unmapped-element", `<${tag}> has no native mapping`);
|
|
471
475
|
} else if (opening.name.type === "JSXNamespacedName") {
|
|
472
476
|
block(opening, "unmapped-element", `<${tag}> has no native mapping`);
|
|
473
477
|
} else {
|
|
@@ -571,7 +575,7 @@ function analyzeSource(file, source, parseSync, lang = scriptLang(file)) {
|
|
|
571
575
|
} else if (problem) block(attribute, "class-name", problem);
|
|
572
576
|
else {
|
|
573
577
|
style.push(token);
|
|
574
|
-
const native =
|
|
578
|
+
const native = _chunkCCAUIBIScjs.farmNativeClassProblem.call(void 0, token);
|
|
575
579
|
if (native) block(attribute, "class-name", native, "native");
|
|
576
580
|
}
|
|
577
581
|
}
|
|
@@ -589,11 +593,15 @@ function analyzeSource(file, source, parseSync, lang = scriptLang(file)) {
|
|
|
589
593
|
continue;
|
|
590
594
|
}
|
|
591
595
|
const key = _nullishCoalesce(property.key.name, () => ( property.key.value));
|
|
596
|
+
if (TABLE_STYLE_PROPERTIES.has(key)) {
|
|
597
|
+
block(property, "style", `style.${key} has no React Native port`, "react-native");
|
|
598
|
+
continue;
|
|
599
|
+
}
|
|
592
600
|
if (!STYLE_PROPERTIES.has(key)) {
|
|
593
601
|
block(property, "style", `style.${key} has no native mapping`);
|
|
594
602
|
continue;
|
|
595
603
|
}
|
|
596
|
-
if (!
|
|
604
|
+
if (!_chunkCCAUIBIScjs.FARM_NATIVE_STYLE_PROPERTIES.has(key)) {
|
|
597
605
|
block(property, "style", `style.${key} has no native-tier style`, "native");
|
|
598
606
|
}
|
|
599
607
|
const literal2 = staticString(property.value);
|
|
@@ -1044,12 +1052,15 @@ function analyzeComponentSource(file, source, parseSync) {
|
|
|
1044
1052
|
const kind = INTRINSIC_KINDS[tag];
|
|
1045
1053
|
if (!facts.tags.includes(tag)) facts.tags.push(tag);
|
|
1046
1054
|
facts.elements.total += 1;
|
|
1047
|
-
if (
|
|
1055
|
+
if (kind) {
|
|
1056
|
+
facts.elements.mapped += 1;
|
|
1057
|
+
facts.elements.byKind[kind] = (_nullishCoalesce(facts.elements.byKind[kind], () => ( 0))) + 1;
|
|
1058
|
+
} else if (TABLE_TAGS.has(tag)) {
|
|
1059
|
+
block(at, "unmapped-element", `<${tag}> has no React Native port`, "react-native");
|
|
1060
|
+
} else {
|
|
1048
1061
|
block(at, "unmapped-element", `<${tag}> has no native mapping`);
|
|
1049
1062
|
continue;
|
|
1050
1063
|
}
|
|
1051
|
-
facts.elements.mapped += 1;
|
|
1052
|
-
facts.elements.byKind[kind] = (_nullishCoalesce(facts.elements.byKind[kind], () => ( 0))) + 1;
|
|
1053
1064
|
const value = (attr) => attributes.find((attribute) => attribute.name.toLowerCase() === attr);
|
|
1054
1065
|
const boundAttribute = (attr) => attributes.find(
|
|
1055
1066
|
(attribute) => attribute.dynamic && (attribute.name === `:${attr}` || attribute.name === `v-bind:${attr}` || attribute.name === attr) || attr === "class" && attribute.name.startsWith("class:")
|
|
@@ -1064,7 +1075,7 @@ function analyzeComponentSource(file, source, parseSync) {
|
|
|
1064
1075
|
facts.appClasses.push({ name: token, ...locate(starts, classes.offset) });
|
|
1065
1076
|
} else if (problem) block(classes.offset, "class-name", problem);
|
|
1066
1077
|
else {
|
|
1067
|
-
const native =
|
|
1078
|
+
const native = _chunkCCAUIBIScjs.farmNativeClassProblem.call(void 0, token);
|
|
1068
1079
|
if (native) block(classes.offset, "class-name", native, "native");
|
|
1069
1080
|
}
|
|
1070
1081
|
}
|
|
@@ -1073,7 +1084,7 @@ function analyzeComponentSource(file, source, parseSync) {
|
|
|
1073
1084
|
if (boundAttribute("style")) {
|
|
1074
1085
|
block(at, "runtime-style", `<${tag}> style is computed at runtime`);
|
|
1075
1086
|
} else if (_optionalChain([style, 'optionalAccess', _59 => _59.value])) {
|
|
1076
|
-
for (const declaration of
|
|
1087
|
+
for (const declaration of _chunkCCAUIBIScjs.resolveFarmNativeInlineStyle.call(void 0, style.value).unsupported) {
|
|
1077
1088
|
block(
|
|
1078
1089
|
style.offset,
|
|
1079
1090
|
"style",
|
|
@@ -1390,7 +1401,7 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1390
1401
|
const readStylesheet = (file) => {
|
|
1391
1402
|
let sheet = parsedSheets.get(file);
|
|
1392
1403
|
if (!sheet) {
|
|
1393
|
-
sheet =
|
|
1404
|
+
sheet = _chunkCCAUIBIScjs.parseFarmNativeStylesheet.call(void 0, _fs.readFileSync.call(void 0, file, "utf8"));
|
|
1394
1405
|
parsedSheets.set(file, sheet);
|
|
1395
1406
|
}
|
|
1396
1407
|
return sheet;
|
|
@@ -1482,7 +1493,7 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1482
1493
|
appClasses.push({ file: label, ...appClass });
|
|
1483
1494
|
for (const tag of moduleFacts.tags) tags.add(tag);
|
|
1484
1495
|
for (const css of _nullishCoalesce(moduleFacts.styles, () => ( []))) {
|
|
1485
|
-
componentSheets.push(
|
|
1496
|
+
componentSheets.push(_chunkCCAUIBIScjs.parseFarmNativeStylesheet.call(void 0, css));
|
|
1486
1497
|
}
|
|
1487
1498
|
}
|
|
1488
1499
|
for (const win of moduleFacts.wins) wins.add(win);
|
|
@@ -1528,7 +1539,7 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1528
1539
|
for (const layout of layouts) walk(layout, true, true);
|
|
1529
1540
|
const sheets = [...[...stylesheets].map(readStylesheet), ...componentSheets];
|
|
1530
1541
|
for (const appClass of appClasses) {
|
|
1531
|
-
const { styled, problems } =
|
|
1542
|
+
const { styled, problems } = _chunkCCAUIBIScjs.inspectFarmNativeStylesheets.call(void 0, sheets, { class: appClass.name });
|
|
1532
1543
|
const at = { file: appClass.file, line: appClass.line, column: appClass.column };
|
|
1533
1544
|
if (!styled) {
|
|
1534
1545
|
blockers.push({
|
|
@@ -1543,7 +1554,7 @@ async function analyzeFarmMobileRoutes(options) {
|
|
|
1543
1554
|
}
|
|
1544
1555
|
}
|
|
1545
1556
|
for (const tag of tags) {
|
|
1546
|
-
for (const message of
|
|
1557
|
+
for (const message of _chunkCCAUIBIScjs.inspectFarmNativeStylesheets.call(void 0, sheets, { tag }).problems) {
|
|
1547
1558
|
blockers.push({
|
|
1548
1559
|
file: relative2(root, _nullishCoalesce(page, () => ( ""))),
|
|
1549
1560
|
line: 1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk752IHQTDcjs = require('./chunk-752IHQTD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
|
|
@@ -273,7 +273,7 @@ function requestEvent(metadata, method, status, durationMs) {
|
|
|
273
273
|
id: uuid(),
|
|
274
274
|
requestId: metadata.id,
|
|
275
275
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
276
|
-
route: routeTemplate(
|
|
276
|
+
route: routeTemplate(_chunk752IHQTDcjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
277
277
|
agent: metadata.agent,
|
|
278
278
|
kind: "request",
|
|
279
279
|
method,
|
|
@@ -286,7 +286,7 @@ function toolEvent(metadata, event) {
|
|
|
286
286
|
id: uuid(),
|
|
287
287
|
requestId: metadata.id,
|
|
288
288
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
289
|
-
route: routeTemplate(
|
|
289
|
+
route: routeTemplate(_chunk752IHQTDcjs.getFarmRouteLabel.call(void 0, metadata.route)),
|
|
290
290
|
agent: metadata.agent,
|
|
291
291
|
kind: "mcp.tool",
|
|
292
292
|
tool: event.tool,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkY5TOT5F6cjs = require('./chunk-Y5TOT5F6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkMPJEIHW2cjs = require('./chunk-MPJEIHW2.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkBTVDYS4Bcjs = require('./chunk-BTVDYS4B.cjs');
|
|
@@ -29,7 +29,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
|
29
29
|
var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkBIF5MLTHcjs = require('./chunk-BIF5MLTH.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -288,7 +288,7 @@ function createFarmAppManifest(input) {
|
|
|
288
288
|
return {
|
|
289
289
|
schemaVersion: 1,
|
|
290
290
|
app: app ? {
|
|
291
|
-
...app.version ? { farm:
|
|
291
|
+
...app.version ? { farm: _chunkBIF5MLTHcjs.FARM_VERSION } : {},
|
|
292
292
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
293
293
|
basePath: input.basePath,
|
|
294
294
|
...app.build ? { build: input.build } : {}
|
|
@@ -319,7 +319,7 @@ function resolveFarmSiteUrl() {
|
|
|
319
319
|
asUrl(read("RAILWAY_PUBLIC_DOMAIN"))
|
|
320
320
|
];
|
|
321
321
|
for (const candidate of candidates) {
|
|
322
|
-
const origin = candidate ?
|
|
322
|
+
const origin = candidate ? _chunkMPJEIHW2cjs.normalizeFarmProductionSiteOrigin.call(void 0, candidate) : void 0;
|
|
323
323
|
if (origin) return origin;
|
|
324
324
|
}
|
|
325
325
|
return null;
|
|
@@ -21,7 +21,7 @@ var _chunkE7QOEV5Zcjs = require('./chunk-E7QOEV5Z.cjs');
|
|
|
21
21
|
var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkBIF5MLTHcjs = require('./chunk-BIF5MLTH.cjs');
|
|
25
25
|
|
|
26
26
|
// src/environment-vite.ts
|
|
27
27
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
@@ -1424,7 +1424,7 @@ var PackageClientBoundaryCache = class {
|
|
|
1424
1424
|
}
|
|
1425
1425
|
const contents = JSON.stringify({
|
|
1426
1426
|
schema: SCHEMA_VERSION,
|
|
1427
|
-
farm:
|
|
1427
|
+
farm: _chunkBIF5MLTHcjs.FARM_VERSION,
|
|
1428
1428
|
paths,
|
|
1429
1429
|
entries
|
|
1430
1430
|
});
|
|
@@ -1472,7 +1472,7 @@ function readStoredCache(file) {
|
|
|
1472
1472
|
} catch (e20) {
|
|
1473
1473
|
return null;
|
|
1474
1474
|
}
|
|
1475
|
-
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !==
|
|
1475
|
+
if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkBIF5MLTHcjs.FARM_VERSION) {
|
|
1476
1476
|
return null;
|
|
1477
1477
|
}
|
|
1478
1478
|
const { paths, entries } = value;
|
|
@@ -1483,7 +1483,7 @@ function readStoredCache(file) {
|
|
|
1483
1483
|
const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
|
|
1484
1484
|
if (usable.length > 0) valid[key] = usable;
|
|
1485
1485
|
}
|
|
1486
|
-
return { schema: SCHEMA_VERSION, farm:
|
|
1486
|
+
return { schema: SCHEMA_VERSION, farm: _chunkBIF5MLTHcjs.FARM_VERSION, paths, entries: valid };
|
|
1487
1487
|
}
|
|
1488
1488
|
function isRecord(value) {
|
|
1489
1489
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveFarmClientCacheAdapterEntry,
|
|
29
29
|
resolveFarmImageProviderForRuntime,
|
|
30
30
|
resolveFarmRouteRootStrategy
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-EMNKZGF4.mjs";
|
|
32
32
|
import {
|
|
33
33
|
loadTailwindVitePlugin
|
|
34
34
|
} from "./chunk-OM7WILES.mjs";
|
|
@@ -70,13 +70,13 @@ import {
|
|
|
70
70
|
resolveFarmMCPRouteLabel,
|
|
71
71
|
resolveFarmMarkdownRouteLabel,
|
|
72
72
|
setFarmRouteLabel
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-435QJNC2.mjs";
|
|
74
74
|
import {
|
|
75
75
|
FARM_DEFAULT_MCP_PATH
|
|
76
76
|
} from "./chunk-MESQF2JC.mjs";
|
|
77
77
|
import {
|
|
78
78
|
isFarmPreviewDeploymentEnvironment
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-WVYRLP5E.mjs";
|
|
80
80
|
import {
|
|
81
81
|
createFarmServerFnBoundaryModule,
|
|
82
82
|
isFarmServerFnBoundaryId,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
rewriteFarmPackageClientImports,
|
|
111
111
|
rewriteFarmReactServerImports,
|
|
112
112
|
stripUseClientDirective
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-672ISQIG.mjs";
|
|
114
114
|
import {
|
|
115
115
|
generateFarmDocsAdapterClientRuntime,
|
|
116
116
|
getFarmDocsAdapterConfigModule
|
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
} from "./chunk-QDWMCFTH.mjs";
|
|
264
264
|
import {
|
|
265
265
|
FARM_VERSION
|
|
266
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-MPIGW42F.mjs";
|
|
267
267
|
import {
|
|
268
268
|
DEFAULT_FARM_API_BASE_PATH
|
|
269
269
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -886,7 +886,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
886
886
|
return import("./workflows.mjs");
|
|
887
887
|
}
|
|
888
888
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
889
|
-
return import("./devtools-
|
|
889
|
+
return import("./devtools-NZUVNUP3.mjs");
|
|
890
890
|
}
|
|
891
891
|
function loadFarmDevtoolsUIRuntime() {
|
|
892
892
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -2597,7 +2597,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2597
2597
|
}
|
|
2598
2598
|
}
|
|
2599
2599
|
if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && req.headers.accept?.includes(FARM_NATIVE_TREE_CONTENT_TYPE)) {
|
|
2600
|
-
const { createFarmNativeTreeResponse } = await import("./native-tree-
|
|
2600
|
+
const { createFarmNativeTreeResponse } = await import("./native-tree-VV6WN3GX.mjs");
|
|
2601
2601
|
const treeBodyInit = requestMethod === "POST" ? { body: createFarmNodeRequestBodyStream(req), duplex: "half" } : {};
|
|
2602
2602
|
const treeResponse = await createFarmNativeTreeResponse({
|
|
2603
2603
|
request: new Request(fullUrl, {
|
|
@@ -448,6 +448,9 @@ function utility(token) {
|
|
|
448
448
|
case "shrink-0":
|
|
449
449
|
return { flexShrink: 0 };
|
|
450
450
|
case "flex-nowrap":
|
|
451
|
+
case "table-auto":
|
|
452
|
+
case "table-fixed":
|
|
453
|
+
case "border-collapse":
|
|
451
454
|
return {};
|
|
452
455
|
case "flex-wrap":
|
|
453
456
|
return { flexWrap: "wrap" };
|
|
@@ -746,6 +749,9 @@ function cssColor(value) {
|
|
|
746
749
|
return `#${hex}${Math.round(Math.min(1, alpha) * 255).toString(16).padStart(2, "0")}`;
|
|
747
750
|
}
|
|
748
751
|
var IGNORED_PROPERTIES = /* @__PURE__ */ new Set([
|
|
752
|
+
// A native table always lays out like `table-layout: fixed`, its cells' borders side by side.
|
|
753
|
+
"border-collapse",
|
|
754
|
+
"table-layout",
|
|
749
755
|
// No effect on a static, touch-only screen, or the shell owns it.
|
|
750
756
|
"cursor",
|
|
751
757
|
"outline",
|
|
@@ -12,7 +12,7 @@ var _chunkWMTBBQHYcjs = require('./chunk-WMTBBQHY.cjs');
|
|
|
12
12
|
var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkCHYTADNKcjs = require('./chunk-CHYTADNK.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -568,7 +568,7 @@ async function resolveAPIContext(options) {
|
|
|
568
568
|
config: options.config,
|
|
569
569
|
configPath: options.configPath
|
|
570
570
|
}));
|
|
571
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
571
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkCHYTADNKcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
572
572
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _24 => _24.guardedPaths]), () => ( [])));
|
|
573
573
|
return {
|
|
574
574
|
root,
|