@wix/himalaya-cli 0.1241.0 → 0.1243.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/tokens.d.ts +94 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +40 -6
- package/dist/cli.mjs +363 -227
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/tokens.md +28 -0
- package/package.json +2 -2
- package/templates/beauty-salon-owner/dev/index.ts +2 -2
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/community-club-owner/dev/index.ts +2 -2
- package/templates/community-club-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/community-club-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/community-club-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/events-meetups-owner/dev/index.ts +2 -2
- package/templates/events-meetups-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/gym-fitness-owner/dev/index.ts +2 -2
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/nonprofit-cause-owner/dev/index.ts +2 -2
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/owner-lite/dev/index.ts +2 -2
- package/templates/owner-lite/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/owner-lite/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/owner-lite/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/podcast-creator-owner/dev/index.ts +2 -2
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/portfolio-creative-owner/dev/index.ts +2 -2
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/restaurant-owner/dev/index.ts +2 -2
- package/templates/restaurant-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/retail-store-owner/dev/index.ts +2 -2
- package/templates/retail-store-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
- package/templates/yoga-studio-owner/dev/index.ts +2 -2
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-selected-site.ts +9 -3
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-overview/index.ts +14 -9
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-sites/index.ts +35 -4
package/dist/cli.mjs
CHANGED
|
@@ -4053,7 +4053,8 @@ __export(paths_exports, {
|
|
|
4053
4053
|
storeConfigPath: () => storeConfigPath,
|
|
4054
4054
|
storeDir: () => storeDir,
|
|
4055
4055
|
tvosProjectYml: () => tvosProjectYml,
|
|
4056
|
-
watchosProjectYml: () => watchosProjectYml
|
|
4056
|
+
watchosProjectYml: () => watchosProjectYml,
|
|
4057
|
+
watchosStoreSpec: () => watchosStoreSpec
|
|
4057
4058
|
});
|
|
4058
4059
|
import { existsSync as existsSync6, readdirSync as readdirSync4 } from "node:fs";
|
|
4059
4060
|
import { dirname as dirname6, join as join10, resolve as resolve7 } from "node:path";
|
|
@@ -4116,6 +4117,9 @@ function androidTvManifestPath(app) {
|
|
|
4116
4117
|
function iosStoreSpec(app) {
|
|
4117
4118
|
return join10(appDir(app), "ios", "project.store.yml");
|
|
4118
4119
|
}
|
|
4120
|
+
function watchosStoreSpec(app) {
|
|
4121
|
+
return join10(appDir(app), "watchos", "project.store.yml");
|
|
4122
|
+
}
|
|
4119
4123
|
function androidGradle(app) {
|
|
4120
4124
|
const androidDir = join10(appDir(app), "android");
|
|
4121
4125
|
const preferred = join10(androidDir, `${app}-app`, "build.gradle.kts");
|
|
@@ -6757,6 +6761,31 @@ function tonalElevationAlpha(level) {
|
|
|
6757
6761
|
if (typeof level !== "number" || !Number.isFinite(level)) return 0;
|
|
6758
6762
|
return TONAL_ELEVATION_ALPHA[Math.min(5, Math.max(0, Math.round(level)))];
|
|
6759
6763
|
}
|
|
6764
|
+
function resolveButtonTokens(tokens2, size, style) {
|
|
6765
|
+
const button = own(own(tokens2, "controls"), "button");
|
|
6766
|
+
const sizeKey = size === "sm" || size === "lg" ? size : "md";
|
|
6767
|
+
const s2 = own(button, sizeKey);
|
|
6768
|
+
const v2 = own(own(button, "variants"), style || "primary");
|
|
6769
|
+
const out2 = {};
|
|
6770
|
+
const set = (k2, val) => {
|
|
6771
|
+
if (val !== void 0) out2[k2] = val;
|
|
6772
|
+
};
|
|
6773
|
+
set("height", nonNegative(own(s2, "height")));
|
|
6774
|
+
set("paddingH", nonNegative(own(s2, "paddingH")));
|
|
6775
|
+
set("paddingV", nonNegative(own(s2, "paddingV")));
|
|
6776
|
+
set("text", nonEmpty(own(s2, "text")));
|
|
6777
|
+
set("icon", nonNegative(own(s2, "icon")));
|
|
6778
|
+
set("radius", nonNegative(own(v2, "radius")) ?? nonNegative(own(s2, "radius")));
|
|
6779
|
+
set("fill", nonEmpty(own(v2, "fill")));
|
|
6780
|
+
set("label", nonEmpty(own(v2, "label")));
|
|
6781
|
+
set("border", nonEmpty(own(v2, "border")));
|
|
6782
|
+
set("borderWidth", nonNegative(own(v2, "borderWidth")));
|
|
6783
|
+
return out2;
|
|
6784
|
+
}
|
|
6785
|
+
function buttonHitSlop(visibleHeight) {
|
|
6786
|
+
if (typeof visibleHeight !== "number" || !Number.isFinite(visibleHeight)) return 0;
|
|
6787
|
+
return Math.max(0, (BUTTON_MIN_HIT_TARGET - visibleHeight) / 2);
|
|
6788
|
+
}
|
|
6760
6789
|
function buildTokenRegistry(tokens2) {
|
|
6761
6790
|
return {
|
|
6762
6791
|
colors: new Set(Object.keys(tokens2.colors ?? {})),
|
|
@@ -6824,12 +6853,16 @@ function walk(node, registry, path2, out2) {
|
|
|
6824
6853
|
walk(value, registry, `${path2}.${key2}`, out2);
|
|
6825
6854
|
}
|
|
6826
6855
|
}
|
|
6827
|
-
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS;
|
|
6856
|
+
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS;
|
|
6828
6857
|
var init_tokens = __esm({
|
|
6829
6858
|
"../../core/ts/src/tokens.ts"() {
|
|
6830
6859
|
"use strict";
|
|
6831
6860
|
SYSTEM_FONT_FAMILY = "$system";
|
|
6832
6861
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
6862
|
+
BUTTON_MIN_HIT_TARGET = 44;
|
|
6863
|
+
nonNegative = (v2) => typeof v2 === "number" && Number.isFinite(v2) && v2 >= 0 ? v2 : void 0;
|
|
6864
|
+
nonEmpty = (v2) => typeof v2 === "string" && v2 !== "" ? v2 : void 0;
|
|
6865
|
+
own = (o2, k2) => o2 && typeof o2 === "object" && Object.prototype.hasOwnProperty.call(o2, k2) ? o2[k2] : void 0;
|
|
6833
6866
|
COLOR_TOKEN_PROPS = {
|
|
6834
6867
|
Badge: ["token"],
|
|
6835
6868
|
Card: ["background"],
|
|
@@ -8112,7 +8145,7 @@ function isDynamicValue(v2) {
|
|
|
8112
8145
|
function isActionEnvelope(v2) {
|
|
8113
8146
|
return !!v2 && typeof v2 === "object" && !Array.isArray(v2) && typeof v2.actionId === "string";
|
|
8114
8147
|
}
|
|
8115
|
-
function
|
|
8148
|
+
function own2(bag, key2) {
|
|
8116
8149
|
return Object.prototype.hasOwnProperty.call(bag, key2) ? bag[key2] : void 0;
|
|
8117
8150
|
}
|
|
8118
8151
|
function atExposureOf(node) {
|
|
@@ -8136,17 +8169,17 @@ function hasPropHandler(node) {
|
|
|
8136
8169
|
const body = bag(node.body);
|
|
8137
8170
|
const bags = [bag(body.props), bag(node.props), node];
|
|
8138
8171
|
return bags.some((b2) => PROP_HANDLER_KEYS.some((k2) => {
|
|
8139
|
-
const v2 =
|
|
8172
|
+
const v2 = own2(b2, k2);
|
|
8140
8173
|
return !!v2 && typeof v2 === "object" && !Array.isArray(v2);
|
|
8141
8174
|
}));
|
|
8142
8175
|
}
|
|
8143
8176
|
function ownName(n2) {
|
|
8144
8177
|
for (const k2 of ACCESSIBLE_NAME_KEYS) {
|
|
8145
|
-
const v2 =
|
|
8178
|
+
const v2 = own2(n2, k2);
|
|
8146
8179
|
if (typeof v2 === "string" && v2.trim() !== "" || isDynamicValue(v2)) return true;
|
|
8147
8180
|
}
|
|
8148
8181
|
for (const k2 of CONTENT_ARM_KEYS) {
|
|
8149
|
-
const v2 =
|
|
8182
|
+
const v2 = own2(n2, k2);
|
|
8150
8183
|
if (v2 !== void 0 && v2 !== null) return true;
|
|
8151
8184
|
}
|
|
8152
8185
|
return false;
|
|
@@ -8214,7 +8247,7 @@ function accessibleNameGaps(descriptor, options = {}) {
|
|
|
8214
8247
|
if (exposure !== "decorative") {
|
|
8215
8248
|
const tappable = isInteractive(n2) || propHandlers && hasPropHandler(n2);
|
|
8216
8249
|
const type = componentTypeOf(n2);
|
|
8217
|
-
const row = type ?
|
|
8250
|
+
const row = type ? own2(A11Y_CONTRACT, type) : void 0;
|
|
8218
8251
|
const contractual = !interactiveOnly && row?.name === "required";
|
|
8219
8252
|
if ((tappable || contractual) && !hasAccessibleName(n2)) {
|
|
8220
8253
|
out2.push({
|
|
@@ -9799,7 +9832,7 @@ function serviceFieldDeclared(state, path2) {
|
|
|
9799
9832
|
function ellipsis(value, max) {
|
|
9800
9833
|
return value.length <= max ? value : `${value.slice(0, max)}\u2026`;
|
|
9801
9834
|
}
|
|
9802
|
-
function
|
|
9835
|
+
function own3(table, key2) {
|
|
9803
9836
|
return Object.prototype.hasOwnProperty.call(table, key2) ? table[key2] : void 0;
|
|
9804
9837
|
}
|
|
9805
9838
|
function isOpaqueAuthorJson(key2, value, atRoot) {
|
|
@@ -9844,7 +9877,7 @@ function nativeRequiredFindings(descriptor) {
|
|
|
9844
9877
|
value.forEach((v2, i2) => checkNested(v2, of2, `${path2}[${i2}]`, from));
|
|
9845
9878
|
return;
|
|
9846
9879
|
}
|
|
9847
|
-
const rule =
|
|
9880
|
+
const rule = own3(NATIVE_NESTED_CLASSES, cls);
|
|
9848
9881
|
if (!rule) return;
|
|
9849
9882
|
if (Array.isArray(value) || !value || typeof value !== "object") {
|
|
9850
9883
|
reportKind(cls, value, path2, from);
|
|
@@ -9852,17 +9885,17 @@ function nativeRequiredFindings(descriptor) {
|
|
|
9852
9885
|
}
|
|
9853
9886
|
const bag = value;
|
|
9854
9887
|
for (const name of rule.required) {
|
|
9855
|
-
if (
|
|
9888
|
+
if (own3(bag, name) !== void 0 && bag[name] !== null) continue;
|
|
9856
9889
|
out2.push({
|
|
9857
9890
|
path: `${path2}.${name}`,
|
|
9858
9891
|
message: `${cls}.${name} is REQUIRED by the native decoder but is missing \u2014 native decode rejects it ("Field '${name}' is required for type with serial name 'io.himalaya.core.${cls}', but it was missing") and drops the WHOLE screen from the seed, while web renders it fine (reached from ${from})`
|
|
9859
9892
|
});
|
|
9860
9893
|
}
|
|
9861
9894
|
for (const [name, sub] of Object.entries(rule.nested)) {
|
|
9862
|
-
const inner =
|
|
9895
|
+
const inner = own3(bag, name);
|
|
9863
9896
|
if (inner !== void 0 && inner !== null) checkNested(inner, sub, `${path2}.${name}`, from);
|
|
9864
9897
|
}
|
|
9865
|
-
if (cls === "Action") checkActionParams(
|
|
9898
|
+
if (cls === "Action") checkActionParams(own3(bag, "params"), `${path2}.params`, from);
|
|
9866
9899
|
};
|
|
9867
9900
|
const checkActionParams = (params, path2, from) => {
|
|
9868
9901
|
if (params === void 0 || params === null) return;
|
|
@@ -9895,22 +9928,22 @@ function nativeRequiredFindings(descriptor) {
|
|
|
9895
9928
|
const props = body.props;
|
|
9896
9929
|
const bag = props && typeof props === "object" && !Array.isArray(props) ? props : {};
|
|
9897
9930
|
const base = at2 ? `${at2}.body.props` : "body.props";
|
|
9898
|
-
for (const name of
|
|
9899
|
-
if (
|
|
9931
|
+
for (const name of own3(NATIVE_REQUIRED_PROPS, type) ?? []) {
|
|
9932
|
+
if (own3(bag, name) !== void 0 && bag[name] !== null) continue;
|
|
9900
9933
|
const hint = type === "Button" && name === "title" && bag.iconOnly === true ? " \u2014 `iconOnly` HIDES the label, it does not make it optional; keep a title (it is also the accessibility label)" : "";
|
|
9901
9934
|
out2.push({
|
|
9902
9935
|
path: `${base}.${name}`,
|
|
9903
9936
|
message: `${type}.${name} is REQUIRED by the native decoder but is missing \u2014 native decode rejects it ("Field '${name}' is required for type with serial name 'io.himalaya.core.${type}Props', but it was missing") and drops the WHOLE screen from the seed, while web renders it fine${hint}`
|
|
9904
9937
|
});
|
|
9905
9938
|
}
|
|
9906
|
-
for (const [prop, cls] of Object.entries(
|
|
9907
|
-
const value =
|
|
9939
|
+
for (const [prop, cls] of Object.entries(own3(NATIVE_NESTED_PROPS, type) ?? {})) {
|
|
9940
|
+
const value = own3(bag, prop);
|
|
9908
9941
|
if (value === void 0 || value === null) continue;
|
|
9909
9942
|
checkNested(value, cls, `${base}.${prop}`, `${type}.${prop}`);
|
|
9910
9943
|
}
|
|
9911
9944
|
}
|
|
9912
9945
|
if (body && typeof body === "object" && typeof body.type === "string" && typeof body.package === "string") {
|
|
9913
|
-
const modifiers =
|
|
9946
|
+
const modifiers = own3(record2, "modifiers");
|
|
9914
9947
|
if (modifiers !== void 0 && modifiers !== null) {
|
|
9915
9948
|
checkNested(modifiers, NATIVE_MODIFIERS_CLASS, at2 ? `${at2}.modifiers` : "modifiers", "modifiers");
|
|
9916
9949
|
}
|
|
@@ -9924,7 +9957,7 @@ function nativeRequiredFindings(descriptor) {
|
|
|
9924
9957
|
if (descriptor && typeof descriptor === "object" && !Array.isArray(descriptor)) {
|
|
9925
9958
|
const root = descriptor;
|
|
9926
9959
|
for (const [field, cls] of Object.entries(NATIVE_DESCRIPTOR_NESTED)) {
|
|
9927
|
-
const value =
|
|
9960
|
+
const value = own3(root, field);
|
|
9928
9961
|
if (value === void 0 || value === null) continue;
|
|
9929
9962
|
checkNested(value, cls, field, `${NATIVE_DESCRIPTOR_CLASS}.${field}`);
|
|
9930
9963
|
}
|
|
@@ -9954,14 +9987,14 @@ function componentPropFindings(descriptor) {
|
|
|
9954
9987
|
const body = record2.body;
|
|
9955
9988
|
if (typeof body?.package === "string" && CORE_PACKAGES.has(body.package) && typeof body.type === "string") {
|
|
9956
9989
|
const type = body.type;
|
|
9957
|
-
const declared =
|
|
9990
|
+
const declared = own3(KNOWN_PROPS, type);
|
|
9958
9991
|
const props = body.props;
|
|
9959
9992
|
if (declared && props && typeof props === "object" && !Array.isArray(props)) {
|
|
9960
9993
|
const bag = props;
|
|
9961
9994
|
const base = at2 ? `${at2}.body.props` : "body.props";
|
|
9962
9995
|
for (const name of Object.keys(bag)) {
|
|
9963
9996
|
const path2 = `${base}.${name}`;
|
|
9964
|
-
const kind =
|
|
9997
|
+
const kind = own3(declared, name);
|
|
9965
9998
|
if (kind === void 0) {
|
|
9966
9999
|
if (LEGACY_UNSCORED_KEYS.has(`${type}.${name}`)) continue;
|
|
9967
10000
|
const hint = MODIFIER_KEYS.has(name) ? ` \u2014 \`${name}\` is a MODIFIER, not a prop: move it out of \`props\` and into the node's \`modifiers\` bag (\`{ id, body, modifiers: { ${name}: \u2026 } }\`)` : "";
|
|
@@ -9977,7 +10010,7 @@ function componentPropFindings(descriptor) {
|
|
|
9977
10010
|
if (kind === "any") continue;
|
|
9978
10011
|
if (typeof value === "string" && BINDING_SIGIL_RE.test(value)) {
|
|
9979
10012
|
if (kind === "string") continue;
|
|
9980
|
-
const twin =
|
|
10013
|
+
const twin = own3(declared, `${name}Path`) !== void 0 ? `${name}Path` : void 0;
|
|
9981
10014
|
const inArray = IN_ARRAY_BINDING_PROPS.has(`${type}.${name}`) && value.startsWith(SERVICE_SIGIL);
|
|
9982
10015
|
out2.push({
|
|
9983
10016
|
path: path2,
|
|
@@ -10000,10 +10033,10 @@ function componentPropFindings(descriptor) {
|
|
|
10000
10033
|
});
|
|
10001
10034
|
continue;
|
|
10002
10035
|
}
|
|
10003
|
-
if (
|
|
10036
|
+
if (own3(NATIVE_PROP_ENUMS, name) !== void 0) continue;
|
|
10004
10037
|
const actual = wireKind(value);
|
|
10005
10038
|
if (actual === kind) {
|
|
10006
|
-
if (kind === "number" && typeof value === "number" && !Number.isInteger(value) &&
|
|
10039
|
+
if (kind === "number" && typeof value === "number" && !Number.isInteger(value) && own3(INTEGER_PROPS, type)?.includes(name)) {
|
|
10007
10040
|
out2.push({
|
|
10008
10041
|
path: path2,
|
|
10009
10042
|
kind: "decode",
|
|
@@ -10021,13 +10054,13 @@ function componentPropFindings(descriptor) {
|
|
|
10021
10054
|
}
|
|
10022
10055
|
}
|
|
10023
10056
|
if (body && typeof body === "object" && typeof body.type === "string" && typeof body.package === "string") {
|
|
10024
|
-
const modifiers =
|
|
10057
|
+
const modifiers = own3(record2, "modifiers");
|
|
10025
10058
|
if (modifiers && typeof modifiers === "object" && !Array.isArray(modifiers)) {
|
|
10026
10059
|
const schemaOwnsUnknownKeys = SCHEMA_SCORED_NODES.has(at2);
|
|
10027
10060
|
const bag = modifiers;
|
|
10028
10061
|
for (const key2 of Object.keys(bag)) {
|
|
10029
10062
|
if (MODIFIER_KEYS.has(key2)) {
|
|
10030
|
-
const spec =
|
|
10063
|
+
const spec = own3(MODIFIER_KINDS, key2);
|
|
10031
10064
|
const value = bag[key2];
|
|
10032
10065
|
if (!spec || value === void 0 || value === null) continue;
|
|
10033
10066
|
const where = at2 ? `${at2}.modifiers.${key2}` : `modifiers.${key2}`;
|
|
@@ -10815,7 +10848,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
10815
10848
|
if (isOpaqueAuthorJson(k2, val, at2 === "")) continue;
|
|
10816
10849
|
if (k2 === "params" && typeof node.actionId === "string") continue;
|
|
10817
10850
|
const here = at2 ? `${at2}.${k2}` : k2;
|
|
10818
|
-
const allowed2 =
|
|
10851
|
+
const allowed2 = own3(NATIVE_PROP_ENUMS, k2);
|
|
10819
10852
|
if (typeof val === "string" && enums.has(k2) && DYNAMIC_PLACEHOLDER.test(val)) {
|
|
10820
10853
|
issues.push({
|
|
10821
10854
|
severity: "error",
|
|
@@ -13432,7 +13465,6 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
13432
13465
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
13433
13466
|
var init_idiom = __esm({
|
|
13434
13467
|
"../../core/ts/src/idiom.ts"() {
|
|
13435
|
-
"use strict";
|
|
13436
13468
|
IDIOM_CONTEXTS = {
|
|
13437
13469
|
ios: { native: ["ios"] },
|
|
13438
13470
|
android: { native: ["material"] },
|
|
@@ -13692,6 +13724,47 @@ function tokenColorIssues(dir, tokensPathOverride) {
|
|
|
13692
13724
|
checkElevations(layer, `idiom.${overlay}.`, /* @__PURE__ */ new Set([...baseShadows, ...shadowNames(layer)]));
|
|
13693
13725
|
}
|
|
13694
13726
|
}
|
|
13727
|
+
const groupNames = (layer, group) => {
|
|
13728
|
+
const g2 = layer?.[group];
|
|
13729
|
+
return new Set(g2 !== null && typeof g2 === "object" && !Array.isArray(g2) ? Object.keys(g2) : []);
|
|
13730
|
+
};
|
|
13731
|
+
const checkControlButton = (layer, where, typo, cols) => {
|
|
13732
|
+
const controlButton = layer?.controls?.button;
|
|
13733
|
+
if (controlButton === void 0 || controlButton === null || typeof controlButton !== "object" || Array.isArray(controlButton)) return;
|
|
13734
|
+
const btn = controlButton;
|
|
13735
|
+
for (const size of ["sm", "md", "lg"]) {
|
|
13736
|
+
const text8 = btn[size]?.text;
|
|
13737
|
+
if (text8 === void 0 || typeof text8 === "string" && typo.has(text8)) continue;
|
|
13738
|
+
error(
|
|
13739
|
+
`${tokensPath}: ${where}controls.button.${size}.text is ${JSON.stringify(text8)}, which names no \`typography\` token \u2014 every renderer would keep the built-in Button label. Name one that exists.`
|
|
13740
|
+
);
|
|
13741
|
+
}
|
|
13742
|
+
const variants = btn.variants;
|
|
13743
|
+
if (variants !== null && typeof variants === "object" && !Array.isArray(variants)) {
|
|
13744
|
+
for (const [style, v2] of Object.entries(variants)) {
|
|
13745
|
+
for (const field of ["fill", "label", "border"]) {
|
|
13746
|
+
const value = v2?.[field];
|
|
13747
|
+
if (value === void 0 || typeof value === "string" && (isCanonicalHex(value) || cols.has(value))) continue;
|
|
13748
|
+
error(
|
|
13749
|
+
`${tokensPath}: ${where}controls.button.variants.${style}.${field} is ${JSON.stringify(value)}, which is neither a \`colors\` token nor a #RRGGBB(AA) literal \u2014 every renderer would keep the built-in colour.`
|
|
13750
|
+
);
|
|
13751
|
+
}
|
|
13752
|
+
}
|
|
13753
|
+
}
|
|
13754
|
+
};
|
|
13755
|
+
const baseTypo = groupNames(raw, "typography");
|
|
13756
|
+
const baseCols = groupNames(raw, "colors");
|
|
13757
|
+
checkControlButton(raw, "", baseTypo, baseCols);
|
|
13758
|
+
if (idiom !== null && typeof idiom === "object" && !Array.isArray(idiom)) {
|
|
13759
|
+
for (const [overlay, layer] of Object.entries(idiom)) {
|
|
13760
|
+
checkControlButton(
|
|
13761
|
+
layer,
|
|
13762
|
+
`idiom.${overlay}.`,
|
|
13763
|
+
/* @__PURE__ */ new Set([...baseTypo, ...groupNames(layer, "typography")]),
|
|
13764
|
+
/* @__PURE__ */ new Set([...baseCols, ...groupNames(layer, "colors")])
|
|
13765
|
+
);
|
|
13766
|
+
}
|
|
13767
|
+
}
|
|
13695
13768
|
const colors = raw.colors;
|
|
13696
13769
|
if (colors === void 0) return issues;
|
|
13697
13770
|
if (colors === null || typeof colors !== "object" || Array.isArray(colors)) {
|
|
@@ -15507,15 +15580,15 @@ function hexToRgb2(hex2) {
|
|
|
15507
15580
|
}
|
|
15508
15581
|
function rgba(color, alpha2) {
|
|
15509
15582
|
let h2 = color.trim().replace(/^#/, "");
|
|
15510
|
-
let
|
|
15583
|
+
let own4 = 1;
|
|
15511
15584
|
if (/^[\da-f]{4}$/i.test(h2) || /^[\da-f]{8}$/i.test(h2)) {
|
|
15512
15585
|
const a2 = h2.length === 4 ? h2[3] + h2[3] : h2.slice(6, 8);
|
|
15513
|
-
|
|
15586
|
+
own4 = parseInt(a2, 16) / 255;
|
|
15514
15587
|
h2 = h2.length === 4 ? h2.slice(0, 3) : h2.slice(0, 6);
|
|
15515
15588
|
}
|
|
15516
15589
|
const rgb = hexToRgb2(`#${h2}`);
|
|
15517
15590
|
if (!rgb) return color;
|
|
15518
|
-
const composed2 =
|
|
15591
|
+
const composed2 = own4 === 1 ? clamp(alpha2) : Math.round(clamp(alpha2) * own4 * 1e3) / 1e3;
|
|
15519
15592
|
return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${composed2})`;
|
|
15520
15593
|
}
|
|
15521
15594
|
function normalizeSpring(spring, durationMs) {
|
|
@@ -15876,8 +15949,8 @@ var init_tokens2 = __esm({
|
|
|
15876
15949
|
// ../font-bake/web-fallback.ts
|
|
15877
15950
|
function webRenderedFallback(family) {
|
|
15878
15951
|
const stack = fontStack(family);
|
|
15879
|
-
const
|
|
15880
|
-
const tail = stack.startsWith(
|
|
15952
|
+
const own4 = `"${family}", `;
|
|
15953
|
+
const tail = stack.startsWith(own4) ? stack.slice(own4.length) : stack;
|
|
15881
15954
|
return tail.split(",")[0].trim().replace(/^"(.*)"$/, "$1");
|
|
15882
15955
|
}
|
|
15883
15956
|
var init_web_fallback = __esm({
|
|
@@ -17633,9 +17706,9 @@ function isKnownCapability(id) {
|
|
|
17633
17706
|
function needsNativeBuild(id) {
|
|
17634
17707
|
const req = CAPABILITY_NATIVE[catalogKey(id)];
|
|
17635
17708
|
if (!req) return false;
|
|
17636
|
-
const
|
|
17709
|
+
const nonEmpty2 = (v2) => Array.isArray(v2) ? v2.length > 0 : v2 != null && typeof v2 === "object" ? Object.keys(v2).length > 0 : false;
|
|
17637
17710
|
const { ios, android } = req;
|
|
17638
|
-
return
|
|
17711
|
+
return nonEmpty2(ios?.usageStrings) || nonEmpty2(ios?.infoPlist) || nonEmpty2(ios?.entitlements) || nonEmpty2(ios?.spmProducts) || nonEmpty2(android?.permissions) || nonEmpty2(android?.features) || nonEmpty2(android?.services) || nonEmpty2(android?.foregroundServiceTypes) || nonEmpty2(android?.gradleDeps);
|
|
17639
17712
|
}
|
|
17640
17713
|
function capabilitiesUsedBy(bundleJs) {
|
|
17641
17714
|
const out2 = /* @__PURE__ */ new Set();
|
|
@@ -18688,15 +18761,15 @@ function renderDistCapabilitiesXml(bake, indent) {
|
|
|
18688
18761
|
`${indent}<meta-data android:name="${ANDROID_DIST_CAPABILITIES_META}" android:value="${bake.added.join(",")}" />`
|
|
18689
18762
|
];
|
|
18690
18763
|
}
|
|
18691
|
-
function resolveDistBake(app,
|
|
18692
|
-
const ownSet = new Set(
|
|
18764
|
+
function resolveDistBake(app, own4, extra) {
|
|
18765
|
+
const ownSet = new Set(own4);
|
|
18693
18766
|
const extraKeys = [...new Set(extra.map(catalogKey))].filter((id) => !ownSet.has(id)).sort();
|
|
18694
18767
|
const refused2 = extraKeys.map((id) => [id, distAddRefusal(id)]).filter(([, r2]) => r2 !== null);
|
|
18695
18768
|
if (refused2.length) {
|
|
18696
18769
|
throw new Error(`${app}: a dist build cannot add ${refused2.map(([id, r2]) => `${id} (${r2})`).join("; ")}`);
|
|
18697
18770
|
}
|
|
18698
|
-
const build3 = buildSet([...
|
|
18699
|
-
const ownExpanded = expandCapabilities(
|
|
18771
|
+
const build3 = buildSet([...own4, ...extraKeys]);
|
|
18772
|
+
const ownExpanded = expandCapabilities(own4);
|
|
18700
18773
|
const added = [...expandCapabilities(extraKeys)].filter((id) => !ownExpanded.has(id) && distAddRefusal(id) === null).sort();
|
|
18701
18774
|
return { build: build3, added };
|
|
18702
18775
|
}
|
|
@@ -21736,8 +21809,8 @@ function rewriteNav(nav, removed, homeId) {
|
|
|
21736
21809
|
return p2;
|
|
21737
21810
|
};
|
|
21738
21811
|
const tabFor = (screenId) => {
|
|
21739
|
-
const
|
|
21740
|
-
return typeof
|
|
21812
|
+
const own4 = remainingRoots.find((t2) => t2.screenId === screenId);
|
|
21813
|
+
return typeof own4?.id === "string" ? own4.id : void 0;
|
|
21741
21814
|
};
|
|
21742
21815
|
const homeTab = tabFor(homeId) ?? (typeof remainingRoots[0]?.id === "string" ? remainingRoots[0].id : "");
|
|
21743
21816
|
const finalTab = /* @__PURE__ */ new Map();
|
|
@@ -21872,8 +21945,8 @@ function planTrim(src, keepIds, links) {
|
|
|
21872
21945
|
if (!linksOf(r2).some((l2) => removedTarget(l2.to))) continue;
|
|
21873
21946
|
const block = structuredClone(r2.block);
|
|
21874
21947
|
const isDead = (entry) => {
|
|
21875
|
-
const
|
|
21876
|
-
const to2 =
|
|
21948
|
+
const own4 = tapTarget(entry);
|
|
21949
|
+
const to2 = own4 && removedTarget(own4) ? own4 : rowTemplateTarget(entry, removedTarget);
|
|
21877
21950
|
if (!to2) return false;
|
|
21878
21951
|
dropped.push({ screen: r2.label, node: entryLabel(entry), to: to2 });
|
|
21879
21952
|
return true;
|
|
@@ -24065,12 +24138,12 @@ function clampRule(rule, denyPrefixes, maxTTL) {
|
|
|
24065
24138
|
ttl: Math.min(rule.ttl, maxTTL)
|
|
24066
24139
|
};
|
|
24067
24140
|
}
|
|
24068
|
-
function shadows(
|
|
24069
|
-
const methodCovers =
|
|
24070
|
-
return methodCovers && dflt.pathPrefix.startsWith(
|
|
24141
|
+
function shadows(own4, dflt) {
|
|
24142
|
+
const methodCovers = own4.method === null || own4.method.toUpperCase() === (dflt.method ?? "").toUpperCase();
|
|
24143
|
+
return methodCovers && dflt.pathPrefix.startsWith(own4.pathPrefix);
|
|
24071
24144
|
}
|
|
24072
24145
|
function resolveWixCachePolicy(appName2, declared) {
|
|
24073
|
-
const
|
|
24146
|
+
const own4 = (declared?.rules ?? []).map((r2) => ({
|
|
24074
24147
|
method: r2.method ?? null,
|
|
24075
24148
|
pathPrefix: r2.pathPrefix,
|
|
24076
24149
|
cacheable: r2.cacheable,
|
|
@@ -24079,7 +24152,7 @@ function resolveWixCachePolicy(appName2, declared) {
|
|
|
24079
24152
|
tag: r2.tag ?? null
|
|
24080
24153
|
}));
|
|
24081
24154
|
const legacy = CACHE_OVERRIDES[appName2] ?? [];
|
|
24082
|
-
const appLevel = [...
|
|
24155
|
+
const appLevel = [...own4, ...legacy];
|
|
24083
24156
|
const defaults = declared?.platformDefaults === false ? [] : PLATFORM_DEFAULT_WIX_CACHE_RULES.filter((d2) => !appLevel.some((a2) => shadows(a2, d2)));
|
|
24084
24157
|
const denies = [
|
|
24085
24158
|
...[...PLATFORM_DENY_PREFIXES, ...PERSONAL_DATA_PREFIXES].map((pathPrefix) => ({ method: null, pathPrefix, cacheable: false, ttl: 0, swr: 0, tag: null })),
|
|
@@ -28785,8 +28858,8 @@ var init_src4 = __esm({
|
|
|
28785
28858
|
// ../../core/dev-server/src/descriptor-postprocess.ts
|
|
28786
28859
|
function applyTopBarDefault(descriptor, config) {
|
|
28787
28860
|
const fallback = config?.navigation?.topBarDefault;
|
|
28788
|
-
const
|
|
28789
|
-
if (!fallback ||
|
|
28861
|
+
const own4 = descriptor?.topBar;
|
|
28862
|
+
if (!fallback || own4) return descriptor;
|
|
28790
28863
|
return { ...descriptor, topBar: fallback };
|
|
28791
28864
|
}
|
|
28792
28865
|
function attachAssignments(descriptor, definitions2, ctx, overrides) {
|
|
@@ -31381,13 +31454,13 @@ function parsePaddingShorthand(v2) {
|
|
|
31381
31454
|
}
|
|
31382
31455
|
function addIntrinsicPadding(style, modPad) {
|
|
31383
31456
|
if (!style) return void 0;
|
|
31384
|
-
const
|
|
31385
|
-
if (!
|
|
31457
|
+
const own4 = parsePaddingShorthand(style.padding);
|
|
31458
|
+
if (!own4) return void 0;
|
|
31386
31459
|
const sides = [
|
|
31387
|
-
["paddingTop",
|
|
31388
|
-
["paddingBottom",
|
|
31389
|
-
["paddingLeft",
|
|
31390
|
-
["paddingRight",
|
|
31460
|
+
["paddingTop", own4.top],
|
|
31461
|
+
["paddingBottom", own4.bottom],
|
|
31462
|
+
["paddingLeft", own4.left],
|
|
31463
|
+
["paddingRight", own4.right]
|
|
31391
31464
|
];
|
|
31392
31465
|
let out2;
|
|
31393
31466
|
for (const [key2, ownPx] of sides) {
|
|
@@ -32967,8 +33040,8 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
32967
33040
|
const root = { position: "relative", display: "flex", flexDirection: "column", width: "100%", ...fill ? { flex: "1 1 auto" } : {}, minHeight, ...wrap };
|
|
32968
33041
|
if (!live3) {
|
|
32969
33042
|
const { paddingTop: _t2, paddingBottom: _b, paddingLeft: _l2, paddingRight: _r2, ...rootNoSides } = root;
|
|
32970
|
-
const
|
|
32971
|
-
return /* @__PURE__ */ jsx4("div", { ...dom, style: addIntrinsicPadding(
|
|
33043
|
+
const own4 = { ...rootNoSides, border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 8, padding: 12, boxSizing: "border-box" };
|
|
33044
|
+
return /* @__PURE__ */ jsx4("div", { ...dom, style: addIntrinsicPadding(own4, wrap) ?? own4, children: /* @__PURE__ */ jsx4("span", { style: { color: C2("textSecondary", "#636B78") }, children: placeholder2 || "Rich text editor" }) });
|
|
32972
33045
|
}
|
|
32973
33046
|
if (status === "unavailable") {
|
|
32974
33047
|
return /* @__PURE__ */ jsx4("div", { ...dom, style: root, children: /* @__PURE__ */ jsx4("div", { "data-component-id": `${id}/fallback`, children: props.fallback ? renderChild(props.fallback) : /* @__PURE__ */ jsx4("p", { style: { margin: 0, color: C2("textSecondary", "#636B78") }, children: "Editor unavailable" }) }) });
|
|
@@ -33810,8 +33883,8 @@ function pushModalLayer(el2, opts = {}) {
|
|
|
33810
33883
|
sync();
|
|
33811
33884
|
return {
|
|
33812
33885
|
isTop: () => {
|
|
33813
|
-
const
|
|
33814
|
-
return
|
|
33886
|
+
const own4 = layer.el();
|
|
33887
|
+
return own4 != null && own4.isConnected && topLayerOver(own4) === layer;
|
|
33815
33888
|
},
|
|
33816
33889
|
release: () => {
|
|
33817
33890
|
const i2 = layers.indexOf(layer);
|
|
@@ -116369,18 +116442,18 @@ function editA11yParts(node, edit) {
|
|
|
116369
116442
|
return changed ? out2 : node;
|
|
116370
116443
|
}
|
|
116371
116444
|
if (!React8.isValidElement(node) || typeof node.type !== "string") return node;
|
|
116372
|
-
const
|
|
116373
|
-
if (
|
|
116374
|
-
const part =
|
|
116375
|
-
const kids3 =
|
|
116445
|
+
const own4 = node.props;
|
|
116446
|
+
if (own4["data-component-id"] != null) return node;
|
|
116447
|
+
const part = own4[A11Y_PART];
|
|
116448
|
+
const kids3 = own4.children;
|
|
116376
116449
|
const nextKids = kids3 == null ? kids3 : editA11yParts(kids3, edit);
|
|
116377
116450
|
if (typeof part !== "string" && nextKids === kids3) return node;
|
|
116378
|
-
return cloneWithKids(node, typeof part === "string" ? { ...edit(part,
|
|
116451
|
+
return cloneWithKids(node, typeof part === "string" ? { ...edit(part, own4), [A11Y_PART]: void 0 } : {}, nextKids);
|
|
116379
116452
|
}
|
|
116380
116453
|
function a11yPartEdit(routed, authoredName, onNode, focus) {
|
|
116381
|
-
return (part,
|
|
116454
|
+
return (part, own4) => {
|
|
116382
116455
|
if (part === "derived-name") return authoredName ? {} : { "aria-hidden": "true" };
|
|
116383
|
-
const focusable = typeof
|
|
116456
|
+
const focusable = typeof own4.tabIndex === "number" && own4.tabIndex >= 0;
|
|
116384
116457
|
if (part === "focus") {
|
|
116385
116458
|
if (!focus || !focusable) return {};
|
|
116386
116459
|
focus.onRouted();
|
|
@@ -116393,10 +116466,10 @@ function a11yPartEdit(routed, authoredName, onNode, focus) {
|
|
|
116393
116466
|
Object.assign(patch, focus.carried);
|
|
116394
116467
|
focus.onRouted();
|
|
116395
116468
|
}
|
|
116396
|
-
if (typeof routed["aria-describedby"] === "string" && typeof
|
|
116397
|
-
patch["aria-describedby"] = `${
|
|
116469
|
+
if (typeof routed["aria-describedby"] === "string" && typeof own4["aria-describedby"] === "string") {
|
|
116470
|
+
patch["aria-describedby"] = `${own4["aria-describedby"]} ${routed["aria-describedby"]}`;
|
|
116398
116471
|
}
|
|
116399
|
-
if ("role" in routed && routed.role !==
|
|
116472
|
+
if ("role" in routed && routed.role !== own4.role) {
|
|
116400
116473
|
if (!(typeof routed.role === "string" && RANGE_ROLES.has(routed.role))) {
|
|
116401
116474
|
patch["aria-valuenow"] = void 0;
|
|
116402
116475
|
patch["aria-valuemin"] = void 0;
|
|
@@ -116448,8 +116521,8 @@ function nameFromOwnContent(root) {
|
|
|
116448
116521
|
const t2 = child.textContent?.trim();
|
|
116449
116522
|
if (t2) parts.push(t2);
|
|
116450
116523
|
} else if (child.nodeType === 1 && !child.matches(NAME_SKIP_SELECTOR)) {
|
|
116451
|
-
const
|
|
116452
|
-
if (
|
|
116524
|
+
const own4 = child.getAttribute("aria-label")?.trim() || (child.tagName === "IMG" ? child.getAttribute("alt")?.trim() : void 0);
|
|
116525
|
+
if (own4) parts.push(own4);
|
|
116453
116526
|
else walk2(child);
|
|
116454
116527
|
}
|
|
116455
116528
|
}
|
|
@@ -118276,6 +118349,7 @@ var init_renderNode = __esm({
|
|
|
118276
118349
|
init_helpers();
|
|
118277
118350
|
init_bindings2();
|
|
118278
118351
|
init_bindings();
|
|
118352
|
+
init_tokens();
|
|
118279
118353
|
init_message_format();
|
|
118280
118354
|
init_validation();
|
|
118281
118355
|
init_formBag();
|
|
@@ -120402,22 +120476,30 @@ var init_renderNode = __esm({
|
|
|
120402
120476
|
const buttonStyle = props.style ?? "primary";
|
|
120403
120477
|
const destructive = buttonStyle === "destructive";
|
|
120404
120478
|
const primary = buttonStyle === "primary" || destructive;
|
|
120405
|
-
const
|
|
120406
|
-
const
|
|
120479
|
+
const bt2 = resolveButtonTokens(ctx.tokens, props.size, buttonStyle);
|
|
120480
|
+
const borderWidth = bt2.borderWidth ?? (buttonStyle === "secondary" ? 1 : 0);
|
|
120481
|
+
const outlined = borderWidth > 0;
|
|
120482
|
+
const builtInFill = !primary ? "transparent" : destructive ? C2("danger", "#E62214") : C2("accentPrimary", "#116DFF");
|
|
120483
|
+
const accent = bt2.fill != null ? C2(bt2.fill, builtInFill) : builtInFill;
|
|
120484
|
+
const filled = primary || bt2.fill != null;
|
|
120407
120485
|
const boundDisabled = useResolvedScalar(props.disabledPath, ctx);
|
|
120408
120486
|
const disabled = props.disabled === true || props.loading === true || hiddenBool(boundDisabled);
|
|
120409
120487
|
const onClick = ctx.onAction && props.action && !disabled ? (e2) => {
|
|
120410
120488
|
e2?.stopPropagation?.();
|
|
120411
120489
|
ctx.onAction(resolveItemDeep2(props.action, ctx));
|
|
120412
120490
|
} : void 0;
|
|
120413
|
-
const
|
|
120414
|
-
const
|
|
120415
|
-
const
|
|
120491
|
+
const builtInFg = primary ? C2("textOnAccent", "#fff") : accentTextColor(ctx);
|
|
120492
|
+
const fg = bt2.label != null ? C2(bt2.label, builtInFg) : builtInFg;
|
|
120493
|
+
const outlineColor = bt2.border != null ? C2(bt2.border, fg) : fg;
|
|
120494
|
+
const pillRadius = props.cornerRadius != null ? props.cornerRadius : bt2.radius ?? ctx.radius("pill", 24);
|
|
120495
|
+
const vPad = props.iconOnly ? 11 : bt2.paddingV ?? (props.size === "sm" ? 8 : props.size === "lg" ? 16 : 13);
|
|
120416
120496
|
const hPadBase = props.iconOnly ? 11 : props.size === "sm" ? 13 : props.size === "lg" ? 22 : 16;
|
|
120417
|
-
const hPad = props.iconOnly ? 11 : Math.min(Math.max(hPadBase, pillRadius), vPad + 8);
|
|
120497
|
+
const hPad = props.iconOnly ? 11 : bt2.paddingH ?? Math.min(Math.max(hPadBase, pillRadius), vPad + 8);
|
|
120418
120498
|
const pad3 = `${vPad}px ${hPad}px`;
|
|
120419
|
-
const f2 = ctx.font("bodyEmphasis");
|
|
120420
|
-
const glyph = props.size === "sm" ? 14 : props.size === "lg" ? 18 : 16;
|
|
120499
|
+
const f2 = ctx.font(bt2.text ?? "bodyEmphasis");
|
|
120500
|
+
const glyph = bt2.icon ?? (props.size === "sm" ? 14 : props.size === "lg" ? 18 : 16);
|
|
120501
|
+
const visibleMin = props.iconOnly ? 44 : props.minHeight ?? bt2.height ?? 44;
|
|
120502
|
+
const slop = props.iconOnly ? 0 : buttonHitSlop(Math.max(visibleMin, 2 * vPad + Math.max(f2.size * (f2.line ?? 1.25), glyph)));
|
|
120421
120503
|
const ic = (name) => /* @__PURE__ */ jsx9("span", { style: { display: "inline-grid", placeItems: "center", width: glyph, height: glyph }, children: iconSvg(name, { size: glyph, color: fg }) });
|
|
120422
120504
|
const iconLabel = typeof resolvedLeadingIcon === "string" && resolvedLeadingIcon ? resolvedLeadingIcon.replace(/[_-]+/g, " ").replace(/\b\w/g, (c2) => c2.toUpperCase()) : "";
|
|
120423
120505
|
const hasTitle = typeof resolvedTitle === "string" && resolvedTitle.length > 0 || typeof resolvedTitle === "number";
|
|
@@ -120467,19 +120549,24 @@ var init_renderNode = __esm({
|
|
|
120467
120549
|
width: props.fullWidth ? "100%" : void 0,
|
|
120468
120550
|
flex: rowStretch ? "1 1 0" : void 0,
|
|
120469
120551
|
minWidth: props.iconOnly ? 44 : props.fullWidth ? void 0 : 64,
|
|
120470
|
-
minHeight:
|
|
120552
|
+
minHeight: visibleMin + 2 * slop,
|
|
120471
120553
|
...props.iconOnly ? {} : { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" },
|
|
120472
120554
|
alignItems: "center",
|
|
120473
120555
|
justifyContent: "center",
|
|
120474
120556
|
gap: 8,
|
|
120475
120557
|
padding: pad3,
|
|
120476
|
-
|
|
120558
|
+
// With a hit band the outer box is `slop` taller at each end; an elliptical radius keeps
|
|
120559
|
+
// the VISIBLE (padding-box) corner at `pillRadius`.
|
|
120560
|
+
borderRadius: props.iconOnly ? "50%" : slop > 0 ? `${pillRadius}px / ${pillRadius + slop}px` : pillRadius,
|
|
120477
120561
|
fontFamily: fontStack(f2.family, ctx.idiom),
|
|
120478
120562
|
fontWeight: f2.weight,
|
|
120479
120563
|
fontSize: f2.remSize,
|
|
120480
|
-
|
|
120564
|
+
// An authored `text` token paints its own line height too — the one the hit area estimates with.
|
|
120565
|
+
...bt2.text != null && f2.line != null ? { lineHeight: f2.line } : {},
|
|
120566
|
+
...bt2.text != null && f2.letterSpacing != null ? { letterSpacing: f2.letterSpacing } : {},
|
|
120567
|
+
background: filled ? accent : "transparent",
|
|
120481
120568
|
color: fg,
|
|
120482
|
-
border: outlined ? `
|
|
120569
|
+
...slop > 0 ? { border: "none", borderTop: `${slop}px solid transparent`, borderBottom: `${slop}px solid transparent`, backgroundClip: "padding-box", marginTop: -slop, marginBottom: -slop, ...outlined ? { boxShadow: `inset 0 0 0 ${borderWidth}px ${outlineColor}` } : {} } : { border: outlined ? `${borderWidth}px solid ${outlineColor}` : "none" },
|
|
120483
120570
|
cursor: disabled ? "default" : "pointer",
|
|
120484
120571
|
opacity: disabled ? 0.55 : 1,
|
|
120485
120572
|
boxSizing: "border-box",
|
|
@@ -122304,10 +122391,10 @@ var init_renderNode = __esm({
|
|
|
122304
122391
|
focusRoots = /* @__PURE__ */ new WeakMap();
|
|
122305
122392
|
A11yHintDescription = ({ hint, idBase, children, ...forwarded }) => {
|
|
122306
122393
|
const descId = `${idBase ?? "hm"}__hint${React8.useId()}`;
|
|
122307
|
-
const
|
|
122394
|
+
const own4 = children.props;
|
|
122308
122395
|
const next = { ...forwarded };
|
|
122309
|
-
if (forwarded.style) next.style = { ...
|
|
122310
|
-
next["aria-describedby"] = [
|
|
122396
|
+
if (forwarded.style) next.style = { ...own4.style ?? {}, ...forwarded.style };
|
|
122397
|
+
next["aria-describedby"] = [own4["aria-describedby"], descId].filter(Boolean).join(" ");
|
|
122311
122398
|
return /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
122312
122399
|
React8.cloneElement(children, next),
|
|
122313
122400
|
/* @__PURE__ */ jsx9("span", { id: descId, hidden: true, "data-hm-a11y-hint": "", children: hint })
|
|
@@ -141584,15 +141671,15 @@ function assembleLedger(r2, options = {}) {
|
|
|
141584
141671
|
remedy: SOURCEMAP_REMEDY[c2.sourcemap]
|
|
141585
141672
|
});
|
|
141586
141673
|
}
|
|
141587
|
-
const
|
|
141588
|
-
if (!
|
|
141589
|
-
const named =
|
|
141590
|
-
const more =
|
|
141674
|
+
const own4 = (c2.uncoveredFunctions ?? []).filter((f2) => f2.source?.startsWith("tier5-src/") || f2.source?.startsWith("core/dev-server/tier5-bundles-src/"));
|
|
141675
|
+
if (!own4.length) continue;
|
|
141676
|
+
const named = own4.slice(0, 6).map((f2) => `${f2.name} (${f2.source})`).join(", ");
|
|
141677
|
+
const more = own4.length > 6 ? ` +${own4.length - 6} more` : "";
|
|
141591
141678
|
out2.push({
|
|
141592
141679
|
key: `code-uncovered|${c2.screen}`,
|
|
141593
141680
|
kind: "code-uncovered",
|
|
141594
141681
|
screen: c2.screen,
|
|
141595
|
-
gap: `${
|
|
141682
|
+
gap: `${own4.length} worker function${own4.length === 1 ? "" : "s"} never executed on any axis: ${named}${more}`,
|
|
141596
141683
|
remedy: "usually an error/edge branch \u2014 give the crawl data that reaches it (a net-mocks rule, cms seed rows, or a nav edge with the right input), or verify the path on a preview"
|
|
141597
141684
|
});
|
|
141598
141685
|
}
|
|
@@ -143652,23 +143739,23 @@ var init_preview_assets_generated = __esm({
|
|
|
143652
143739
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
143653
143740
|
init_preview_assets_format();
|
|
143654
143741
|
PREVIEW_ASSET_MANIFEST = [
|
|
143655
|
-
{ key: "assets/index-
|
|
143656
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset:
|
|
143657
|
-
{ key: "assets/pdfDocument-
|
|
143658
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
143659
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
143660
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
143661
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
143662
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
143663
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
143664
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
143665
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
143666
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
143667
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
143668
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
143669
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
143670
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
143671
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
143742
|
+
{ key: "assets/index-CPLD_SKV.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1193794, sha256: "4b6a6e4c6cc9a5bbb9683436c0569281ecc1b23885c6684f42b8e50de02d7d1c" },
|
|
143743
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset: 1193802, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
143744
|
+
{ key: "assets/pdfDocument-DLmlpdLS.js", contentType: "application/javascript; charset=utf-8", offset: 2510836, length: 489166, sha256: "c583b748cbc814a27789ca1bcc8fd812a3c7a9cbc9428fea612f3d321d357fa9" },
|
|
143745
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3000002, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
143746
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3004612, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
143747
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3493196, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
143748
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3584120, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
143749
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3675104, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
143750
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3766084, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
143751
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3856956, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
143752
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3947936, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
143753
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4056572, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
143754
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4165656, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
143755
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4274704, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
143756
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4382404, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
143757
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4470512, length: 4947, sha256: "58e2242ae4a75ea666a13847f575df0455bbc0928a080c861804294ecb72f83f" },
|
|
143758
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4475459, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
143672
143759
|
];
|
|
143673
143760
|
}
|
|
143674
143761
|
});
|
|
@@ -144115,6 +144202,138 @@ var init_git = __esm({
|
|
|
144115
144202
|
}
|
|
144116
144203
|
});
|
|
144117
144204
|
|
|
144205
|
+
// ../store-release/version.ts
|
|
144206
|
+
var version_exports = {};
|
|
144207
|
+
__export(version_exports, {
|
|
144208
|
+
bumpVersion: () => bumpVersion,
|
|
144209
|
+
readAndroidVersion: () => readAndroidVersion,
|
|
144210
|
+
readAndroidVersionName: () => readAndroidVersionName,
|
|
144211
|
+
readIosMarketingVersion: () => readIosMarketingVersion,
|
|
144212
|
+
readIosVersion: () => readIosVersion,
|
|
144213
|
+
readIosVersionStrings: () => readIosVersionStrings,
|
|
144214
|
+
setAndroidVersion: () => setAndroidVersion,
|
|
144215
|
+
setIosVersion: () => setIosVersion,
|
|
144216
|
+
stampIosVersionStrings: () => stampIosVersionStrings
|
|
144217
|
+
});
|
|
144218
|
+
import { readFileSync as readFileSync76, writeFileSync as writeFileSync26 } from "node:fs";
|
|
144219
|
+
function readIosVersion(projectYml) {
|
|
144220
|
+
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144221
|
+
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
144222
|
+
if (marketing === null || build3 === null) {
|
|
144223
|
+
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
144224
|
+
}
|
|
144225
|
+
return { marketing, build: Number(build3) };
|
|
144226
|
+
}
|
|
144227
|
+
function setIosVersion(projectYml, v2) {
|
|
144228
|
+
let out2 = replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing);
|
|
144229
|
+
out2 = replaceScalar(out2, "CFBundleVersion", String(v2.build));
|
|
144230
|
+
out2 = out2.replace(
|
|
144231
|
+
/(^[ \t]*# >>> himalaya:live-activity:target[^\n]*\n)([\s\S]*?)(^[ \t]*# <<< himalaya:live-activity:target[^\n]*$)/m,
|
|
144232
|
+
(_match, start, body, end) => {
|
|
144233
|
+
if (!body.trim()) return start + body + end;
|
|
144234
|
+
return start + replaceScalar(replaceScalar(body, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", String(v2.build)) + end;
|
|
144235
|
+
}
|
|
144236
|
+
);
|
|
144237
|
+
return out2;
|
|
144238
|
+
}
|
|
144239
|
+
function readIosVersionStrings(projectYml) {
|
|
144240
|
+
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144241
|
+
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
144242
|
+
if (marketing === null || build3 === null) {
|
|
144243
|
+
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
144244
|
+
}
|
|
144245
|
+
return { marketing, build: build3 };
|
|
144246
|
+
}
|
|
144247
|
+
function stampIosVersionStrings(projectYml, v2) {
|
|
144248
|
+
return replaceScalar(replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", v2.build);
|
|
144249
|
+
}
|
|
144250
|
+
function readIosMarketingVersion(projectYml) {
|
|
144251
|
+
return matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144252
|
+
}
|
|
144253
|
+
function scalarRe(key2) {
|
|
144254
|
+
return new RegExp(`^(\\s*${key2}:\\s*)("?)([^"\\n#]*?)("?)(\\s*(?:#.*)?)$`, "m");
|
|
144255
|
+
}
|
|
144256
|
+
function matchScalar(content, key2) {
|
|
144257
|
+
const m2 = scalarRe(key2).exec(content);
|
|
144258
|
+
return m2 ? m2[3].trim() : null;
|
|
144259
|
+
}
|
|
144260
|
+
function replaceScalar(content, key2, value) {
|
|
144261
|
+
const re2 = scalarRe(key2);
|
|
144262
|
+
if (!re2.test(content)) throw new Error(`could not locate \`${key2}:\` in project.yml`);
|
|
144263
|
+
return content.replace(re2, (_full, pre, openQ, _oldVal, _closeQ, tail) => {
|
|
144264
|
+
const q2 = openQ ? '"' : "";
|
|
144265
|
+
return `${pre}${q2}${value}${q2}${tail}`;
|
|
144266
|
+
});
|
|
144267
|
+
}
|
|
144268
|
+
function readAndroidVersion(gradle) {
|
|
144269
|
+
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
144270
|
+
const code = /(\bversionCode\s*=\s*)(\d+)/.exec(gradle);
|
|
144271
|
+
if (!name || !code) throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
144272
|
+
return { marketing: name[2], build: Number(code[2]) };
|
|
144273
|
+
}
|
|
144274
|
+
function readAndroidVersionName(gradle) {
|
|
144275
|
+
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
144276
|
+
return name ? name[2] : null;
|
|
144277
|
+
}
|
|
144278
|
+
function setAndroidVersion(gradle, v2) {
|
|
144279
|
+
if (!/\bversionName\s*=\s*"/.test(gradle) || !/\bversionCode\s*=\s*\d+/.test(gradle)) {
|
|
144280
|
+
throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
144281
|
+
}
|
|
144282
|
+
return gradle.replace(/(\bversionName\s*=\s*")[^"]*(")/, `$1${v2.marketing}$2`).replace(/(\bversionCode\s*=\s*)\d+/, `$1${v2.build}`);
|
|
144283
|
+
}
|
|
144284
|
+
function bumpVersion(app, opts) {
|
|
144285
|
+
const iosPath = iosProjectYml(app);
|
|
144286
|
+
const gradlePath = androidGradle(app);
|
|
144287
|
+
const iosYml = readFileSync76(iosPath, "utf8");
|
|
144288
|
+
const gradle = readFileSync76(gradlePath, "utf8");
|
|
144289
|
+
const current = readIosVersion(iosYml);
|
|
144290
|
+
const next = {
|
|
144291
|
+
marketing: opts.marketing ?? current.marketing,
|
|
144292
|
+
build: opts.build === "increment" || opts.build === void 0 ? current.build + (opts.build === "increment" ? 1 : 0) : opts.build
|
|
144293
|
+
};
|
|
144294
|
+
writeFileSync26(iosPath, setIosVersion(iosYml, next));
|
|
144295
|
+
writeFileSync26(gradlePath, setAndroidVersion(gradle, next));
|
|
144296
|
+
return next;
|
|
144297
|
+
}
|
|
144298
|
+
var init_version = __esm({
|
|
144299
|
+
"../store-release/version.ts"() {
|
|
144300
|
+
init_paths2();
|
|
144301
|
+
}
|
|
144302
|
+
});
|
|
144303
|
+
|
|
144304
|
+
// ../store-release/store-spec.ts
|
|
144305
|
+
function detectBundleId(projectYml) {
|
|
144306
|
+
const m2 = /^\s*bundleId:\s*(\S+)\s*$/m.exec(projectYml);
|
|
144307
|
+
if (!m2) throw new Error("project.yml has no `bundleId:` on the application target");
|
|
144308
|
+
return m2[1];
|
|
144309
|
+
}
|
|
144310
|
+
function defaultProdBundleId(devBundleId) {
|
|
144311
|
+
return devBundleId.replace(/\.dev$/, "");
|
|
144312
|
+
}
|
|
144313
|
+
function referencedWatchProject(projectYml) {
|
|
144314
|
+
if (!/^projectReferences:/m.test(projectYml)) return void 0;
|
|
144315
|
+
const m2 = /^projectReferences:\n {2}Watch:\n {4}path:\s*\.\.\/watchos\/(\S+)\.xcodeproj\s*$/m.exec(projectYml);
|
|
144316
|
+
if (!m2) {
|
|
144317
|
+
throw new Error(
|
|
144318
|
+
"store-spec: this iOS project references an xcodegen project other than the generated companion watch app (`projectReferences: Watch: path: ../watchos/<Name>.xcodeproj`) \u2014 only that one is supported"
|
|
144319
|
+
);
|
|
144320
|
+
}
|
|
144321
|
+
return { name: m2[1] };
|
|
144322
|
+
}
|
|
144323
|
+
function storeWatchBundleId(prodIosBundleId) {
|
|
144324
|
+
return `${prodIosBundleId}.watchkitapp`;
|
|
144325
|
+
}
|
|
144326
|
+
function storeSigningBundleIds(projectYml, toBundleId) {
|
|
144327
|
+
const prod = toBundleId ?? defaultProdBundleId(detectBundleId(projectYml));
|
|
144328
|
+
return referencedWatchProject(projectYml) ? [prod, storeWatchBundleId(prod)] : [prod];
|
|
144329
|
+
}
|
|
144330
|
+
var init_store_spec = __esm({
|
|
144331
|
+
"../store-release/store-spec.ts"() {
|
|
144332
|
+
init_paths2();
|
|
144333
|
+
init_version();
|
|
144334
|
+
}
|
|
144335
|
+
});
|
|
144336
|
+
|
|
144118
144337
|
// ../store-release/preflight.ts
|
|
144119
144338
|
var preflight_exports = {};
|
|
144120
144339
|
__export(preflight_exports, {
|
|
@@ -144124,7 +144343,7 @@ __export(preflight_exports, {
|
|
|
144124
144343
|
parseStoreConfig: () => parseStoreConfig,
|
|
144125
144344
|
requireEnv: () => requireEnv
|
|
144126
144345
|
});
|
|
144127
|
-
import { existsSync as existsSync65, readFileSync as
|
|
144346
|
+
import { existsSync as existsSync65, readFileSync as readFileSync77 } from "node:fs";
|
|
144128
144347
|
import { isAbsolute as isAbsolute6, relative as relative13, resolve as resolve50 } from "node:path";
|
|
144129
144348
|
function isInsideRepo(p2) {
|
|
144130
144349
|
const rel = relative13(REPO_ROOT3, resolve50(p2));
|
|
@@ -144184,7 +144403,7 @@ function loadStoreConfig(app) {
|
|
|
144184
144403
|
if (!existsSync65(p2)) {
|
|
144185
144404
|
throw new Error(`No store config at ${p2}. Create apps/${app}/store/store.config.yaml first (see /setup-store-signing).`);
|
|
144186
144405
|
}
|
|
144187
|
-
return parseStoreConfig(
|
|
144406
|
+
return parseStoreConfig(readFileSync77(p2, "utf8"));
|
|
144188
144407
|
}
|
|
144189
144408
|
var init_preflight = __esm({
|
|
144190
144409
|
"../store-release/preflight.ts"() {
|
|
@@ -144193,7 +144412,7 @@ var init_preflight = __esm({
|
|
|
144193
144412
|
});
|
|
144194
144413
|
|
|
144195
144414
|
// ../store-release/register-bundle.ts
|
|
144196
|
-
import { readFileSync as
|
|
144415
|
+
import { readFileSync as readFileSync78 } from "node:fs";
|
|
144197
144416
|
import { createPrivateKey as createPrivateKey2, sign } from "node:crypto";
|
|
144198
144417
|
function b64url2(b2) {
|
|
144199
144418
|
return Buffer.from(b2).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
@@ -144211,7 +144430,7 @@ function bundleIdBody(identifier, name, platform = "IOS") {
|
|
|
144211
144430
|
async function registerBundleId(opts) {
|
|
144212
144431
|
const env = requireEnv(["ASC_KEY_ID", "ASC_ISSUER_ID", "ASC_KEY_PATH"]);
|
|
144213
144432
|
assertCredentialOutsideRepo("ASC_KEY_PATH", env.ASC_KEY_PATH);
|
|
144214
|
-
const jwt = ascJwt(env.ASC_KEY_ID, env.ASC_ISSUER_ID,
|
|
144433
|
+
const jwt = ascJwt(env.ASC_KEY_ID, env.ASC_ISSUER_ID, readFileSync78(env.ASC_KEY_PATH, "utf8"), Math.floor(Date.now() / 1e3));
|
|
144215
144434
|
const res = await fetch(`${ASC_API}/v1/bundleIds`, {
|
|
144216
144435
|
method: "POST",
|
|
144217
144436
|
headers: { Authorization: `Bearer ${jwt}`, "Content-Type": "application/json" },
|
|
@@ -144241,13 +144460,16 @@ async function main() {
|
|
|
144241
144460
|
}
|
|
144242
144461
|
const ni2 = rest.indexOf("--name");
|
|
144243
144462
|
const name = ni2 >= 0 ? rest[ni2 + 1] : cfg.app ?? app;
|
|
144244
|
-
const
|
|
144245
|
-
|
|
144463
|
+
for (const id of storeSigningBundleIds(readFileSync78(iosProjectYml(app), "utf8"), identifier)) {
|
|
144464
|
+
const r2 = await registerBundleId({ identifier: id, name: id === identifier ? name : `${name} Watch` });
|
|
144465
|
+
console.log(`bundle id ${id}: ${r2.status}${r2.id ? ` (${r2.id})` : ""}`);
|
|
144466
|
+
}
|
|
144246
144467
|
}
|
|
144247
144468
|
var ASC_API;
|
|
144248
144469
|
var init_register_bundle = __esm({
|
|
144249
144470
|
"../store-release/register-bundle.ts"() {
|
|
144250
144471
|
init_paths2();
|
|
144472
|
+
init_store_spec();
|
|
144251
144473
|
init_preflight();
|
|
144252
144474
|
ASC_API = "https://api.appstoreconnect.apple.com";
|
|
144253
144475
|
if (runningAsScript("store-release/register-bundle.ts")) {
|
|
@@ -145643,7 +145865,7 @@ __export(credential_profile_exports, {
|
|
|
145643
145865
|
profilePath: () => profilePath,
|
|
145644
145866
|
resolveStoreCredentials: () => resolveStoreCredentials
|
|
145645
145867
|
});
|
|
145646
|
-
import { existsSync as existsSync66, readFileSync as
|
|
145868
|
+
import { existsSync as existsSync66, readFileSync as readFileSync79 } from "node:fs";
|
|
145647
145869
|
import { homedir as homedir5 } from "node:os";
|
|
145648
145870
|
import { join as join66 } from "node:path";
|
|
145649
145871
|
function credentialsDir(home = homedir5()) {
|
|
@@ -145686,7 +145908,7 @@ function resolveStoreCredentials(opts) {
|
|
|
145686
145908
|
const { app, cfg } = opts;
|
|
145687
145909
|
const env = opts.env ?? process.env;
|
|
145688
145910
|
const home = opts.home ?? homedir5();
|
|
145689
|
-
const read = opts.readProfile ?? ((p2) =>
|
|
145911
|
+
const read = opts.readProfile ?? ((p2) => readFileSync79(p2, "utf8"));
|
|
145690
145912
|
const exists = opts.profileExists ?? existsSync66;
|
|
145691
145913
|
const ios = cfg.ios ?? {};
|
|
145692
145914
|
const flagName = opts.profileFlag?.trim();
|
|
@@ -145753,7 +145975,7 @@ var init_credential_profile = __esm({
|
|
|
145753
145975
|
|
|
145754
145976
|
// ../store-release/iap-credentials.ts
|
|
145755
145977
|
import { createHash as createHash32 } from "node:crypto";
|
|
145756
|
-
import { existsSync as existsSync67, readFileSync as
|
|
145978
|
+
import { existsSync as existsSync67, readFileSync as readFileSync80, realpathSync as realpathSync10 } from "node:fs";
|
|
145757
145979
|
import { homedir as homedir6 } from "node:os";
|
|
145758
145980
|
function accountFingerprint(keyId, issuerId) {
|
|
145759
145981
|
return `sha256:${createHash32("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
|
|
@@ -145787,7 +146009,7 @@ function canonicalKeyPath(path2, profile, realpath) {
|
|
|
145787
146009
|
function resolveIapCredentials(options) {
|
|
145788
146010
|
const { target } = options;
|
|
145789
146011
|
const home = options.home ?? homedir6();
|
|
145790
|
-
const readFile3 = options.readFile ?? ((p2) =>
|
|
146012
|
+
const readFile3 = options.readFile ?? ((p2) => readFileSync80(p2, "utf8"));
|
|
145791
146013
|
const realpath = options.realpath ?? realpathSync10;
|
|
145792
146014
|
const profile = requireExplicitProfile(options.profileFlag, target);
|
|
145793
146015
|
const creds = resolveStoreCredentials({
|
|
@@ -146046,8 +146268,8 @@ function scrubBook(value) {
|
|
|
146046
146268
|
}
|
|
146047
146269
|
function assertNoSecrets(serialized) {
|
|
146048
146270
|
const hits = secretFindings([{ path: "book.json", bytes: Buffer.from(serialized) }]);
|
|
146049
|
-
const
|
|
146050
|
-
if (hits.length ||
|
|
146271
|
+
const own4 = TOKEN_PATTERNS.find((re2) => new RegExp(re2.source, re2.flags.replace("g", "")).test(serialized));
|
|
146272
|
+
if (hits.length || own4) {
|
|
146051
146273
|
throw new Error(`refusing to write the app book: it still contains ${hits[0]?.reason ?? "a token-shaped string"} after redaction`);
|
|
146052
146274
|
}
|
|
146053
146275
|
}
|
|
@@ -146244,7 +146466,7 @@ __export(store_iap_exports, {
|
|
|
146244
146466
|
runStoreIap: () => runStoreIap
|
|
146245
146467
|
});
|
|
146246
146468
|
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
146247
|
-
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync32, readFileSync as
|
|
146469
|
+
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync32, readFileSync as readFileSync81, rmSync as rmSync16, writeFileSync as writeFileSync27 } from "node:fs";
|
|
146248
146470
|
import { homedir as homedir7, hostname } from "node:os";
|
|
146249
146471
|
import { join as join67 } from "node:path";
|
|
146250
146472
|
function scrubDeep(value, scrub) {
|
|
@@ -146572,7 +146794,7 @@ function fileJournal(path2) {
|
|
|
146572
146794
|
}
|
|
146573
146795
|
function readLockSummary(path2) {
|
|
146574
146796
|
try {
|
|
146575
|
-
const { pid, host, at: at2 } = JSON.parse(
|
|
146797
|
+
const { pid, host, at: at2 } = JSON.parse(readFileSync81(path2, "utf8"));
|
|
146576
146798
|
return `pid ${pid} on ${host} since ${at2}`;
|
|
146577
146799
|
} catch {
|
|
146578
146800
|
return "unreadable lock";
|
|
@@ -146582,7 +146804,7 @@ function acquireApplyLock(dir, appleAppId) {
|
|
|
146582
146804
|
const path2 = join67(dir, "apply.lock");
|
|
146583
146805
|
const stamp = JSON.stringify({ pid: process.pid, host: hostname(), at: (/* @__PURE__ */ new Date()).toISOString(), token: randomUUID5() });
|
|
146584
146806
|
try {
|
|
146585
|
-
|
|
146807
|
+
writeFileSync27(path2, stamp, { flag: "wx", mode: 384 });
|
|
146586
146808
|
} catch (e2) {
|
|
146587
146809
|
if (e2.code !== "EEXIST") throw e2;
|
|
146588
146810
|
throw new Error(
|
|
@@ -146592,7 +146814,7 @@ function acquireApplyLock(dir, appleAppId) {
|
|
|
146592
146814
|
return () => {
|
|
146593
146815
|
let current = "";
|
|
146594
146816
|
try {
|
|
146595
|
-
current =
|
|
146817
|
+
current = readFileSync81(path2, "utf8");
|
|
146596
146818
|
} catch {
|
|
146597
146819
|
return;
|
|
146598
146820
|
}
|
|
@@ -146616,7 +146838,7 @@ async function confirmOnTerminal(question) {
|
|
|
146616
146838
|
}
|
|
146617
146839
|
function defaultStoreIapDeps() {
|
|
146618
146840
|
return {
|
|
146619
|
-
readFile: (path2) =>
|
|
146841
|
+
readFile: (path2) => readFileSync81(path2, "utf8"),
|
|
146620
146842
|
writeFileAtomic,
|
|
146621
146843
|
resolveCredentials: ({ profileFlag, target }) => resolveIapCredentials({ profileFlag, target }),
|
|
146622
146844
|
createApi: (key2) => createIapApi(createAscClient({ key: key2 })),
|
|
@@ -147079,7 +147301,7 @@ __export(preflight_app_exports, {
|
|
|
147079
147301
|
preflightApp: () => preflightApp,
|
|
147080
147302
|
profileAccount: () => profileAccount
|
|
147081
147303
|
});
|
|
147082
|
-
import { readFileSync as
|
|
147304
|
+
import { readFileSync as readFileSync82, existsSync as existsSync68, readdirSync as readdirSync31, statSync as statSync18 } from "node:fs";
|
|
147083
147305
|
import { createHash as createHash34 } from "node:crypto";
|
|
147084
147306
|
import { join as join68 } from "node:path";
|
|
147085
147307
|
function analyze(projectYml, storeConfig, icon, account) {
|
|
@@ -147145,8 +147367,8 @@ function profileAccount(app, storeConfig, opts = {}) {
|
|
|
147145
147367
|
}
|
|
147146
147368
|
}
|
|
147147
147369
|
async function preflightApp(app, opts = {}) {
|
|
147148
|
-
const projectYml = existsSync68(iosProjectYml(app)) ?
|
|
147149
|
-
const storeConfig = existsSync68(storeConfigPath(app)) ?
|
|
147370
|
+
const projectYml = existsSync68(iosProjectYml(app)) ? readFileSync82(iosProjectYml(app), "utf8") : "";
|
|
147371
|
+
const storeConfig = existsSync68(storeConfigPath(app)) ? readFileSync82(storeConfigPath(app), "utf8") : "";
|
|
147150
147372
|
if (!storeConfig) return [{ level: "error", message: `no apps/${app}/store/store.config.yaml \u2014 run /setup-store-signing first.` }];
|
|
147151
147373
|
const findings = analyze(
|
|
147152
147374
|
projectYml,
|
|
@@ -147305,7 +147527,7 @@ function playListingAssets(app, locale = "en-US") {
|
|
|
147305
147527
|
for (const name of names) {
|
|
147306
147528
|
const p2 = join68(dir, name);
|
|
147307
147529
|
try {
|
|
147308
|
-
if (statSync18(p2).isFile()) return { name, bytes:
|
|
147530
|
+
if (statSync18(p2).isFile()) return { name, bytes: readFileSync82(p2) };
|
|
147309
147531
|
} catch {
|
|
147310
147532
|
}
|
|
147311
147533
|
}
|
|
@@ -147345,7 +147567,7 @@ function listScreenshots(app, locale = "en-US") {
|
|
|
147345
147567
|
const flat = join68(storeDir(app), "screenshots", locale);
|
|
147346
147568
|
if (existsSync68(flat)) {
|
|
147347
147569
|
for (const png of readdirSync31(flat).filter((n2) => n2.endsWith(".png"))) {
|
|
147348
|
-
const sz = pngSize(
|
|
147570
|
+
const sz = pngSize(readFileSync82(join68(flat, png)));
|
|
147349
147571
|
if (sz) out2.push({ name: png, w: sz.w, h: sz.h });
|
|
147350
147572
|
}
|
|
147351
147573
|
}
|
|
@@ -147355,7 +147577,7 @@ function listScreenshots(app, locale = "en-US") {
|
|
|
147355
147577
|
const d2 = join68(legacy, deviceDir);
|
|
147356
147578
|
if (!statSync18(d2).isDirectory()) continue;
|
|
147357
147579
|
for (const png of readdirSync31(d2).filter((n2) => n2.endsWith(".png"))) {
|
|
147358
|
-
const sz = pngSize(
|
|
147580
|
+
const sz = pngSize(readFileSync82(join68(d2, png)));
|
|
147359
147581
|
if (sz) out2.push({ name: `${deviceDir}/${png}`, w: sz.w, h: sz.h });
|
|
147360
147582
|
}
|
|
147361
147583
|
}
|
|
@@ -147369,7 +147591,7 @@ function placeholderHashes2() {
|
|
|
147369
147591
|
const p2 = join68(templateIos, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
|
|
147370
147592
|
try {
|
|
147371
147593
|
if (!statSync18(p2).isFile()) continue;
|
|
147372
|
-
return [LEGACY_PLACEHOLDER_SHA2562, createHash34("sha256").update(
|
|
147594
|
+
return [LEGACY_PLACEHOLDER_SHA2562, createHash34("sha256").update(readFileSync82(p2)).digest("hex")];
|
|
147373
147595
|
} catch {
|
|
147374
147596
|
}
|
|
147375
147597
|
}
|
|
@@ -147405,7 +147627,7 @@ async function appIconState(iosDir) {
|
|
|
147405
147627
|
const p2 = join68(iosDir, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
|
|
147406
147628
|
try {
|
|
147407
147629
|
if (!statSync18(p2).isFile()) continue;
|
|
147408
|
-
const bytes2 =
|
|
147630
|
+
const bytes2 = readFileSync82(p2);
|
|
147409
147631
|
const hash = createHash34("sha256").update(bytes2).digest("hex");
|
|
147410
147632
|
const pixels = await pixelIssues(bytes2);
|
|
147411
147633
|
return {
|
|
@@ -147466,92 +147688,6 @@ var init_preflight_app = __esm({
|
|
|
147466
147688
|
}
|
|
147467
147689
|
});
|
|
147468
147690
|
|
|
147469
|
-
// ../store-release/version.ts
|
|
147470
|
-
var version_exports = {};
|
|
147471
|
-
__export(version_exports, {
|
|
147472
|
-
bumpVersion: () => bumpVersion,
|
|
147473
|
-
readAndroidVersion: () => readAndroidVersion,
|
|
147474
|
-
readAndroidVersionName: () => readAndroidVersionName,
|
|
147475
|
-
readIosMarketingVersion: () => readIosMarketingVersion,
|
|
147476
|
-
readIosVersion: () => readIosVersion,
|
|
147477
|
-
setAndroidVersion: () => setAndroidVersion,
|
|
147478
|
-
setIosVersion: () => setIosVersion
|
|
147479
|
-
});
|
|
147480
|
-
import { readFileSync as readFileSync82, writeFileSync as writeFileSync27 } from "node:fs";
|
|
147481
|
-
function readIosVersion(projectYml) {
|
|
147482
|
-
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
147483
|
-
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
147484
|
-
if (marketing === null || build3 === null) {
|
|
147485
|
-
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
147486
|
-
}
|
|
147487
|
-
return { marketing, build: Number(build3) };
|
|
147488
|
-
}
|
|
147489
|
-
function setIosVersion(projectYml, v2) {
|
|
147490
|
-
let out2 = replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing);
|
|
147491
|
-
out2 = replaceScalar(out2, "CFBundleVersion", String(v2.build));
|
|
147492
|
-
out2 = out2.replace(
|
|
147493
|
-
/(^[ \t]*# >>> himalaya:live-activity:target[^\n]*\n)([\s\S]*?)(^[ \t]*# <<< himalaya:live-activity:target[^\n]*$)/m,
|
|
147494
|
-
(_match, start, body, end) => {
|
|
147495
|
-
if (!body.trim()) return start + body + end;
|
|
147496
|
-
return start + replaceScalar(replaceScalar(body, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", String(v2.build)) + end;
|
|
147497
|
-
}
|
|
147498
|
-
);
|
|
147499
|
-
return out2;
|
|
147500
|
-
}
|
|
147501
|
-
function readIosMarketingVersion(projectYml) {
|
|
147502
|
-
return matchScalar(projectYml, "CFBundleShortVersionString");
|
|
147503
|
-
}
|
|
147504
|
-
function scalarRe(key2) {
|
|
147505
|
-
return new RegExp(`^(\\s*${key2}:\\s*)("?)([^"\\n#]*?)("?)(\\s*(?:#.*)?)$`, "m");
|
|
147506
|
-
}
|
|
147507
|
-
function matchScalar(content, key2) {
|
|
147508
|
-
const m2 = scalarRe(key2).exec(content);
|
|
147509
|
-
return m2 ? m2[3].trim() : null;
|
|
147510
|
-
}
|
|
147511
|
-
function replaceScalar(content, key2, value) {
|
|
147512
|
-
const re2 = scalarRe(key2);
|
|
147513
|
-
if (!re2.test(content)) throw new Error(`could not locate \`${key2}:\` in project.yml`);
|
|
147514
|
-
return content.replace(re2, (_full, pre, openQ, _oldVal, _closeQ, tail) => {
|
|
147515
|
-
const q2 = openQ ? '"' : "";
|
|
147516
|
-
return `${pre}${q2}${value}${q2}${tail}`;
|
|
147517
|
-
});
|
|
147518
|
-
}
|
|
147519
|
-
function readAndroidVersion(gradle) {
|
|
147520
|
-
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
147521
|
-
const code = /(\bversionCode\s*=\s*)(\d+)/.exec(gradle);
|
|
147522
|
-
if (!name || !code) throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
147523
|
-
return { marketing: name[2], build: Number(code[2]) };
|
|
147524
|
-
}
|
|
147525
|
-
function readAndroidVersionName(gradle) {
|
|
147526
|
-
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
147527
|
-
return name ? name[2] : null;
|
|
147528
|
-
}
|
|
147529
|
-
function setAndroidVersion(gradle, v2) {
|
|
147530
|
-
if (!/\bversionName\s*=\s*"/.test(gradle) || !/\bversionCode\s*=\s*\d+/.test(gradle)) {
|
|
147531
|
-
throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
147532
|
-
}
|
|
147533
|
-
return gradle.replace(/(\bversionName\s*=\s*")[^"]*(")/, `$1${v2.marketing}$2`).replace(/(\bversionCode\s*=\s*)\d+/, `$1${v2.build}`);
|
|
147534
|
-
}
|
|
147535
|
-
function bumpVersion(app, opts) {
|
|
147536
|
-
const iosPath = iosProjectYml(app);
|
|
147537
|
-
const gradlePath = androidGradle(app);
|
|
147538
|
-
const iosYml = readFileSync82(iosPath, "utf8");
|
|
147539
|
-
const gradle = readFileSync82(gradlePath, "utf8");
|
|
147540
|
-
const current = readIosVersion(iosYml);
|
|
147541
|
-
const next = {
|
|
147542
|
-
marketing: opts.marketing ?? current.marketing,
|
|
147543
|
-
build: opts.build === "increment" || opts.build === void 0 ? current.build + (opts.build === "increment" ? 1 : 0) : opts.build
|
|
147544
|
-
};
|
|
147545
|
-
writeFileSync27(iosPath, setIosVersion(iosYml, next));
|
|
147546
|
-
writeFileSync27(gradlePath, setAndroidVersion(gradle, next));
|
|
147547
|
-
return next;
|
|
147548
|
-
}
|
|
147549
|
-
var init_version = __esm({
|
|
147550
|
-
"../store-release/version.ts"() {
|
|
147551
|
-
init_paths2();
|
|
147552
|
-
}
|
|
147553
|
-
});
|
|
147554
|
-
|
|
147555
147691
|
// ../store-release/asc-status.ts
|
|
147556
147692
|
var asc_status_exports = {};
|
|
147557
147693
|
__export(asc_status_exports, {
|
|
@@ -151707,9 +151843,9 @@ function routesFromBundle(js2) {
|
|
|
151707
151843
|
const code = codeMask(js2);
|
|
151708
151844
|
for (const m2 of js2.matchAll(/\bpath\s*:\s*["'`](\/[A-Za-z0-9_\-/:.*]*|\*)["'`]/g)) {
|
|
151709
151845
|
if (!code[m2.index]) continue;
|
|
151710
|
-
const
|
|
151846
|
+
const own4 = enclosingObject(js2, m2.index, code);
|
|
151711
151847
|
const before = js2.slice(Math.max(0, m2.index - 80), m2.index);
|
|
151712
|
-
if (!(
|
|
151848
|
+
if (!(own4 && ROUTE_KEY.test(own4)) && !NAV_LABEL_BEFORE.test(before)) continue;
|
|
151713
151849
|
out2.add(m2[1]);
|
|
151714
151850
|
if (out2.size >= MAX_ROUTES) break;
|
|
151715
151851
|
}
|
|
@@ -157023,8 +157159,8 @@ function catalogTypography(overlay, template) {
|
|
|
157023
157159
|
return { typography, notes };
|
|
157024
157160
|
}
|
|
157025
157161
|
function staticFaqFor(overlay, overlayPath) {
|
|
157026
|
-
const
|
|
157027
|
-
if (
|
|
157162
|
+
const own4 = overlay.faq;
|
|
157163
|
+
if (own4 !== void 0) return deriveStaticFaq(own4);
|
|
157028
157164
|
const bookPath = join74(dirname39(resolve54(overlayPath)), "book.json");
|
|
157029
157165
|
if (!existsSync71(bookPath)) return void 0;
|
|
157030
157166
|
try {
|
|
@@ -164683,8 +164819,8 @@ ${doNow.map((l2) => ` ${l2}`).join("\n")}`);
|
|
|
164683
164819
|
const dir = contentDir(flags);
|
|
164684
164820
|
try {
|
|
164685
164821
|
const spec = keepFromSpec2(dir, str9(flags["from-spec"]) ?? join75(dir, "SPEC.md"));
|
|
164686
|
-
const
|
|
164687
|
-
keep = [.../* @__PURE__ */ new Set([...spec.keep, ...
|
|
164822
|
+
const own4 = typeof keep === "string" ? keep.split(",").map((k2) => k2.trim()).filter(Boolean) : [];
|
|
164823
|
+
keep = [.../* @__PURE__ */ new Set([...spec.keep, ...own4])].join(",");
|
|
164688
164824
|
fromSpec = { fromSpec: {
|
|
164689
164825
|
keep: spec.keep,
|
|
164690
164826
|
specOnly: spec.specOnly,
|
|
@@ -168774,10 +168910,10 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
168774
168910
|
const dir = contentDir(flags);
|
|
168775
168911
|
if (!existsSync74(join75(dir, "himalaya.content.json"))) return;
|
|
168776
168912
|
const { lastDistFromJob: lastDistFromJob2, writeLastDist: writeLastDist2 } = await Promise.resolve().then(() => (init_capabilities(), capabilities_exports));
|
|
168777
|
-
const
|
|
168913
|
+
const own4 = await appId(dir);
|
|
168778
168914
|
for (const job of jobs2) {
|
|
168779
168915
|
const rec = lastDistFromJob2(job);
|
|
168780
|
-
if (!rec || rec.app !==
|
|
168916
|
+
if (!rec || rec.app !== own4) continue;
|
|
168781
168917
|
await writeLastDist2(dir, rec);
|
|
168782
168918
|
}
|
|
168783
168919
|
} catch {
|