@wix/himalaya-cli 0.1242.0 → 0.1244.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/sdk/iap/src/catalog-adapters/online-programs.d.ts +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/catalog-price-fields.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/catalog-pricing-contract.d.ts +87 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/catalog-pricing-core.d.ts +10 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/catalog-pricing.d.ts +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/index.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/mapping-source.d.ts +5 -0
- 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/_types/stdlib/flows/checkout/src/index.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/checkout.mjs +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +40 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +192 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +3 -0
- package/dist/cli.mjs +365 -226
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/getting-started.md +6 -0
- package/guides/himi-skill.md +6 -0
- package/guides/iap-pricing.md +162 -211
- package/guides/index.json +7 -6
- package/guides/sdk-reference.json +96 -0
- package/guides/tier-5-add-a-screen.md +9 -0
- package/guides/tokens.md +28 -0
- package/guides/wix-api-usage.md +11 -0
- package/guides/wix-site-to-himi-app.md +1 -1
- package/package.json +2 -2
- package/templates/branded-lite/dev/index.ts +110 -3
- package/templates/branded-lite/tier5-src/_shared/iap-worker.ts +65 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +179 -52
- package/templates/branded-lite/tier5-src/himi-branded-lite-programs/index.ts +158 -38
- package/templates/yoga-studio/dev/index.ts +110 -3
- package/templates/yoga-studio/tier5-src/_shared/iap-worker.ts +65 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +179 -52
- package/templates/yoga-studio/tier5-src/himi-branded-lite-programs/index.ts +158 -38
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",
|
|
@@ -13691,6 +13724,47 @@ function tokenColorIssues(dir, tokensPathOverride) {
|
|
|
13691
13724
|
checkElevations(layer, `idiom.${overlay}.`, /* @__PURE__ */ new Set([...baseShadows, ...shadowNames(layer)]));
|
|
13692
13725
|
}
|
|
13693
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
|
+
}
|
|
13694
13768
|
const colors = raw.colors;
|
|
13695
13769
|
if (colors === void 0) return issues;
|
|
13696
13770
|
if (colors === null || typeof colors !== "object" || Array.isArray(colors)) {
|
|
@@ -15506,15 +15580,15 @@ function hexToRgb2(hex2) {
|
|
|
15506
15580
|
}
|
|
15507
15581
|
function rgba(color, alpha2) {
|
|
15508
15582
|
let h2 = color.trim().replace(/^#/, "");
|
|
15509
|
-
let
|
|
15583
|
+
let own4 = 1;
|
|
15510
15584
|
if (/^[\da-f]{4}$/i.test(h2) || /^[\da-f]{8}$/i.test(h2)) {
|
|
15511
15585
|
const a2 = h2.length === 4 ? h2[3] + h2[3] : h2.slice(6, 8);
|
|
15512
|
-
|
|
15586
|
+
own4 = parseInt(a2, 16) / 255;
|
|
15513
15587
|
h2 = h2.length === 4 ? h2.slice(0, 3) : h2.slice(0, 6);
|
|
15514
15588
|
}
|
|
15515
15589
|
const rgb = hexToRgb2(`#${h2}`);
|
|
15516
15590
|
if (!rgb) return color;
|
|
15517
|
-
const composed2 =
|
|
15591
|
+
const composed2 = own4 === 1 ? clamp(alpha2) : Math.round(clamp(alpha2) * own4 * 1e3) / 1e3;
|
|
15518
15592
|
return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${composed2})`;
|
|
15519
15593
|
}
|
|
15520
15594
|
function normalizeSpring(spring, durationMs) {
|
|
@@ -15875,8 +15949,8 @@ var init_tokens2 = __esm({
|
|
|
15875
15949
|
// ../font-bake/web-fallback.ts
|
|
15876
15950
|
function webRenderedFallback(family) {
|
|
15877
15951
|
const stack = fontStack(family);
|
|
15878
|
-
const
|
|
15879
|
-
const tail = stack.startsWith(
|
|
15952
|
+
const own4 = `"${family}", `;
|
|
15953
|
+
const tail = stack.startsWith(own4) ? stack.slice(own4.length) : stack;
|
|
15880
15954
|
return tail.split(",")[0].trim().replace(/^"(.*)"$/, "$1");
|
|
15881
15955
|
}
|
|
15882
15956
|
var init_web_fallback = __esm({
|
|
@@ -17632,9 +17706,9 @@ function isKnownCapability(id) {
|
|
|
17632
17706
|
function needsNativeBuild(id) {
|
|
17633
17707
|
const req = CAPABILITY_NATIVE[catalogKey(id)];
|
|
17634
17708
|
if (!req) return false;
|
|
17635
|
-
const
|
|
17709
|
+
const nonEmpty2 = (v2) => Array.isArray(v2) ? v2.length > 0 : v2 != null && typeof v2 === "object" ? Object.keys(v2).length > 0 : false;
|
|
17636
17710
|
const { ios, android } = req;
|
|
17637
|
-
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);
|
|
17638
17712
|
}
|
|
17639
17713
|
function capabilitiesUsedBy(bundleJs) {
|
|
17640
17714
|
const out2 = /* @__PURE__ */ new Set();
|
|
@@ -18687,15 +18761,15 @@ function renderDistCapabilitiesXml(bake, indent) {
|
|
|
18687
18761
|
`${indent}<meta-data android:name="${ANDROID_DIST_CAPABILITIES_META}" android:value="${bake.added.join(",")}" />`
|
|
18688
18762
|
];
|
|
18689
18763
|
}
|
|
18690
|
-
function resolveDistBake(app,
|
|
18691
|
-
const ownSet = new Set(
|
|
18764
|
+
function resolveDistBake(app, own4, extra) {
|
|
18765
|
+
const ownSet = new Set(own4);
|
|
18692
18766
|
const extraKeys = [...new Set(extra.map(catalogKey))].filter((id) => !ownSet.has(id)).sort();
|
|
18693
18767
|
const refused2 = extraKeys.map((id) => [id, distAddRefusal(id)]).filter(([, r2]) => r2 !== null);
|
|
18694
18768
|
if (refused2.length) {
|
|
18695
18769
|
throw new Error(`${app}: a dist build cannot add ${refused2.map(([id, r2]) => `${id} (${r2})`).join("; ")}`);
|
|
18696
18770
|
}
|
|
18697
|
-
const build3 = buildSet([...
|
|
18698
|
-
const ownExpanded = expandCapabilities(
|
|
18771
|
+
const build3 = buildSet([...own4, ...extraKeys]);
|
|
18772
|
+
const ownExpanded = expandCapabilities(own4);
|
|
18699
18773
|
const added = [...expandCapabilities(extraKeys)].filter((id) => !ownExpanded.has(id) && distAddRefusal(id) === null).sort();
|
|
18700
18774
|
return { build: build3, added };
|
|
18701
18775
|
}
|
|
@@ -21735,8 +21809,8 @@ function rewriteNav(nav, removed, homeId) {
|
|
|
21735
21809
|
return p2;
|
|
21736
21810
|
};
|
|
21737
21811
|
const tabFor = (screenId) => {
|
|
21738
|
-
const
|
|
21739
|
-
return typeof
|
|
21812
|
+
const own4 = remainingRoots.find((t2) => t2.screenId === screenId);
|
|
21813
|
+
return typeof own4?.id === "string" ? own4.id : void 0;
|
|
21740
21814
|
};
|
|
21741
21815
|
const homeTab = tabFor(homeId) ?? (typeof remainingRoots[0]?.id === "string" ? remainingRoots[0].id : "");
|
|
21742
21816
|
const finalTab = /* @__PURE__ */ new Map();
|
|
@@ -21871,8 +21945,8 @@ function planTrim(src, keepIds, links) {
|
|
|
21871
21945
|
if (!linksOf(r2).some((l2) => removedTarget(l2.to))) continue;
|
|
21872
21946
|
const block = structuredClone(r2.block);
|
|
21873
21947
|
const isDead = (entry) => {
|
|
21874
|
-
const
|
|
21875
|
-
const to2 =
|
|
21948
|
+
const own4 = tapTarget(entry);
|
|
21949
|
+
const to2 = own4 && removedTarget(own4) ? own4 : rowTemplateTarget(entry, removedTarget);
|
|
21876
21950
|
if (!to2) return false;
|
|
21877
21951
|
dropped.push({ screen: r2.label, node: entryLabel(entry), to: to2 });
|
|
21878
21952
|
return true;
|
|
@@ -24064,12 +24138,12 @@ function clampRule(rule, denyPrefixes, maxTTL) {
|
|
|
24064
24138
|
ttl: Math.min(rule.ttl, maxTTL)
|
|
24065
24139
|
};
|
|
24066
24140
|
}
|
|
24067
|
-
function shadows(
|
|
24068
|
-
const methodCovers =
|
|
24069
|
-
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);
|
|
24070
24144
|
}
|
|
24071
24145
|
function resolveWixCachePolicy(appName2, declared) {
|
|
24072
|
-
const
|
|
24146
|
+
const own4 = (declared?.rules ?? []).map((r2) => ({
|
|
24073
24147
|
method: r2.method ?? null,
|
|
24074
24148
|
pathPrefix: r2.pathPrefix,
|
|
24075
24149
|
cacheable: r2.cacheable,
|
|
@@ -24078,7 +24152,7 @@ function resolveWixCachePolicy(appName2, declared) {
|
|
|
24078
24152
|
tag: r2.tag ?? null
|
|
24079
24153
|
}));
|
|
24080
24154
|
const legacy = CACHE_OVERRIDES[appName2] ?? [];
|
|
24081
|
-
const appLevel = [...
|
|
24155
|
+
const appLevel = [...own4, ...legacy];
|
|
24082
24156
|
const defaults = declared?.platformDefaults === false ? [] : PLATFORM_DEFAULT_WIX_CACHE_RULES.filter((d2) => !appLevel.some((a2) => shadows(a2, d2)));
|
|
24083
24157
|
const denies = [
|
|
24084
24158
|
...[...PLATFORM_DENY_PREFIXES, ...PERSONAL_DATA_PREFIXES].map((pathPrefix) => ({ method: null, pathPrefix, cacheable: false, ttl: 0, swr: 0, tag: null })),
|
|
@@ -25674,6 +25748,7 @@ function shouldRevealError(args) {
|
|
|
25674
25748
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
25675
25749
|
var init_validation = __esm({
|
|
25676
25750
|
"../../core/ts/src/validation.ts"() {
|
|
25751
|
+
"use strict";
|
|
25677
25752
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
25678
25753
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
25679
25754
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -26333,6 +26408,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
26333
26408
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
26334
26409
|
var init_worker_subtree = __esm({
|
|
26335
26410
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
26411
|
+
"use strict";
|
|
26336
26412
|
init_worker_subtree_safe_types_generated();
|
|
26337
26413
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
26338
26414
|
maxEncodedBytes: 65536,
|
|
@@ -28784,8 +28860,8 @@ var init_src4 = __esm({
|
|
|
28784
28860
|
// ../../core/dev-server/src/descriptor-postprocess.ts
|
|
28785
28861
|
function applyTopBarDefault(descriptor, config) {
|
|
28786
28862
|
const fallback = config?.navigation?.topBarDefault;
|
|
28787
|
-
const
|
|
28788
|
-
if (!fallback ||
|
|
28863
|
+
const own4 = descriptor?.topBar;
|
|
28864
|
+
if (!fallback || own4) return descriptor;
|
|
28789
28865
|
return { ...descriptor, topBar: fallback };
|
|
28790
28866
|
}
|
|
28791
28867
|
function attachAssignments(descriptor, definitions2, ctx, overrides) {
|
|
@@ -31380,13 +31456,13 @@ function parsePaddingShorthand(v2) {
|
|
|
31380
31456
|
}
|
|
31381
31457
|
function addIntrinsicPadding(style, modPad) {
|
|
31382
31458
|
if (!style) return void 0;
|
|
31383
|
-
const
|
|
31384
|
-
if (!
|
|
31459
|
+
const own4 = parsePaddingShorthand(style.padding);
|
|
31460
|
+
if (!own4) return void 0;
|
|
31385
31461
|
const sides = [
|
|
31386
|
-
["paddingTop",
|
|
31387
|
-
["paddingBottom",
|
|
31388
|
-
["paddingLeft",
|
|
31389
|
-
["paddingRight",
|
|
31462
|
+
["paddingTop", own4.top],
|
|
31463
|
+
["paddingBottom", own4.bottom],
|
|
31464
|
+
["paddingLeft", own4.left],
|
|
31465
|
+
["paddingRight", own4.right]
|
|
31390
31466
|
];
|
|
31391
31467
|
let out2;
|
|
31392
31468
|
for (const [key2, ownPx] of sides) {
|
|
@@ -32966,8 +33042,8 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
32966
33042
|
const root = { position: "relative", display: "flex", flexDirection: "column", width: "100%", ...fill ? { flex: "1 1 auto" } : {}, minHeight, ...wrap };
|
|
32967
33043
|
if (!live3) {
|
|
32968
33044
|
const { paddingTop: _t2, paddingBottom: _b, paddingLeft: _l2, paddingRight: _r2, ...rootNoSides } = root;
|
|
32969
|
-
const
|
|
32970
|
-
return /* @__PURE__ */ jsx4("div", { ...dom, style: addIntrinsicPadding(
|
|
33045
|
+
const own4 = { ...rootNoSides, border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 8, padding: 12, boxSizing: "border-box" };
|
|
33046
|
+
return /* @__PURE__ */ jsx4("div", { ...dom, style: addIntrinsicPadding(own4, wrap) ?? own4, children: /* @__PURE__ */ jsx4("span", { style: { color: C2("textSecondary", "#636B78") }, children: placeholder2 || "Rich text editor" }) });
|
|
32971
33047
|
}
|
|
32972
33048
|
if (status === "unavailable") {
|
|
32973
33049
|
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" }) }) });
|
|
@@ -33809,8 +33885,8 @@ function pushModalLayer(el2, opts = {}) {
|
|
|
33809
33885
|
sync();
|
|
33810
33886
|
return {
|
|
33811
33887
|
isTop: () => {
|
|
33812
|
-
const
|
|
33813
|
-
return
|
|
33888
|
+
const own4 = layer.el();
|
|
33889
|
+
return own4 != null && own4.isConnected && topLayerOver(own4) === layer;
|
|
33814
33890
|
},
|
|
33815
33891
|
release: () => {
|
|
33816
33892
|
const i2 = layers.indexOf(layer);
|
|
@@ -116368,18 +116444,18 @@ function editA11yParts(node, edit) {
|
|
|
116368
116444
|
return changed ? out2 : node;
|
|
116369
116445
|
}
|
|
116370
116446
|
if (!React8.isValidElement(node) || typeof node.type !== "string") return node;
|
|
116371
|
-
const
|
|
116372
|
-
if (
|
|
116373
|
-
const part =
|
|
116374
|
-
const kids3 =
|
|
116447
|
+
const own4 = node.props;
|
|
116448
|
+
if (own4["data-component-id"] != null) return node;
|
|
116449
|
+
const part = own4[A11Y_PART];
|
|
116450
|
+
const kids3 = own4.children;
|
|
116375
116451
|
const nextKids = kids3 == null ? kids3 : editA11yParts(kids3, edit);
|
|
116376
116452
|
if (typeof part !== "string" && nextKids === kids3) return node;
|
|
116377
|
-
return cloneWithKids(node, typeof part === "string" ? { ...edit(part,
|
|
116453
|
+
return cloneWithKids(node, typeof part === "string" ? { ...edit(part, own4), [A11Y_PART]: void 0 } : {}, nextKids);
|
|
116378
116454
|
}
|
|
116379
116455
|
function a11yPartEdit(routed, authoredName, onNode, focus) {
|
|
116380
|
-
return (part,
|
|
116456
|
+
return (part, own4) => {
|
|
116381
116457
|
if (part === "derived-name") return authoredName ? {} : { "aria-hidden": "true" };
|
|
116382
|
-
const focusable = typeof
|
|
116458
|
+
const focusable = typeof own4.tabIndex === "number" && own4.tabIndex >= 0;
|
|
116383
116459
|
if (part === "focus") {
|
|
116384
116460
|
if (!focus || !focusable) return {};
|
|
116385
116461
|
focus.onRouted();
|
|
@@ -116392,10 +116468,10 @@ function a11yPartEdit(routed, authoredName, onNode, focus) {
|
|
|
116392
116468
|
Object.assign(patch, focus.carried);
|
|
116393
116469
|
focus.onRouted();
|
|
116394
116470
|
}
|
|
116395
|
-
if (typeof routed["aria-describedby"] === "string" && typeof
|
|
116396
|
-
patch["aria-describedby"] = `${
|
|
116471
|
+
if (typeof routed["aria-describedby"] === "string" && typeof own4["aria-describedby"] === "string") {
|
|
116472
|
+
patch["aria-describedby"] = `${own4["aria-describedby"]} ${routed["aria-describedby"]}`;
|
|
116397
116473
|
}
|
|
116398
|
-
if ("role" in routed && routed.role !==
|
|
116474
|
+
if ("role" in routed && routed.role !== own4.role) {
|
|
116399
116475
|
if (!(typeof routed.role === "string" && RANGE_ROLES.has(routed.role))) {
|
|
116400
116476
|
patch["aria-valuenow"] = void 0;
|
|
116401
116477
|
patch["aria-valuemin"] = void 0;
|
|
@@ -116447,8 +116523,8 @@ function nameFromOwnContent(root) {
|
|
|
116447
116523
|
const t2 = child.textContent?.trim();
|
|
116448
116524
|
if (t2) parts.push(t2);
|
|
116449
116525
|
} else if (child.nodeType === 1 && !child.matches(NAME_SKIP_SELECTOR)) {
|
|
116450
|
-
const
|
|
116451
|
-
if (
|
|
116526
|
+
const own4 = child.getAttribute("aria-label")?.trim() || (child.tagName === "IMG" ? child.getAttribute("alt")?.trim() : void 0);
|
|
116527
|
+
if (own4) parts.push(own4);
|
|
116452
116528
|
else walk2(child);
|
|
116453
116529
|
}
|
|
116454
116530
|
}
|
|
@@ -118275,6 +118351,7 @@ var init_renderNode = __esm({
|
|
|
118275
118351
|
init_helpers();
|
|
118276
118352
|
init_bindings2();
|
|
118277
118353
|
init_bindings();
|
|
118354
|
+
init_tokens();
|
|
118278
118355
|
init_message_format();
|
|
118279
118356
|
init_validation();
|
|
118280
118357
|
init_formBag();
|
|
@@ -120401,22 +120478,30 @@ var init_renderNode = __esm({
|
|
|
120401
120478
|
const buttonStyle = props.style ?? "primary";
|
|
120402
120479
|
const destructive = buttonStyle === "destructive";
|
|
120403
120480
|
const primary = buttonStyle === "primary" || destructive;
|
|
120404
|
-
const
|
|
120405
|
-
const
|
|
120481
|
+
const bt2 = resolveButtonTokens(ctx.tokens, props.size, buttonStyle);
|
|
120482
|
+
const borderWidth = bt2.borderWidth ?? (buttonStyle === "secondary" ? 1 : 0);
|
|
120483
|
+
const outlined = borderWidth > 0;
|
|
120484
|
+
const builtInFill = !primary ? "transparent" : destructive ? C2("danger", "#E62214") : C2("accentPrimary", "#116DFF");
|
|
120485
|
+
const accent = bt2.fill != null ? C2(bt2.fill, builtInFill) : builtInFill;
|
|
120486
|
+
const filled = primary || bt2.fill != null;
|
|
120406
120487
|
const boundDisabled = useResolvedScalar(props.disabledPath, ctx);
|
|
120407
120488
|
const disabled = props.disabled === true || props.loading === true || hiddenBool(boundDisabled);
|
|
120408
120489
|
const onClick = ctx.onAction && props.action && !disabled ? (e2) => {
|
|
120409
120490
|
e2?.stopPropagation?.();
|
|
120410
120491
|
ctx.onAction(resolveItemDeep2(props.action, ctx));
|
|
120411
120492
|
} : void 0;
|
|
120412
|
-
const
|
|
120413
|
-
const
|
|
120414
|
-
const
|
|
120493
|
+
const builtInFg = primary ? C2("textOnAccent", "#fff") : accentTextColor(ctx);
|
|
120494
|
+
const fg = bt2.label != null ? C2(bt2.label, builtInFg) : builtInFg;
|
|
120495
|
+
const outlineColor = bt2.border != null ? C2(bt2.border, fg) : fg;
|
|
120496
|
+
const pillRadius = props.cornerRadius != null ? props.cornerRadius : bt2.radius ?? ctx.radius("pill", 24);
|
|
120497
|
+
const vPad = props.iconOnly ? 11 : bt2.paddingV ?? (props.size === "sm" ? 8 : props.size === "lg" ? 16 : 13);
|
|
120415
120498
|
const hPadBase = props.iconOnly ? 11 : props.size === "sm" ? 13 : props.size === "lg" ? 22 : 16;
|
|
120416
|
-
const hPad = props.iconOnly ? 11 : Math.min(Math.max(hPadBase, pillRadius), vPad + 8);
|
|
120499
|
+
const hPad = props.iconOnly ? 11 : bt2.paddingH ?? Math.min(Math.max(hPadBase, pillRadius), vPad + 8);
|
|
120417
120500
|
const pad3 = `${vPad}px ${hPad}px`;
|
|
120418
|
-
const f2 = ctx.font("bodyEmphasis");
|
|
120419
|
-
const glyph = props.size === "sm" ? 14 : props.size === "lg" ? 18 : 16;
|
|
120501
|
+
const f2 = ctx.font(bt2.text ?? "bodyEmphasis");
|
|
120502
|
+
const glyph = bt2.icon ?? (props.size === "sm" ? 14 : props.size === "lg" ? 18 : 16);
|
|
120503
|
+
const visibleMin = props.iconOnly ? 44 : props.minHeight ?? bt2.height ?? 44;
|
|
120504
|
+
const slop = props.iconOnly ? 0 : buttonHitSlop(Math.max(visibleMin, 2 * vPad + Math.max(f2.size * (f2.line ?? 1.25), glyph)));
|
|
120420
120505
|
const ic = (name) => /* @__PURE__ */ jsx9("span", { style: { display: "inline-grid", placeItems: "center", width: glyph, height: glyph }, children: iconSvg(name, { size: glyph, color: fg }) });
|
|
120421
120506
|
const iconLabel = typeof resolvedLeadingIcon === "string" && resolvedLeadingIcon ? resolvedLeadingIcon.replace(/[_-]+/g, " ").replace(/\b\w/g, (c2) => c2.toUpperCase()) : "";
|
|
120422
120507
|
const hasTitle = typeof resolvedTitle === "string" && resolvedTitle.length > 0 || typeof resolvedTitle === "number";
|
|
@@ -120466,19 +120551,24 @@ var init_renderNode = __esm({
|
|
|
120466
120551
|
width: props.fullWidth ? "100%" : void 0,
|
|
120467
120552
|
flex: rowStretch ? "1 1 0" : void 0,
|
|
120468
120553
|
minWidth: props.iconOnly ? 44 : props.fullWidth ? void 0 : 64,
|
|
120469
|
-
minHeight:
|
|
120554
|
+
minHeight: visibleMin + 2 * slop,
|
|
120470
120555
|
...props.iconOnly ? {} : { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" },
|
|
120471
120556
|
alignItems: "center",
|
|
120472
120557
|
justifyContent: "center",
|
|
120473
120558
|
gap: 8,
|
|
120474
120559
|
padding: pad3,
|
|
120475
|
-
|
|
120560
|
+
// With a hit band the outer box is `slop` taller at each end; an elliptical radius keeps
|
|
120561
|
+
// the VISIBLE (padding-box) corner at `pillRadius`.
|
|
120562
|
+
borderRadius: props.iconOnly ? "50%" : slop > 0 ? `${pillRadius}px / ${pillRadius + slop}px` : pillRadius,
|
|
120476
120563
|
fontFamily: fontStack(f2.family, ctx.idiom),
|
|
120477
120564
|
fontWeight: f2.weight,
|
|
120478
120565
|
fontSize: f2.remSize,
|
|
120479
|
-
|
|
120566
|
+
// An authored `text` token paints its own line height too — the one the hit area estimates with.
|
|
120567
|
+
...bt2.text != null && f2.line != null ? { lineHeight: f2.line } : {},
|
|
120568
|
+
...bt2.text != null && f2.letterSpacing != null ? { letterSpacing: f2.letterSpacing } : {},
|
|
120569
|
+
background: filled ? accent : "transparent",
|
|
120480
120570
|
color: fg,
|
|
120481
|
-
border: outlined ? `
|
|
120571
|
+
...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" },
|
|
120482
120572
|
cursor: disabled ? "default" : "pointer",
|
|
120483
120573
|
opacity: disabled ? 0.55 : 1,
|
|
120484
120574
|
boxSizing: "border-box",
|
|
@@ -122303,10 +122393,10 @@ var init_renderNode = __esm({
|
|
|
122303
122393
|
focusRoots = /* @__PURE__ */ new WeakMap();
|
|
122304
122394
|
A11yHintDescription = ({ hint, idBase, children, ...forwarded }) => {
|
|
122305
122395
|
const descId = `${idBase ?? "hm"}__hint${React8.useId()}`;
|
|
122306
|
-
const
|
|
122396
|
+
const own4 = children.props;
|
|
122307
122397
|
const next = { ...forwarded };
|
|
122308
|
-
if (forwarded.style) next.style = { ...
|
|
122309
|
-
next["aria-describedby"] = [
|
|
122398
|
+
if (forwarded.style) next.style = { ...own4.style ?? {}, ...forwarded.style };
|
|
122399
|
+
next["aria-describedby"] = [own4["aria-describedby"], descId].filter(Boolean).join(" ");
|
|
122310
122400
|
return /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
122311
122401
|
React8.cloneElement(children, next),
|
|
122312
122402
|
/* @__PURE__ */ jsx9("span", { id: descId, hidden: true, "data-hm-a11y-hint": "", children: hint })
|
|
@@ -141583,15 +141673,15 @@ function assembleLedger(r2, options = {}) {
|
|
|
141583
141673
|
remedy: SOURCEMAP_REMEDY[c2.sourcemap]
|
|
141584
141674
|
});
|
|
141585
141675
|
}
|
|
141586
|
-
const
|
|
141587
|
-
if (!
|
|
141588
|
-
const named =
|
|
141589
|
-
const more =
|
|
141676
|
+
const own4 = (c2.uncoveredFunctions ?? []).filter((f2) => f2.source?.startsWith("tier5-src/") || f2.source?.startsWith("core/dev-server/tier5-bundles-src/"));
|
|
141677
|
+
if (!own4.length) continue;
|
|
141678
|
+
const named = own4.slice(0, 6).map((f2) => `${f2.name} (${f2.source})`).join(", ");
|
|
141679
|
+
const more = own4.length > 6 ? ` +${own4.length - 6} more` : "";
|
|
141590
141680
|
out2.push({
|
|
141591
141681
|
key: `code-uncovered|${c2.screen}`,
|
|
141592
141682
|
kind: "code-uncovered",
|
|
141593
141683
|
screen: c2.screen,
|
|
141594
|
-
gap: `${
|
|
141684
|
+
gap: `${own4.length} worker function${own4.length === 1 ? "" : "s"} never executed on any axis: ${named}${more}`,
|
|
141595
141685
|
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"
|
|
141596
141686
|
});
|
|
141597
141687
|
}
|
|
@@ -143651,23 +143741,23 @@ var init_preview_assets_generated = __esm({
|
|
|
143651
143741
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
143652
143742
|
init_preview_assets_format();
|
|
143653
143743
|
PREVIEW_ASSET_MANIFEST = [
|
|
143654
|
-
{ key: "assets/index-
|
|
143655
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset:
|
|
143656
|
-
{ key: "assets/pdfDocument-
|
|
143657
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
143658
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
143659
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
143660
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
143661
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
143662
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
143663
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
143664
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
143665
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
143666
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
143667
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
143668
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
143669
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
143670
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
143744
|
+
{ key: "assets/index-CPLD_SKV.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1193794, sha256: "4b6a6e4c6cc9a5bbb9683436c0569281ecc1b23885c6684f42b8e50de02d7d1c" },
|
|
143745
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset: 1193802, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
143746
|
+
{ key: "assets/pdfDocument-DLmlpdLS.js", contentType: "application/javascript; charset=utf-8", offset: 2510836, length: 489166, sha256: "c583b748cbc814a27789ca1bcc8fd812a3c7a9cbc9428fea612f3d321d357fa9" },
|
|
143747
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3000002, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
143748
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3004612, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
143749
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3493196, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
143750
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3584120, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
143751
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3675104, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
143752
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3766084, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
143753
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3856956, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
143754
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3947936, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
143755
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4056572, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
143756
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4165656, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
143757
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4274704, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
143758
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4382404, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
143759
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4470512, length: 4947, sha256: "58e2242ae4a75ea666a13847f575df0455bbc0928a080c861804294ecb72f83f" },
|
|
143760
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4475459, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
143671
143761
|
];
|
|
143672
143762
|
}
|
|
143673
143763
|
});
|
|
@@ -144114,6 +144204,138 @@ var init_git = __esm({
|
|
|
144114
144204
|
}
|
|
144115
144205
|
});
|
|
144116
144206
|
|
|
144207
|
+
// ../store-release/version.ts
|
|
144208
|
+
var version_exports = {};
|
|
144209
|
+
__export(version_exports, {
|
|
144210
|
+
bumpVersion: () => bumpVersion,
|
|
144211
|
+
readAndroidVersion: () => readAndroidVersion,
|
|
144212
|
+
readAndroidVersionName: () => readAndroidVersionName,
|
|
144213
|
+
readIosMarketingVersion: () => readIosMarketingVersion,
|
|
144214
|
+
readIosVersion: () => readIosVersion,
|
|
144215
|
+
readIosVersionStrings: () => readIosVersionStrings,
|
|
144216
|
+
setAndroidVersion: () => setAndroidVersion,
|
|
144217
|
+
setIosVersion: () => setIosVersion,
|
|
144218
|
+
stampIosVersionStrings: () => stampIosVersionStrings
|
|
144219
|
+
});
|
|
144220
|
+
import { readFileSync as readFileSync76, writeFileSync as writeFileSync26 } from "node:fs";
|
|
144221
|
+
function readIosVersion(projectYml) {
|
|
144222
|
+
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144223
|
+
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
144224
|
+
if (marketing === null || build3 === null) {
|
|
144225
|
+
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
144226
|
+
}
|
|
144227
|
+
return { marketing, build: Number(build3) };
|
|
144228
|
+
}
|
|
144229
|
+
function setIosVersion(projectYml, v2) {
|
|
144230
|
+
let out2 = replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing);
|
|
144231
|
+
out2 = replaceScalar(out2, "CFBundleVersion", String(v2.build));
|
|
144232
|
+
out2 = out2.replace(
|
|
144233
|
+
/(^[ \t]*# >>> himalaya:live-activity:target[^\n]*\n)([\s\S]*?)(^[ \t]*# <<< himalaya:live-activity:target[^\n]*$)/m,
|
|
144234
|
+
(_match, start, body, end) => {
|
|
144235
|
+
if (!body.trim()) return start + body + end;
|
|
144236
|
+
return start + replaceScalar(replaceScalar(body, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", String(v2.build)) + end;
|
|
144237
|
+
}
|
|
144238
|
+
);
|
|
144239
|
+
return out2;
|
|
144240
|
+
}
|
|
144241
|
+
function readIosVersionStrings(projectYml) {
|
|
144242
|
+
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144243
|
+
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
144244
|
+
if (marketing === null || build3 === null) {
|
|
144245
|
+
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
144246
|
+
}
|
|
144247
|
+
return { marketing, build: build3 };
|
|
144248
|
+
}
|
|
144249
|
+
function stampIosVersionStrings(projectYml, v2) {
|
|
144250
|
+
return replaceScalar(replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", v2.build);
|
|
144251
|
+
}
|
|
144252
|
+
function readIosMarketingVersion(projectYml) {
|
|
144253
|
+
return matchScalar(projectYml, "CFBundleShortVersionString");
|
|
144254
|
+
}
|
|
144255
|
+
function scalarRe(key2) {
|
|
144256
|
+
return new RegExp(`^(\\s*${key2}:\\s*)("?)([^"\\n#]*?)("?)(\\s*(?:#.*)?)$`, "m");
|
|
144257
|
+
}
|
|
144258
|
+
function matchScalar(content, key2) {
|
|
144259
|
+
const m2 = scalarRe(key2).exec(content);
|
|
144260
|
+
return m2 ? m2[3].trim() : null;
|
|
144261
|
+
}
|
|
144262
|
+
function replaceScalar(content, key2, value) {
|
|
144263
|
+
const re2 = scalarRe(key2);
|
|
144264
|
+
if (!re2.test(content)) throw new Error(`could not locate \`${key2}:\` in project.yml`);
|
|
144265
|
+
return content.replace(re2, (_full, pre, openQ, _oldVal, _closeQ, tail) => {
|
|
144266
|
+
const q2 = openQ ? '"' : "";
|
|
144267
|
+
return `${pre}${q2}${value}${q2}${tail}`;
|
|
144268
|
+
});
|
|
144269
|
+
}
|
|
144270
|
+
function readAndroidVersion(gradle) {
|
|
144271
|
+
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
144272
|
+
const code = /(\bversionCode\s*=\s*)(\d+)/.exec(gradle);
|
|
144273
|
+
if (!name || !code) throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
144274
|
+
return { marketing: name[2], build: Number(code[2]) };
|
|
144275
|
+
}
|
|
144276
|
+
function readAndroidVersionName(gradle) {
|
|
144277
|
+
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
144278
|
+
return name ? name[2] : null;
|
|
144279
|
+
}
|
|
144280
|
+
function setAndroidVersion(gradle, v2) {
|
|
144281
|
+
if (!/\bversionName\s*=\s*"/.test(gradle) || !/\bversionCode\s*=\s*\d+/.test(gradle)) {
|
|
144282
|
+
throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
144283
|
+
}
|
|
144284
|
+
return gradle.replace(/(\bversionName\s*=\s*")[^"]*(")/, `$1${v2.marketing}$2`).replace(/(\bversionCode\s*=\s*)\d+/, `$1${v2.build}`);
|
|
144285
|
+
}
|
|
144286
|
+
function bumpVersion(app, opts) {
|
|
144287
|
+
const iosPath = iosProjectYml(app);
|
|
144288
|
+
const gradlePath = androidGradle(app);
|
|
144289
|
+
const iosYml = readFileSync76(iosPath, "utf8");
|
|
144290
|
+
const gradle = readFileSync76(gradlePath, "utf8");
|
|
144291
|
+
const current = readIosVersion(iosYml);
|
|
144292
|
+
const next = {
|
|
144293
|
+
marketing: opts.marketing ?? current.marketing,
|
|
144294
|
+
build: opts.build === "increment" || opts.build === void 0 ? current.build + (opts.build === "increment" ? 1 : 0) : opts.build
|
|
144295
|
+
};
|
|
144296
|
+
writeFileSync26(iosPath, setIosVersion(iosYml, next));
|
|
144297
|
+
writeFileSync26(gradlePath, setAndroidVersion(gradle, next));
|
|
144298
|
+
return next;
|
|
144299
|
+
}
|
|
144300
|
+
var init_version = __esm({
|
|
144301
|
+
"../store-release/version.ts"() {
|
|
144302
|
+
init_paths2();
|
|
144303
|
+
}
|
|
144304
|
+
});
|
|
144305
|
+
|
|
144306
|
+
// ../store-release/store-spec.ts
|
|
144307
|
+
function detectBundleId(projectYml) {
|
|
144308
|
+
const m2 = /^\s*bundleId:\s*(\S+)\s*$/m.exec(projectYml);
|
|
144309
|
+
if (!m2) throw new Error("project.yml has no `bundleId:` on the application target");
|
|
144310
|
+
return m2[1];
|
|
144311
|
+
}
|
|
144312
|
+
function defaultProdBundleId(devBundleId) {
|
|
144313
|
+
return devBundleId.replace(/\.dev$/, "");
|
|
144314
|
+
}
|
|
144315
|
+
function referencedWatchProject(projectYml) {
|
|
144316
|
+
if (!/^projectReferences:/m.test(projectYml)) return void 0;
|
|
144317
|
+
const m2 = /^projectReferences:\n {2}Watch:\n {4}path:\s*\.\.\/watchos\/(\S+)\.xcodeproj\s*$/m.exec(projectYml);
|
|
144318
|
+
if (!m2) {
|
|
144319
|
+
throw new Error(
|
|
144320
|
+
"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"
|
|
144321
|
+
);
|
|
144322
|
+
}
|
|
144323
|
+
return { name: m2[1] };
|
|
144324
|
+
}
|
|
144325
|
+
function storeWatchBundleId(prodIosBundleId) {
|
|
144326
|
+
return `${prodIosBundleId}.watchkitapp`;
|
|
144327
|
+
}
|
|
144328
|
+
function storeSigningBundleIds(projectYml, toBundleId) {
|
|
144329
|
+
const prod = toBundleId ?? defaultProdBundleId(detectBundleId(projectYml));
|
|
144330
|
+
return referencedWatchProject(projectYml) ? [prod, storeWatchBundleId(prod)] : [prod];
|
|
144331
|
+
}
|
|
144332
|
+
var init_store_spec = __esm({
|
|
144333
|
+
"../store-release/store-spec.ts"() {
|
|
144334
|
+
init_paths2();
|
|
144335
|
+
init_version();
|
|
144336
|
+
}
|
|
144337
|
+
});
|
|
144338
|
+
|
|
144117
144339
|
// ../store-release/preflight.ts
|
|
144118
144340
|
var preflight_exports = {};
|
|
144119
144341
|
__export(preflight_exports, {
|
|
@@ -144123,7 +144345,7 @@ __export(preflight_exports, {
|
|
|
144123
144345
|
parseStoreConfig: () => parseStoreConfig,
|
|
144124
144346
|
requireEnv: () => requireEnv
|
|
144125
144347
|
});
|
|
144126
|
-
import { existsSync as existsSync65, readFileSync as
|
|
144348
|
+
import { existsSync as existsSync65, readFileSync as readFileSync77 } from "node:fs";
|
|
144127
144349
|
import { isAbsolute as isAbsolute6, relative as relative13, resolve as resolve50 } from "node:path";
|
|
144128
144350
|
function isInsideRepo(p2) {
|
|
144129
144351
|
const rel = relative13(REPO_ROOT3, resolve50(p2));
|
|
@@ -144183,7 +144405,7 @@ function loadStoreConfig(app) {
|
|
|
144183
144405
|
if (!existsSync65(p2)) {
|
|
144184
144406
|
throw new Error(`No store config at ${p2}. Create apps/${app}/store/store.config.yaml first (see /setup-store-signing).`);
|
|
144185
144407
|
}
|
|
144186
|
-
return parseStoreConfig(
|
|
144408
|
+
return parseStoreConfig(readFileSync77(p2, "utf8"));
|
|
144187
144409
|
}
|
|
144188
144410
|
var init_preflight = __esm({
|
|
144189
144411
|
"../store-release/preflight.ts"() {
|
|
@@ -144192,7 +144414,7 @@ var init_preflight = __esm({
|
|
|
144192
144414
|
});
|
|
144193
144415
|
|
|
144194
144416
|
// ../store-release/register-bundle.ts
|
|
144195
|
-
import { readFileSync as
|
|
144417
|
+
import { readFileSync as readFileSync78 } from "node:fs";
|
|
144196
144418
|
import { createPrivateKey as createPrivateKey2, sign } from "node:crypto";
|
|
144197
144419
|
function b64url2(b2) {
|
|
144198
144420
|
return Buffer.from(b2).toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
@@ -144210,7 +144432,7 @@ function bundleIdBody(identifier, name, platform = "IOS") {
|
|
|
144210
144432
|
async function registerBundleId(opts) {
|
|
144211
144433
|
const env = requireEnv(["ASC_KEY_ID", "ASC_ISSUER_ID", "ASC_KEY_PATH"]);
|
|
144212
144434
|
assertCredentialOutsideRepo("ASC_KEY_PATH", env.ASC_KEY_PATH);
|
|
144213
|
-
const jwt = ascJwt(env.ASC_KEY_ID, env.ASC_ISSUER_ID,
|
|
144435
|
+
const jwt = ascJwt(env.ASC_KEY_ID, env.ASC_ISSUER_ID, readFileSync78(env.ASC_KEY_PATH, "utf8"), Math.floor(Date.now() / 1e3));
|
|
144214
144436
|
const res = await fetch(`${ASC_API}/v1/bundleIds`, {
|
|
144215
144437
|
method: "POST",
|
|
144216
144438
|
headers: { Authorization: `Bearer ${jwt}`, "Content-Type": "application/json" },
|
|
@@ -144240,13 +144462,16 @@ async function main() {
|
|
|
144240
144462
|
}
|
|
144241
144463
|
const ni2 = rest.indexOf("--name");
|
|
144242
144464
|
const name = ni2 >= 0 ? rest[ni2 + 1] : cfg.app ?? app;
|
|
144243
|
-
const
|
|
144244
|
-
|
|
144465
|
+
for (const id of storeSigningBundleIds(readFileSync78(iosProjectYml(app), "utf8"), identifier)) {
|
|
144466
|
+
const r2 = await registerBundleId({ identifier: id, name: id === identifier ? name : `${name} Watch` });
|
|
144467
|
+
console.log(`bundle id ${id}: ${r2.status}${r2.id ? ` (${r2.id})` : ""}`);
|
|
144468
|
+
}
|
|
144245
144469
|
}
|
|
144246
144470
|
var ASC_API;
|
|
144247
144471
|
var init_register_bundle = __esm({
|
|
144248
144472
|
"../store-release/register-bundle.ts"() {
|
|
144249
144473
|
init_paths2();
|
|
144474
|
+
init_store_spec();
|
|
144250
144475
|
init_preflight();
|
|
144251
144476
|
ASC_API = "https://api.appstoreconnect.apple.com";
|
|
144252
144477
|
if (runningAsScript("store-release/register-bundle.ts")) {
|
|
@@ -145642,7 +145867,7 @@ __export(credential_profile_exports, {
|
|
|
145642
145867
|
profilePath: () => profilePath,
|
|
145643
145868
|
resolveStoreCredentials: () => resolveStoreCredentials
|
|
145644
145869
|
});
|
|
145645
|
-
import { existsSync as existsSync66, readFileSync as
|
|
145870
|
+
import { existsSync as existsSync66, readFileSync as readFileSync79 } from "node:fs";
|
|
145646
145871
|
import { homedir as homedir5 } from "node:os";
|
|
145647
145872
|
import { join as join66 } from "node:path";
|
|
145648
145873
|
function credentialsDir(home = homedir5()) {
|
|
@@ -145685,7 +145910,7 @@ function resolveStoreCredentials(opts) {
|
|
|
145685
145910
|
const { app, cfg } = opts;
|
|
145686
145911
|
const env = opts.env ?? process.env;
|
|
145687
145912
|
const home = opts.home ?? homedir5();
|
|
145688
|
-
const read = opts.readProfile ?? ((p2) =>
|
|
145913
|
+
const read = opts.readProfile ?? ((p2) => readFileSync79(p2, "utf8"));
|
|
145689
145914
|
const exists = opts.profileExists ?? existsSync66;
|
|
145690
145915
|
const ios = cfg.ios ?? {};
|
|
145691
145916
|
const flagName = opts.profileFlag?.trim();
|
|
@@ -145752,7 +145977,7 @@ var init_credential_profile = __esm({
|
|
|
145752
145977
|
|
|
145753
145978
|
// ../store-release/iap-credentials.ts
|
|
145754
145979
|
import { createHash as createHash32 } from "node:crypto";
|
|
145755
|
-
import { existsSync as existsSync67, readFileSync as
|
|
145980
|
+
import { existsSync as existsSync67, readFileSync as readFileSync80, realpathSync as realpathSync10 } from "node:fs";
|
|
145756
145981
|
import { homedir as homedir6 } from "node:os";
|
|
145757
145982
|
function accountFingerprint(keyId, issuerId) {
|
|
145758
145983
|
return `sha256:${createHash32("sha256").update(`${issuerId}:${keyId}`).digest("hex").slice(0, 16)}`;
|
|
@@ -145786,7 +146011,7 @@ function canonicalKeyPath(path2, profile, realpath) {
|
|
|
145786
146011
|
function resolveIapCredentials(options) {
|
|
145787
146012
|
const { target } = options;
|
|
145788
146013
|
const home = options.home ?? homedir6();
|
|
145789
|
-
const readFile3 = options.readFile ?? ((p2) =>
|
|
146014
|
+
const readFile3 = options.readFile ?? ((p2) => readFileSync80(p2, "utf8"));
|
|
145790
146015
|
const realpath = options.realpath ?? realpathSync10;
|
|
145791
146016
|
const profile = requireExplicitProfile(options.profileFlag, target);
|
|
145792
146017
|
const creds = resolveStoreCredentials({
|
|
@@ -146045,8 +146270,8 @@ function scrubBook(value) {
|
|
|
146045
146270
|
}
|
|
146046
146271
|
function assertNoSecrets(serialized) {
|
|
146047
146272
|
const hits = secretFindings([{ path: "book.json", bytes: Buffer.from(serialized) }]);
|
|
146048
|
-
const
|
|
146049
|
-
if (hits.length ||
|
|
146273
|
+
const own4 = TOKEN_PATTERNS.find((re2) => new RegExp(re2.source, re2.flags.replace("g", "")).test(serialized));
|
|
146274
|
+
if (hits.length || own4) {
|
|
146050
146275
|
throw new Error(`refusing to write the app book: it still contains ${hits[0]?.reason ?? "a token-shaped string"} after redaction`);
|
|
146051
146276
|
}
|
|
146052
146277
|
}
|
|
@@ -146243,7 +146468,7 @@ __export(store_iap_exports, {
|
|
|
146243
146468
|
runStoreIap: () => runStoreIap
|
|
146244
146469
|
});
|
|
146245
146470
|
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
146246
|
-
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync32, readFileSync as
|
|
146471
|
+
import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync32, readFileSync as readFileSync81, rmSync as rmSync16, writeFileSync as writeFileSync27 } from "node:fs";
|
|
146247
146472
|
import { homedir as homedir7, hostname } from "node:os";
|
|
146248
146473
|
import { join as join67 } from "node:path";
|
|
146249
146474
|
function scrubDeep(value, scrub) {
|
|
@@ -146571,7 +146796,7 @@ function fileJournal(path2) {
|
|
|
146571
146796
|
}
|
|
146572
146797
|
function readLockSummary(path2) {
|
|
146573
146798
|
try {
|
|
146574
|
-
const { pid, host, at: at2 } = JSON.parse(
|
|
146799
|
+
const { pid, host, at: at2 } = JSON.parse(readFileSync81(path2, "utf8"));
|
|
146575
146800
|
return `pid ${pid} on ${host} since ${at2}`;
|
|
146576
146801
|
} catch {
|
|
146577
146802
|
return "unreadable lock";
|
|
@@ -146581,7 +146806,7 @@ function acquireApplyLock(dir, appleAppId) {
|
|
|
146581
146806
|
const path2 = join67(dir, "apply.lock");
|
|
146582
146807
|
const stamp = JSON.stringify({ pid: process.pid, host: hostname(), at: (/* @__PURE__ */ new Date()).toISOString(), token: randomUUID5() });
|
|
146583
146808
|
try {
|
|
146584
|
-
|
|
146809
|
+
writeFileSync27(path2, stamp, { flag: "wx", mode: 384 });
|
|
146585
146810
|
} catch (e2) {
|
|
146586
146811
|
if (e2.code !== "EEXIST") throw e2;
|
|
146587
146812
|
throw new Error(
|
|
@@ -146591,7 +146816,7 @@ function acquireApplyLock(dir, appleAppId) {
|
|
|
146591
146816
|
return () => {
|
|
146592
146817
|
let current = "";
|
|
146593
146818
|
try {
|
|
146594
|
-
current =
|
|
146819
|
+
current = readFileSync81(path2, "utf8");
|
|
146595
146820
|
} catch {
|
|
146596
146821
|
return;
|
|
146597
146822
|
}
|
|
@@ -146615,7 +146840,7 @@ async function confirmOnTerminal(question) {
|
|
|
146615
146840
|
}
|
|
146616
146841
|
function defaultStoreIapDeps() {
|
|
146617
146842
|
return {
|
|
146618
|
-
readFile: (path2) =>
|
|
146843
|
+
readFile: (path2) => readFileSync81(path2, "utf8"),
|
|
146619
146844
|
writeFileAtomic,
|
|
146620
146845
|
resolveCredentials: ({ profileFlag, target }) => resolveIapCredentials({ profileFlag, target }),
|
|
146621
146846
|
createApi: (key2) => createIapApi(createAscClient({ key: key2 })),
|
|
@@ -147078,7 +147303,7 @@ __export(preflight_app_exports, {
|
|
|
147078
147303
|
preflightApp: () => preflightApp,
|
|
147079
147304
|
profileAccount: () => profileAccount
|
|
147080
147305
|
});
|
|
147081
|
-
import { readFileSync as
|
|
147306
|
+
import { readFileSync as readFileSync82, existsSync as existsSync68, readdirSync as readdirSync31, statSync as statSync18 } from "node:fs";
|
|
147082
147307
|
import { createHash as createHash34 } from "node:crypto";
|
|
147083
147308
|
import { join as join68 } from "node:path";
|
|
147084
147309
|
function analyze(projectYml, storeConfig, icon, account) {
|
|
@@ -147144,8 +147369,8 @@ function profileAccount(app, storeConfig, opts = {}) {
|
|
|
147144
147369
|
}
|
|
147145
147370
|
}
|
|
147146
147371
|
async function preflightApp(app, opts = {}) {
|
|
147147
|
-
const projectYml = existsSync68(iosProjectYml(app)) ?
|
|
147148
|
-
const storeConfig = existsSync68(storeConfigPath(app)) ?
|
|
147372
|
+
const projectYml = existsSync68(iosProjectYml(app)) ? readFileSync82(iosProjectYml(app), "utf8") : "";
|
|
147373
|
+
const storeConfig = existsSync68(storeConfigPath(app)) ? readFileSync82(storeConfigPath(app), "utf8") : "";
|
|
147149
147374
|
if (!storeConfig) return [{ level: "error", message: `no apps/${app}/store/store.config.yaml \u2014 run /setup-store-signing first.` }];
|
|
147150
147375
|
const findings = analyze(
|
|
147151
147376
|
projectYml,
|
|
@@ -147304,7 +147529,7 @@ function playListingAssets(app, locale = "en-US") {
|
|
|
147304
147529
|
for (const name of names) {
|
|
147305
147530
|
const p2 = join68(dir, name);
|
|
147306
147531
|
try {
|
|
147307
|
-
if (statSync18(p2).isFile()) return { name, bytes:
|
|
147532
|
+
if (statSync18(p2).isFile()) return { name, bytes: readFileSync82(p2) };
|
|
147308
147533
|
} catch {
|
|
147309
147534
|
}
|
|
147310
147535
|
}
|
|
@@ -147344,7 +147569,7 @@ function listScreenshots(app, locale = "en-US") {
|
|
|
147344
147569
|
const flat = join68(storeDir(app), "screenshots", locale);
|
|
147345
147570
|
if (existsSync68(flat)) {
|
|
147346
147571
|
for (const png of readdirSync31(flat).filter((n2) => n2.endsWith(".png"))) {
|
|
147347
|
-
const sz = pngSize(
|
|
147572
|
+
const sz = pngSize(readFileSync82(join68(flat, png)));
|
|
147348
147573
|
if (sz) out2.push({ name: png, w: sz.w, h: sz.h });
|
|
147349
147574
|
}
|
|
147350
147575
|
}
|
|
@@ -147354,7 +147579,7 @@ function listScreenshots(app, locale = "en-US") {
|
|
|
147354
147579
|
const d2 = join68(legacy, deviceDir);
|
|
147355
147580
|
if (!statSync18(d2).isDirectory()) continue;
|
|
147356
147581
|
for (const png of readdirSync31(d2).filter((n2) => n2.endsWith(".png"))) {
|
|
147357
|
-
const sz = pngSize(
|
|
147582
|
+
const sz = pngSize(readFileSync82(join68(d2, png)));
|
|
147358
147583
|
if (sz) out2.push({ name: `${deviceDir}/${png}`, w: sz.w, h: sz.h });
|
|
147359
147584
|
}
|
|
147360
147585
|
}
|
|
@@ -147368,7 +147593,7 @@ function placeholderHashes2() {
|
|
|
147368
147593
|
const p2 = join68(templateIos, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
|
|
147369
147594
|
try {
|
|
147370
147595
|
if (!statSync18(p2).isFile()) continue;
|
|
147371
|
-
return [LEGACY_PLACEHOLDER_SHA2562, createHash34("sha256").update(
|
|
147596
|
+
return [LEGACY_PLACEHOLDER_SHA2562, createHash34("sha256").update(readFileSync82(p2)).digest("hex")];
|
|
147372
147597
|
} catch {
|
|
147373
147598
|
}
|
|
147374
147599
|
}
|
|
@@ -147404,7 +147629,7 @@ async function appIconState(iosDir) {
|
|
|
147404
147629
|
const p2 = join68(iosDir, target, "Assets.xcassets", "AppIcon.appiconset", "icon_1024.png");
|
|
147405
147630
|
try {
|
|
147406
147631
|
if (!statSync18(p2).isFile()) continue;
|
|
147407
|
-
const bytes2 =
|
|
147632
|
+
const bytes2 = readFileSync82(p2);
|
|
147408
147633
|
const hash = createHash34("sha256").update(bytes2).digest("hex");
|
|
147409
147634
|
const pixels = await pixelIssues(bytes2);
|
|
147410
147635
|
return {
|
|
@@ -147465,92 +147690,6 @@ var init_preflight_app = __esm({
|
|
|
147465
147690
|
}
|
|
147466
147691
|
});
|
|
147467
147692
|
|
|
147468
|
-
// ../store-release/version.ts
|
|
147469
|
-
var version_exports = {};
|
|
147470
|
-
__export(version_exports, {
|
|
147471
|
-
bumpVersion: () => bumpVersion,
|
|
147472
|
-
readAndroidVersion: () => readAndroidVersion,
|
|
147473
|
-
readAndroidVersionName: () => readAndroidVersionName,
|
|
147474
|
-
readIosMarketingVersion: () => readIosMarketingVersion,
|
|
147475
|
-
readIosVersion: () => readIosVersion,
|
|
147476
|
-
setAndroidVersion: () => setAndroidVersion,
|
|
147477
|
-
setIosVersion: () => setIosVersion
|
|
147478
|
-
});
|
|
147479
|
-
import { readFileSync as readFileSync82, writeFileSync as writeFileSync27 } from "node:fs";
|
|
147480
|
-
function readIosVersion(projectYml) {
|
|
147481
|
-
const marketing = matchScalar(projectYml, "CFBundleShortVersionString");
|
|
147482
|
-
const build3 = matchScalar(projectYml, "CFBundleVersion");
|
|
147483
|
-
if (marketing === null || build3 === null) {
|
|
147484
|
-
throw new Error("project.yml is missing CFBundleShortVersionString / CFBundleVersion");
|
|
147485
|
-
}
|
|
147486
|
-
return { marketing, build: Number(build3) };
|
|
147487
|
-
}
|
|
147488
|
-
function setIosVersion(projectYml, v2) {
|
|
147489
|
-
let out2 = replaceScalar(projectYml, "CFBundleShortVersionString", v2.marketing);
|
|
147490
|
-
out2 = replaceScalar(out2, "CFBundleVersion", String(v2.build));
|
|
147491
|
-
out2 = out2.replace(
|
|
147492
|
-
/(^[ \t]*# >>> himalaya:live-activity:target[^\n]*\n)([\s\S]*?)(^[ \t]*# <<< himalaya:live-activity:target[^\n]*$)/m,
|
|
147493
|
-
(_match, start, body, end) => {
|
|
147494
|
-
if (!body.trim()) return start + body + end;
|
|
147495
|
-
return start + replaceScalar(replaceScalar(body, "CFBundleShortVersionString", v2.marketing), "CFBundleVersion", String(v2.build)) + end;
|
|
147496
|
-
}
|
|
147497
|
-
);
|
|
147498
|
-
return out2;
|
|
147499
|
-
}
|
|
147500
|
-
function readIosMarketingVersion(projectYml) {
|
|
147501
|
-
return matchScalar(projectYml, "CFBundleShortVersionString");
|
|
147502
|
-
}
|
|
147503
|
-
function scalarRe(key2) {
|
|
147504
|
-
return new RegExp(`^(\\s*${key2}:\\s*)("?)([^"\\n#]*?)("?)(\\s*(?:#.*)?)$`, "m");
|
|
147505
|
-
}
|
|
147506
|
-
function matchScalar(content, key2) {
|
|
147507
|
-
const m2 = scalarRe(key2).exec(content);
|
|
147508
|
-
return m2 ? m2[3].trim() : null;
|
|
147509
|
-
}
|
|
147510
|
-
function replaceScalar(content, key2, value) {
|
|
147511
|
-
const re2 = scalarRe(key2);
|
|
147512
|
-
if (!re2.test(content)) throw new Error(`could not locate \`${key2}:\` in project.yml`);
|
|
147513
|
-
return content.replace(re2, (_full, pre, openQ, _oldVal, _closeQ, tail) => {
|
|
147514
|
-
const q2 = openQ ? '"' : "";
|
|
147515
|
-
return `${pre}${q2}${value}${q2}${tail}`;
|
|
147516
|
-
});
|
|
147517
|
-
}
|
|
147518
|
-
function readAndroidVersion(gradle) {
|
|
147519
|
-
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
147520
|
-
const code = /(\bversionCode\s*=\s*)(\d+)/.exec(gradle);
|
|
147521
|
-
if (!name || !code) throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
147522
|
-
return { marketing: name[2], build: Number(code[2]) };
|
|
147523
|
-
}
|
|
147524
|
-
function readAndroidVersionName(gradle) {
|
|
147525
|
-
const name = /(\bversionName\s*=\s*")([^"]*)(")/.exec(gradle);
|
|
147526
|
-
return name ? name[2] : null;
|
|
147527
|
-
}
|
|
147528
|
-
function setAndroidVersion(gradle, v2) {
|
|
147529
|
-
if (!/\bversionName\s*=\s*"/.test(gradle) || !/\bversionCode\s*=\s*\d+/.test(gradle)) {
|
|
147530
|
-
throw new Error("build.gradle.kts is missing versionName / versionCode");
|
|
147531
|
-
}
|
|
147532
|
-
return gradle.replace(/(\bversionName\s*=\s*")[^"]*(")/, `$1${v2.marketing}$2`).replace(/(\bversionCode\s*=\s*)\d+/, `$1${v2.build}`);
|
|
147533
|
-
}
|
|
147534
|
-
function bumpVersion(app, opts) {
|
|
147535
|
-
const iosPath = iosProjectYml(app);
|
|
147536
|
-
const gradlePath = androidGradle(app);
|
|
147537
|
-
const iosYml = readFileSync82(iosPath, "utf8");
|
|
147538
|
-
const gradle = readFileSync82(gradlePath, "utf8");
|
|
147539
|
-
const current = readIosVersion(iosYml);
|
|
147540
|
-
const next = {
|
|
147541
|
-
marketing: opts.marketing ?? current.marketing,
|
|
147542
|
-
build: opts.build === "increment" || opts.build === void 0 ? current.build + (opts.build === "increment" ? 1 : 0) : opts.build
|
|
147543
|
-
};
|
|
147544
|
-
writeFileSync27(iosPath, setIosVersion(iosYml, next));
|
|
147545
|
-
writeFileSync27(gradlePath, setAndroidVersion(gradle, next));
|
|
147546
|
-
return next;
|
|
147547
|
-
}
|
|
147548
|
-
var init_version = __esm({
|
|
147549
|
-
"../store-release/version.ts"() {
|
|
147550
|
-
init_paths2();
|
|
147551
|
-
}
|
|
147552
|
-
});
|
|
147553
|
-
|
|
147554
147693
|
// ../store-release/asc-status.ts
|
|
147555
147694
|
var asc_status_exports = {};
|
|
147556
147695
|
__export(asc_status_exports, {
|
|
@@ -151706,9 +151845,9 @@ function routesFromBundle(js2) {
|
|
|
151706
151845
|
const code = codeMask(js2);
|
|
151707
151846
|
for (const m2 of js2.matchAll(/\bpath\s*:\s*["'`](\/[A-Za-z0-9_\-/:.*]*|\*)["'`]/g)) {
|
|
151708
151847
|
if (!code[m2.index]) continue;
|
|
151709
|
-
const
|
|
151848
|
+
const own4 = enclosingObject(js2, m2.index, code);
|
|
151710
151849
|
const before = js2.slice(Math.max(0, m2.index - 80), m2.index);
|
|
151711
|
-
if (!(
|
|
151850
|
+
if (!(own4 && ROUTE_KEY.test(own4)) && !NAV_LABEL_BEFORE.test(before)) continue;
|
|
151712
151851
|
out2.add(m2[1]);
|
|
151713
151852
|
if (out2.size >= MAX_ROUTES) break;
|
|
151714
151853
|
}
|
|
@@ -157022,8 +157161,8 @@ function catalogTypography(overlay, template) {
|
|
|
157022
157161
|
return { typography, notes };
|
|
157023
157162
|
}
|
|
157024
157163
|
function staticFaqFor(overlay, overlayPath) {
|
|
157025
|
-
const
|
|
157026
|
-
if (
|
|
157164
|
+
const own4 = overlay.faq;
|
|
157165
|
+
if (own4 !== void 0) return deriveStaticFaq(own4);
|
|
157027
157166
|
const bookPath = join74(dirname39(resolve54(overlayPath)), "book.json");
|
|
157028
157167
|
if (!existsSync71(bookPath)) return void 0;
|
|
157029
157168
|
try {
|
|
@@ -164682,8 +164821,8 @@ ${doNow.map((l2) => ` ${l2}`).join("\n")}`);
|
|
|
164682
164821
|
const dir = contentDir(flags);
|
|
164683
164822
|
try {
|
|
164684
164823
|
const spec = keepFromSpec2(dir, str9(flags["from-spec"]) ?? join75(dir, "SPEC.md"));
|
|
164685
|
-
const
|
|
164686
|
-
keep = [.../* @__PURE__ */ new Set([...spec.keep, ...
|
|
164824
|
+
const own4 = typeof keep === "string" ? keep.split(",").map((k2) => k2.trim()).filter(Boolean) : [];
|
|
164825
|
+
keep = [.../* @__PURE__ */ new Set([...spec.keep, ...own4])].join(",");
|
|
164687
164826
|
fromSpec = { fromSpec: {
|
|
164688
164827
|
keep: spec.keep,
|
|
164689
164828
|
specOnly: spec.specOnly,
|
|
@@ -168773,10 +168912,10 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
168773
168912
|
const dir = contentDir(flags);
|
|
168774
168913
|
if (!existsSync74(join75(dir, "himalaya.content.json"))) return;
|
|
168775
168914
|
const { lastDistFromJob: lastDistFromJob2, writeLastDist: writeLastDist2 } = await Promise.resolve().then(() => (init_capabilities(), capabilities_exports));
|
|
168776
|
-
const
|
|
168915
|
+
const own4 = await appId(dir);
|
|
168777
168916
|
for (const job of jobs2) {
|
|
168778
168917
|
const rec = lastDistFromJob2(job);
|
|
168779
|
-
if (!rec || rec.app !==
|
|
168918
|
+
if (!rec || rec.app !== own4) continue;
|
|
168780
168919
|
await writeLastDist2(dir, rec);
|
|
168781
168920
|
}
|
|
168782
168921
|
} catch {
|