@wix/himalaya-cli 0.1173.0 → 0.1175.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/stdlib/wix-sdk/stores-v1/src/extensions.d.ts +13 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/products-v3.d.ts +13 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +10 -3
- package/dist/cli.mjs +66 -23
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/sdk-reference.json +15 -3
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +63 -41
- package/templates/beauty-salon-owner/dev/index.ts +172 -6
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
- package/templates/branded-lite/dev/index.ts +71 -47
- package/templates/community-club/dev/index.ts +63 -41
- package/templates/community-club-owner/dev/index.ts +257 -8
- package/templates/community-club-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/community-club-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
- package/templates/community-club-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
- package/templates/community-club-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/community-club-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
- package/templates/events-meetups/dev/index.ts +63 -41
- package/templates/events-meetups-owner/dev/index.ts +87 -4
- package/templates/events-meetups-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/gym-fitness/dev/index.ts +63 -41
- package/templates/gym-fitness-owner/dev/index.ts +257 -8
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
- package/templates/nonprofit-cause/dev/index.ts +63 -41
- package/templates/nonprofit-cause-owner/dev/index.ts +87 -4
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/owner-lite/dev/index.ts +512 -17
- package/templates/owner-lite/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/owner-lite/tier5-src/_shared/owner-rich-guard.ts +1 -9
- package/templates/owner-lite/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
- package/templates/owner-lite/tier5-src/himi-owner-lite-faq-question-form/index.ts +77 -10
- package/templates/owner-lite/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/owner-lite/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
- package/templates/podcast-creator/dev/index.ts +63 -41
- package/templates/podcast-creator-owner/dev/index.ts +257 -8
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
- package/templates/portfolio-creative/dev/index.ts +63 -41
- package/templates/portfolio-creative-owner/dev/index.ts +172 -6
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
- package/templates/restaurant/dev/index.ts +71 -47
- package/templates/restaurant-owner/dev/index.ts +257 -8
- package/templates/restaurant-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/restaurant-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
- package/templates/retail-store/dev/index.ts +63 -41
- package/templates/retail-store-owner/dev/index.ts +172 -6
- package/templates/retail-store-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/retail-store-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
- package/templates/yoga-studio/dev/index.ts +63 -41
- package/templates/yoga-studio-owner/dev/index.ts +87 -4
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
- package/templates/events-meetups-owner/tier5-src/_shared/owner-rich-guard.ts +0 -35
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-rich-guard.ts +0 -35
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-rich-guard.ts +0 -35
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import type { WixProductWrite, WixCreateProductResponse, WixUpdateProductResponse, WixDeleteProductResponse } from "./index.js";
|
|
2
2
|
import type { WixQueryProductsRequest, WixQueryProductsResponse, WixGetProductResponse } from "./index.js";
|
|
3
|
+
import { type V3RichContent } from "./products-v3.js";
|
|
4
|
+
/** [rico] #3373 — the Catalog-V3 Ricos description. */
|
|
5
|
+
export type WixProductRichContent = V3RichContent;
|
|
6
|
+
export type WixProductRichWrite = WixProductWrite & {
|
|
7
|
+
richDescription?: WixProductRichContent;
|
|
8
|
+
};
|
|
3
9
|
/** Query products from whichever catalog this site runs. The V1 request shape
|
|
4
10
|
* (`{query:{paging:{limit,offset}}}`) is the SDK's contract; the V3 arm maps it
|
|
5
11
|
* onto cursor paging and reshapes each product back to the V1 layout. */
|
|
6
12
|
export declare function queryProducts(req?: WixQueryProductsRequest): Promise<WixQueryProductsResponse>;
|
|
7
|
-
/** Read one product from whichever catalog this site runs.
|
|
8
|
-
|
|
13
|
+
/** Read one product from whichever catalog this site runs. `opts.richDescription` (Catalog V3) also asks
|
|
14
|
+
* for the Ricos `description` and returns it as `product.richDescription` (null when the product has
|
|
15
|
+
* none). The key is ABSENT on a V1 catalog, which has no Ricos description, and without the option. */
|
|
16
|
+
export declare function getProduct(productId: string, opts?: {
|
|
17
|
+
richDescription?: boolean;
|
|
18
|
+
}): Promise<WixGetProductResponse>;
|
|
9
19
|
/** Create a product. V1: `POST /stores/v1/products`. V3: `POST /stores/v3/products`
|
|
10
20
|
* with the write model mapped onto V3's variants shape (see products-v3.ts). */
|
|
11
21
|
export declare function createProduct(product: WixProductWrite): Promise<WixCreateProductResponse>;
|
|
12
22
|
/** Update a product. V1: a plain `PATCH` of the supplied fields. V3: requires the
|
|
13
23
|
* CURRENT `revision`, and rewrites the whole variants array when the patch reaches
|
|
14
24
|
* a variant-level field (price/sku) — so that arm reads the product first. */
|
|
15
|
-
export declare function updateProduct(productId: string, product:
|
|
25
|
+
export declare function updateProduct(productId: string, product: WixProductRichWrite): Promise<WixUpdateProductResponse>;
|
|
16
26
|
/** Delete a product — `DELETE /stores/v{1,3}/products/{id}`; same shape either way. */
|
|
17
27
|
export declare function deleteProduct(productId: string): Promise<WixDeleteProductResponse>;
|
|
18
28
|
export interface WixInventoryVariant {
|
|
@@ -12,6 +12,13 @@ export interface V3Variant {
|
|
|
12
12
|
};
|
|
13
13
|
choices?: unknown[];
|
|
14
14
|
}
|
|
15
|
+
/** [rico] #3373 — Catalog V3's Ricos `description`. `plainDescription` is the SAME field rendered as HTML:
|
|
16
|
+
* V3 derives one from the other, so a write sends only `description`. */
|
|
17
|
+
export interface V3RichContent {
|
|
18
|
+
nodes?: unknown[];
|
|
19
|
+
metadata?: unknown;
|
|
20
|
+
documentStyle?: unknown;
|
|
21
|
+
}
|
|
15
22
|
export interface V3Product {
|
|
16
23
|
id?: string;
|
|
17
24
|
revision?: string;
|
|
@@ -20,6 +27,7 @@ export interface V3Product {
|
|
|
20
27
|
productType?: string;
|
|
21
28
|
physicalProperties?: Record<string, unknown>;
|
|
22
29
|
plainDescription?: string;
|
|
30
|
+
description?: V3RichContent;
|
|
23
31
|
visible?: boolean;
|
|
24
32
|
variantsInfo?: {
|
|
25
33
|
variants?: V3Variant[];
|
|
@@ -43,6 +51,8 @@ export declare const V3_WRITE_FIELDS: readonly ["CURRENCY", "PLAIN_DESCRIPTION"]
|
|
|
43
51
|
* `"MEDIA_ITEMS_INFO"` to the `fields` array.
|
|
44
52
|
*/
|
|
45
53
|
export declare const V3_READ_FIELDS: readonly ["CURRENCY", "URL", "PLAIN_DESCRIPTION", "MEDIA_ITEMS_INFO"];
|
|
54
|
+
/** A single-product read that also carries the Ricos `description` (an owner product form). */
|
|
55
|
+
export declare const V3_DETAIL_READ_FIELDS: readonly ["CURRENCY", "URL", "PLAIN_DESCRIPTION", "MEDIA_ITEMS_INFO", "DESCRIPTION"];
|
|
46
56
|
/** Most a single V3 products query will return. Bounds the offset emulation in
|
|
47
57
|
* `queryProducts` (V3 pages by cursor; the SDK's callers page by offset). */
|
|
48
58
|
export declare const V3_MAX_QUERY_LIMIT = 100;
|
|
@@ -123,4 +133,6 @@ export declare function touchesVariant(p: WixProductWrite): boolean;
|
|
|
123
133
|
* delete the others), and `options` must ride along because variants and options
|
|
124
134
|
* are mutually dependent.
|
|
125
135
|
*/
|
|
126
|
-
export declare function toV3Update(productId: string, patch: WixProductWrite
|
|
136
|
+
export declare function toV3Update(productId: string, patch: WixProductWrite & {
|
|
137
|
+
richDescription?: V3RichContent;
|
|
138
|
+
}, current: V3Product): V3Product;
|
|
@@ -134,6 +134,7 @@ async function resolveCatalogVersion() {
|
|
|
134
134
|
// ../../stdlib/wix-sdk/stores-v1/src/products-v3.ts
|
|
135
135
|
var V3_WRITE_FIELDS = ["CURRENCY", "PLAIN_DESCRIPTION"];
|
|
136
136
|
var V3_READ_FIELDS = ["CURRENCY", "URL", "PLAIN_DESCRIPTION", "MEDIA_ITEMS_INFO"];
|
|
137
|
+
var V3_DETAIL_READ_FIELDS = [...V3_READ_FIELDS, "DESCRIPTION"];
|
|
137
138
|
var V3_MAX_QUERY_LIMIT = 100;
|
|
138
139
|
var V3_VARIANT_READ_FIELDS = ["VARIANT_OPTION_CHOICE_NAMES", "CURRENCY"];
|
|
139
140
|
function toV3ProductType(productType) {
|
|
@@ -193,9 +194,11 @@ function touchesVariant(p) {
|
|
|
193
194
|
return p.priceData?.price !== void 0 || p.sku !== void 0;
|
|
194
195
|
}
|
|
195
196
|
function toV3Update(productId, patch, current) {
|
|
197
|
+
if (patch.description !== void 0 && patch.richDescription !== void 0) throw new Error("updateProduct: send description OR richDescription, not both (Catalog V3 derives one from the other)");
|
|
196
198
|
const out = { id: productId, revision: current.revision };
|
|
197
199
|
if (patch.name !== void 0) out.name = patch.name;
|
|
198
200
|
if (patch.description !== void 0) out.plainDescription = patch.description;
|
|
201
|
+
if (patch.richDescription !== void 0) out.description = patch.richDescription;
|
|
199
202
|
if (patch.visible !== void 0) out.visible = patch.visible;
|
|
200
203
|
if (touchesVariant(patch)) {
|
|
201
204
|
const existing = current.variantsInfo?.variants ?? [];
|
|
@@ -724,16 +727,19 @@ function queryProducts(req = {}) {
|
|
|
724
727
|
return { products: page.map(fromV3Product) };
|
|
725
728
|
});
|
|
726
729
|
}
|
|
727
|
-
function getProduct(productId) {
|
|
730
|
+
function getProduct(productId, opts = {}) {
|
|
728
731
|
if (!productId) throw new Error("getProduct: productId is required");
|
|
729
732
|
const id = encodeURIComponent(productId);
|
|
733
|
+
const fields = opts.richDescription ? V3_DETAIL_READ_FIELDS : V3_READ_FIELDS;
|
|
730
734
|
return readWithCatalogFallback(async (v) => {
|
|
731
735
|
if (v === "v1") return wixCall("GET", `/stores/v1/products/${id}`);
|
|
732
736
|
const res = await wixCall(
|
|
733
737
|
"GET",
|
|
734
|
-
`/stores/v3/products/${id}?${
|
|
738
|
+
`/stores/v3/products/${id}?${fields.map((f) => `fields=${f}`).join("&")}`
|
|
735
739
|
);
|
|
736
|
-
|
|
740
|
+
if (!res.product) return { product: void 0 };
|
|
741
|
+
const product = fromV3Product(res.product);
|
|
742
|
+
return { product: opts.richDescription ? { ...product, richDescription: res.product.description ?? null } : product };
|
|
737
743
|
});
|
|
738
744
|
}
|
|
739
745
|
async function createProduct(product) {
|
|
@@ -747,6 +753,7 @@ async function createProduct(product) {
|
|
|
747
753
|
}
|
|
748
754
|
async function updateProduct(productId, product) {
|
|
749
755
|
if (await resolveCatalogVersion() === "v1") {
|
|
756
|
+
if (product.richDescription !== void 0) throw new Error("updateProduct: richDescription is Catalog V3 only (a V1 description is HTML)");
|
|
750
757
|
return wixCall("PATCH", `/stores/v1/products/${productId}`, { product });
|
|
751
758
|
}
|
|
752
759
|
const current = await wixCall(
|
package/dist/cli.mjs
CHANGED
|
@@ -24519,6 +24519,7 @@ function shouldRevealError(args) {
|
|
|
24519
24519
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
24520
24520
|
var init_validation = __esm({
|
|
24521
24521
|
"../../core/ts/src/validation.ts"() {
|
|
24522
|
+
"use strict";
|
|
24522
24523
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
24523
24524
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
24524
24525
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -25178,6 +25179,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
25178
25179
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
25179
25180
|
var init_worker_subtree = __esm({
|
|
25180
25181
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
25182
|
+
"use strict";
|
|
25181
25183
|
init_worker_subtree_safe_types_generated();
|
|
25182
25184
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
25183
25185
|
maxEncodedBytes: 65536,
|
|
@@ -30829,6 +30831,7 @@ function hasContributed(bag, fieldId) {
|
|
|
30829
30831
|
}
|
|
30830
30832
|
function createFormBag() {
|
|
30831
30833
|
const subs = /* @__PURE__ */ new Set();
|
|
30834
|
+
const preSubmit = /* @__PURE__ */ new Set();
|
|
30832
30835
|
const notify = () => {
|
|
30833
30836
|
bag.version++;
|
|
30834
30837
|
for (const cb of subs) cb();
|
|
@@ -30879,6 +30882,15 @@ function createFormBag() {
|
|
|
30879
30882
|
return () => {
|
|
30880
30883
|
subs.delete(cb);
|
|
30881
30884
|
};
|
|
30885
|
+
},
|
|
30886
|
+
onBeforeSubmit(cb) {
|
|
30887
|
+
preSubmit.add(cb);
|
|
30888
|
+
return () => {
|
|
30889
|
+
preSubmit.delete(cb);
|
|
30890
|
+
};
|
|
30891
|
+
},
|
|
30892
|
+
beforeSubmit() {
|
|
30893
|
+
for (const cb of Array.from(preSubmit)) cb();
|
|
30882
30894
|
}
|
|
30883
30895
|
};
|
|
30884
30896
|
return bag;
|
|
@@ -31369,6 +31381,12 @@ function createRicosHostSession(o) {
|
|
|
31369
31381
|
o.send({ v: 1, type: "requestContent", requestId: requestId2 });
|
|
31370
31382
|
});
|
|
31371
31383
|
},
|
|
31384
|
+
flushOnChange() {
|
|
31385
|
+
if (dirtyTimer === null || disposed || state.unavailable) return;
|
|
31386
|
+
t.clearTimeout(dirtyTimer);
|
|
31387
|
+
dirtyTimer = null;
|
|
31388
|
+
o.onDirty();
|
|
31389
|
+
},
|
|
31372
31390
|
focus() {
|
|
31373
31391
|
if (state.ready) o.send({ v: 1, type: "focus" });
|
|
31374
31392
|
},
|
|
@@ -31634,7 +31652,11 @@ function RichContentEditorView({ props, ctx, wrap, nodeId, renderChild, ...dom }
|
|
|
31634
31652
|
bag.register(name, void 0);
|
|
31635
31653
|
const current = sessionRef.current?.currentContent();
|
|
31636
31654
|
if (current != null) bag.set(name, current);
|
|
31637
|
-
|
|
31655
|
+
const off = bag.onBeforeSubmit(() => sessionRef.current?.flushOnChange());
|
|
31656
|
+
return () => {
|
|
31657
|
+
off();
|
|
31658
|
+
bag.unregister(name);
|
|
31659
|
+
};
|
|
31638
31660
|
}, [bag, name]);
|
|
31639
31661
|
const fireOnChange = () => {
|
|
31640
31662
|
const act = onChangeRef.current;
|
|
@@ -35233,6 +35255,12 @@ function renderInner(node, ctx) {
|
|
|
35233
35255
|
}
|
|
35234
35256
|
);
|
|
35235
35257
|
const fieldLabel = asBoundText(props.label, ctx);
|
|
35258
|
+
if (isTextKind && typeof props.label === "string" && props.label) {
|
|
35259
|
+
inner.modifiers = { accessibilityLabel: props.label };
|
|
35260
|
+
}
|
|
35261
|
+
if (isTextKind && typeof props.helpText === "string" && props.helpText) {
|
|
35262
|
+
inner.modifiers = { ...inner.modifiers ?? {}, accessibilityHint: props.helpText };
|
|
35263
|
+
}
|
|
35236
35264
|
const showOwnError = !isTextKind && props.errorMessage;
|
|
35237
35265
|
return /* @__PURE__ */ jsxs5("div", { style: { width: "100%", ...wrap }, children: [
|
|
35238
35266
|
(fieldLabel || props.required) && /* @__PURE__ */ jsxs5("div", { style: { fontFamily: bodyFont(ctx), fontWeight: 600, fontSize: pxToRem(13), color: C("textPrimary", "#111"), marginBottom: 6 }, children: [
|
|
@@ -35761,13 +35789,18 @@ var init_renderNode = __esm({
|
|
|
35761
35789
|
AUTOCAPITALIZE_VALUES = /* @__PURE__ */ new Set(["none", "words", "sentences", "characters"]);
|
|
35762
35790
|
ENTER_KEY_HINTS = /* @__PURE__ */ new Set(["done", "go", "next", "send", "search"]);
|
|
35763
35791
|
AUTOGROW_CEILING = 12;
|
|
35764
|
-
EditableField = ({ props, ctx, wrap, multiline, id: htmlId, "data-component-id": componentId, "data-component-type": componentType, tabIndex: tabIndexProp, "data-hm-synthetic-tabindex": tabIndexIsSynthetic, "data-himalaya-initial-focus": initialFocusMarker, "aria-live": ariaLive, "aria-atomic": ariaAtomic, "aria-relevant": ariaRelevant, "aria-label": ariaLabelProp }) => {
|
|
35792
|
+
EditableField = ({ props, ctx, wrap, multiline, id: htmlId, "data-component-id": componentId, "data-component-type": componentType, tabIndex: tabIndexProp, "data-hm-synthetic-tabindex": tabIndexIsSynthetic, "data-himalaya-initial-focus": initialFocusMarker, "aria-live": ariaLive, "aria-atomic": ariaAtomic, "aria-relevant": ariaRelevant, "aria-label": ariaLabelProp, "aria-describedby": describedByProp }) => {
|
|
35765
35793
|
const tabIndex = tabIndexIsSynthetic === true ? void 0 : tabIndexProp;
|
|
35766
35794
|
const a11yFwd = { tabIndex, "data-himalaya-initial-focus": initialFocusMarker, "aria-live": ariaLive, "aria-atomic": ariaAtomic, "aria-relevant": ariaRelevant };
|
|
35767
35795
|
const C = ctx.color;
|
|
35768
35796
|
const ctrl = props.text ?? props.value;
|
|
35769
35797
|
const cfg = ctrl && typeof ctrl === "object" ? ctrl : {};
|
|
35770
|
-
const
|
|
35798
|
+
const rawPlaceholder = props.placeholder ?? cfg.placeholder;
|
|
35799
|
+
const resolvedPlaceholder = useResolvedScalar(rawPlaceholder, ctx);
|
|
35800
|
+
const placeholderIsBinding = isBinding(rawPlaceholder);
|
|
35801
|
+
const placeholder2 = rawPlaceholder == null || placeholderIsBinding && resolvedPlaceholder == null ? "Type here\u2026" : placeholderIsBinding ? asTextL10n(resolvedPlaceholder, ctx) : asText2(rawPlaceholder);
|
|
35802
|
+
const prefixText = useBoundString(props.prefix, ctx);
|
|
35803
|
+
const suffixText = useBoundString(props.suffix, ctx);
|
|
35771
35804
|
const valueBinding = typeof ctrl === "string" ? ctrl : cfg.value;
|
|
35772
35805
|
const onChangeAction = props.onChange ?? cfg.onChange;
|
|
35773
35806
|
const borderless = props.borderless === true || cfg.borderless === true;
|
|
@@ -35806,10 +35839,18 @@ var init_renderNode = __esm({
|
|
|
35806
35839
|
const errorBindingRaw = props.errorPath ?? cfg.errorPath;
|
|
35807
35840
|
const errorBinding = typeof errorBindingRaw === "string" && isBinding(errorBindingRaw) ? errorBindingRaw : "";
|
|
35808
35841
|
const boundError = useBoundValue(ctx, errorBinding);
|
|
35809
|
-
const
|
|
35842
|
+
const errorTextRaw = props.errorText ?? cfg.errorText;
|
|
35843
|
+
const errorTextResolved = useBoundString(errorTextRaw, ctx);
|
|
35844
|
+
const workerError = typeof boundError === "string" ? boundError : errorTextRaw == null ? void 0 : errorTextResolved;
|
|
35810
35845
|
const [touched, setTouched] = React7.useState(false);
|
|
35811
35846
|
const [isFocused, setIsFocused] = React7.useState(false);
|
|
35812
|
-
const
|
|
35847
|
+
const validationCatalog = React7.useMemo(
|
|
35848
|
+
() => ctx.catalog ? new Proxy({}, { get: (_t, k) => typeof k === "string" ? ctx.catalog.get(k) : void 0 }) : void 0,
|
|
35849
|
+
[ctx.catalog]
|
|
35850
|
+
);
|
|
35851
|
+
const rawMessage = errorMessageFor({ rule, value: local, workerError, catalog: validationCatalog });
|
|
35852
|
+
const resolvedMessage = useBoundString(rawMessage ?? "", ctx);
|
|
35853
|
+
const message = rawMessage === null || !resolvedMessage.trim() ? null : resolvedMessage;
|
|
35813
35854
|
const revealed = message !== null && shouldRevealError({
|
|
35814
35855
|
rule,
|
|
35815
35856
|
hasWorkerError: Boolean(workerError && workerError.trim()),
|
|
@@ -35907,9 +35948,9 @@ var init_renderNode = __esm({
|
|
|
35907
35948
|
return /* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" }, children: [
|
|
35908
35949
|
/* @__PURE__ */ jsxs5("div", { style: box, children: [
|
|
35909
35950
|
props.leadingIcon && accIcon(props.leadingIcon),
|
|
35910
|
-
|
|
35911
|
-
multilineBox ? /* @__PURE__ */ jsx8("textarea", { "data-component-id": componentId, id: htmlId, "data-component-type": componentType, ...a11yFwd, ref: inputRef, value: local, onChange: onInput, onFocus: onFieldFocus, onBlur: onFieldBlur, placeholder: placeholder2, rows: 2, "aria-label": ariaLabelProp ?? placeholder2, "aria-invalid": errored || void 0, "aria-describedby": errorId, inputMode, autoCapitalize, maxLength, autoCorrect: suggestOff ? "off" : suggestOn ? "on" : void 0, spellCheck: suggestOff ? false : suggestOn ? true : void 0, autoComplete: suggestOff ? "off" : void 0, style: inputBase }) : /* @__PURE__ */ jsx8("input", { "data-component-id": componentId, id: htmlId, "data-component-type": componentType, ...a11yFwd, ref: inputRef, type: secure ? "password" : "text", value: local, onChange: onInput, onKeyDown, onFocus: onFieldFocus, onBlur: onFieldBlur, placeholder: placeholder2, "aria-label": ariaLabelProp ?? placeholder2, "aria-invalid": errored || void 0, "aria-describedby": errorId, inputMode, autoCapitalize, maxLength, autoCorrect: suggestOff ? "off" : suggestOn ? "on" : void 0, spellCheck: suggestOff ? false : suggestOn ? true : void 0, autoComplete: suggestOff ? "off" : void 0, enterKeyHint, style: inputBase }),
|
|
35912
|
-
|
|
35951
|
+
prefixText && /* @__PURE__ */ jsx8("span", { style: { color: muted, flex: "none" }, children: prefixText }),
|
|
35952
|
+
multilineBox ? /* @__PURE__ */ jsx8("textarea", { "data-component-id": componentId, id: htmlId, "data-component-type": componentType, ...a11yFwd, ref: inputRef, value: local, onChange: onInput, onFocus: onFieldFocus, onBlur: onFieldBlur, placeholder: placeholder2, rows: 2, "aria-label": ariaLabelProp ?? placeholder2, "aria-invalid": errored || void 0, "aria-describedby": [errorId, describedByProp].filter(Boolean).join(" ") || void 0, inputMode, autoCapitalize, maxLength, autoCorrect: suggestOff ? "off" : suggestOn ? "on" : void 0, spellCheck: suggestOff ? false : suggestOn ? true : void 0, autoComplete: suggestOff ? "off" : void 0, style: inputBase }) : /* @__PURE__ */ jsx8("input", { "data-component-id": componentId, id: htmlId, "data-component-type": componentType, ...a11yFwd, ref: inputRef, type: secure ? "password" : "text", value: local, onChange: onInput, onKeyDown, onFocus: onFieldFocus, onBlur: onFieldBlur, placeholder: placeholder2, "aria-label": ariaLabelProp ?? placeholder2, "aria-invalid": errored || void 0, "aria-describedby": [errorId, describedByProp].filter(Boolean).join(" ") || void 0, inputMode, autoCapitalize, maxLength, autoCorrect: suggestOff ? "off" : suggestOn ? "on" : void 0, spellCheck: suggestOff ? false : suggestOn ? true : void 0, autoComplete: suggestOff ? "off" : void 0, enterKeyHint, style: inputBase }),
|
|
35953
|
+
suffixText && /* @__PURE__ */ jsx8("span", { style: { color: muted, flex: "none" }, children: suffixText }),
|
|
35913
35954
|
props.clearButton && local && /* @__PURE__ */ jsx8("span", { onClick: () => {
|
|
35914
35955
|
setLocal("");
|
|
35915
35956
|
emit("");
|
|
@@ -36094,6 +36135,7 @@ var init_renderNode = __esm({
|
|
|
36094
36135
|
bag.markSubmitAttempted();
|
|
36095
36136
|
return;
|
|
36096
36137
|
}
|
|
36138
|
+
bag.beforeSubmit();
|
|
36097
36139
|
const merged = { ...action?.args ?? {}, ...bag.values };
|
|
36098
36140
|
ctx.onAction?.({ ...action, args: merged });
|
|
36099
36141
|
}
|
|
@@ -38439,6 +38481,7 @@ var init_renderNode = __esm({
|
|
|
38439
38481
|
return /* @__PURE__ */ jsxs5("div", { ...{ [A11Y_PART]: "root" }, style: { width: "100%", ...wrap }, children: [
|
|
38440
38482
|
/* @__PURE__ */ jsxs5("div", { style: { position: "relative", height: Math.min(props.expandedHeight ?? 120, 160), borderRadius: ctx.radius("md", 10), overflow: "hidden", background: imageUrl ? void 0 : `linear-gradient(135deg, ${C("accentPrimary", "#116DFF")}, ${C("accentSecondary", "#0E5FE3")})` }, children: [
|
|
38441
38483
|
imageUrl && /* @__PURE__ */ jsx8("img", { src: imageUrl, alt: "", style: { width: "100%", height: "100%", objectFit: "cover" } }),
|
|
38484
|
+
imageUrl && /* @__PURE__ */ jsx8("div", { "data-testid": "collapsing-header-scrim", "aria-hidden": "true", style: { position: "absolute", left: 0, right: 0, bottom: 0, height: "60%", background: "linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.45))", pointerEvents: "none" } }),
|
|
38442
38485
|
/* @__PURE__ */ jsxs5("div", { style: { position: "absolute", left: 14, bottom: 12, color: "#fff", textShadow: "0 1px 4px rgba(0,0,0,.5)" }, children: [
|
|
38443
38486
|
/* @__PURE__ */ jsx8("div", { ...{ [A11Y_PART]: "node" }, role: "heading", "aria-level": 2, style: { fontFamily: ctx.font("title1").family || ctx.idiom && ctx.idiom !== "base" ? fontStack(ctx.font("title1").family, ctx.idiom) : '"Wix Madefor Display", system-ui', fontWeight: 700, fontSize: pxToRem(20) }, children: txt(props.title, ctx) }),
|
|
38444
38487
|
props.subtitle && /* @__PURE__ */ jsx8("div", { style: { fontSize: pxToRem(13), opacity: 0.9 }, children: txt(props.subtitle, ctx) })
|
|
@@ -60243,21 +60286,21 @@ var init_preview_assets_generated = __esm({
|
|
|
60243
60286
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
60244
60287
|
init_preview_assets_format();
|
|
60245
60288
|
PREVIEW_ASSET_MANIFEST = [
|
|
60246
|
-
{ key: "assets/index-
|
|
60247
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
60248
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
60249
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
60250
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
60251
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
60252
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
60253
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
60254
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
60255
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
60256
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
60257
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
60258
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
60259
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
60260
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
60289
|
+
{ key: "assets/index-DfY-tQ6i.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1132878, sha256: "3d63b2fab780ecf40caeff8f5576743a1dade0dd92e7cbc4fa9ee26a60985b7e" },
|
|
60290
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1132886, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
60291
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1137496, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
60292
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1626080, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
60293
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1717004, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
60294
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1807988, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
60295
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1898968, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
60296
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1989840, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
60297
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 2080820, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
60298
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2189456, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
60299
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2298540, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
60300
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2407588, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
60301
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2515288, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
60302
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 2603396, length: 4947, sha256: "4c476f213d92ec00b1f5e5fe4f88d458ccdd9cf6c6e7684f49f115f70930f9bb" },
|
|
60303
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2608343, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
60261
60304
|
];
|
|
60262
60305
|
}
|
|
60263
60306
|
});
|
|
Binary file
|
|
@@ -22202,6 +22202,18 @@
|
|
|
22202
22202
|
"decl": "export function addProductMedia(\n productId: string,\n opts?: WixCallOptions,\n): Promise<WixAddProductMediaResponse>;",
|
|
22203
22203
|
"http": "POST /stores/v1/products/{…}/media"
|
|
22204
22204
|
},
|
|
22205
|
+
{
|
|
22206
|
+
"name": "WixProductRichContent",
|
|
22207
|
+
"kind": "type",
|
|
22208
|
+
"jsdoc": "/** [rico] #3373 — the Catalog-V3 Ricos description. */",
|
|
22209
|
+
"decl": "export type WixProductRichContent = V3RichContent;"
|
|
22210
|
+
},
|
|
22211
|
+
{
|
|
22212
|
+
"name": "WixProductRichWrite",
|
|
22213
|
+
"kind": "type",
|
|
22214
|
+
"jsdoc": "",
|
|
22215
|
+
"decl": "export type WixProductRichWrite = WixProductWrite & { richDescription?: WixProductRichContent };"
|
|
22216
|
+
},
|
|
22205
22217
|
{
|
|
22206
22218
|
"name": "queryProducts",
|
|
22207
22219
|
"kind": "function",
|
|
@@ -22212,8 +22224,8 @@
|
|
|
22212
22224
|
{
|
|
22213
22225
|
"name": "getProduct",
|
|
22214
22226
|
"kind": "function",
|
|
22215
|
-
"jsdoc": "/** Read one product from whichever catalog this site runs. */",
|
|
22216
|
-
"decl": "export function getProduct(productId: string): Promise<WixGetProductResponse>;",
|
|
22227
|
+
"jsdoc": "/** Read one product from whichever catalog this site runs. `opts.richDescription` (Catalog V3) also asks\n * for the Ricos `description` and returns it as `product.richDescription` (null when the product has\n * none). The key is ABSENT on a V1 catalog, which has no Ricos description, and without the option. */",
|
|
22228
|
+
"decl": "export function getProduct(productId: string, opts: { richDescription?: boolean } = {}): Promise<WixGetProductResponse>;",
|
|
22217
22229
|
"http": "GET /stores/v1/products/{…}"
|
|
22218
22230
|
},
|
|
22219
22231
|
{
|
|
@@ -22227,7 +22239,7 @@
|
|
|
22227
22239
|
"name": "updateProduct",
|
|
22228
22240
|
"kind": "function",
|
|
22229
22241
|
"jsdoc": "/** Update a product. V1: a plain `PATCH` of the supplied fields. V3: requires the\n * CURRENT `revision`, and rewrites the whole variants array when the patch reaches\n * a variant-level field (price/sku) — so that arm reads the product first. */",
|
|
22230
|
-
"decl": "export async function updateProduct(productId: string, product:
|
|
22242
|
+
"decl": "export async function updateProduct(productId: string, product: WixProductRichWrite): Promise<WixUpdateProductResponse>;",
|
|
22231
22243
|
"http": "PATCH /stores/v1/products/{…}"
|
|
22232
22244
|
},
|
|
22233
22245
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1175.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"artifactId": "himalaya-cli"
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
"falconPackageHash": "
|
|
70
|
+
"falconPackageHash": "999c69dbc38f54c8d50554c6b57cd8fea4e4c0dcafad92b33458e139"
|
|
71
71
|
}
|
|
@@ -21353,50 +21353,72 @@ const SCREENS = runtimeSetting({
|
|
|
21353
21353
|
}
|
|
21354
21354
|
},
|
|
21355
21355
|
{
|
|
21356
|
-
"id": "himi_create_post.
|
|
21356
|
+
"id": "himi_create_post.form",
|
|
21357
21357
|
"body": {
|
|
21358
21358
|
"package": "himalaya",
|
|
21359
|
-
"type": "
|
|
21360
|
-
"props": {
|
|
21361
|
-
"placeholder": "Title",
|
|
21362
|
-
"value": "",
|
|
21363
|
-
"submitLabel": "next",
|
|
21364
|
-
"onSubmit": {
|
|
21365
|
-
"actionId": "tier5.spacesCreatePost.focusBody"
|
|
21366
|
-
},
|
|
21367
|
-
"onChange": {
|
|
21368
|
-
"actionId": "tier5.spacesCreatePost.setTitle"
|
|
21369
|
-
}
|
|
21370
|
-
}
|
|
21371
|
-
}
|
|
21372
|
-
},
|
|
21373
|
-
{
|
|
21374
|
-
"id": "himi_create_post.body_field",
|
|
21375
|
-
"body": {
|
|
21376
|
-
"package": "himalaya",
|
|
21377
|
-
"type": "TextField",
|
|
21359
|
+
"type": "Form",
|
|
21378
21360
|
"props": {
|
|
21379
|
-
"
|
|
21380
|
-
"
|
|
21381
|
-
|
|
21382
|
-
|
|
21383
|
-
|
|
21384
|
-
|
|
21385
|
-
|
|
21386
|
-
|
|
21387
|
-
|
|
21388
|
-
|
|
21389
|
-
|
|
21390
|
-
|
|
21391
|
-
|
|
21392
|
-
|
|
21393
|
-
|
|
21394
|
-
|
|
21395
|
-
|
|
21396
|
-
|
|
21397
|
-
|
|
21398
|
-
|
|
21399
|
-
|
|
21361
|
+
"id": "himiCreatePostForm",
|
|
21362
|
+
"fields": [
|
|
21363
|
+
{
|
|
21364
|
+
"id": "himi_create_post.title_field",
|
|
21365
|
+
"body": {
|
|
21366
|
+
"package": "himalaya",
|
|
21367
|
+
"type": "FormField",
|
|
21368
|
+
"props": {
|
|
21369
|
+
"id": "title",
|
|
21370
|
+
"label": "Title",
|
|
21371
|
+
"kind": "text",
|
|
21372
|
+
"text": {
|
|
21373
|
+
"placeholder": "Add a title",
|
|
21374
|
+
"value": "",
|
|
21375
|
+
"submitLabel": "next",
|
|
21376
|
+
"onSubmit": {
|
|
21377
|
+
"actionId": "tier5.spacesCreatePost.focusBody"
|
|
21378
|
+
},
|
|
21379
|
+
"onChange": {
|
|
21380
|
+
"actionId": "tier5.spacesCreatePost.setTitle"
|
|
21381
|
+
}
|
|
21382
|
+
}
|
|
21383
|
+
}
|
|
21384
|
+
}
|
|
21385
|
+
},
|
|
21386
|
+
{
|
|
21387
|
+
"id": "himi_create_post.body_field",
|
|
21388
|
+
"body": {
|
|
21389
|
+
"package": "himalaya",
|
|
21390
|
+
"type": "FormField",
|
|
21391
|
+
"props": {
|
|
21392
|
+
"id": "body",
|
|
21393
|
+
"label": "Your post",
|
|
21394
|
+
"kind": "text",
|
|
21395
|
+
"text": {
|
|
21396
|
+
"placeholder": "Write something…",
|
|
21397
|
+
"value": "",
|
|
21398
|
+
"multilineMaxLines": 6,
|
|
21399
|
+
"focusPath": "$service:spacesCreatePost.bodyFocus",
|
|
21400
|
+
"onChange": {
|
|
21401
|
+
"actionId": "tier5.spacesCreatePost.setBody"
|
|
21402
|
+
}
|
|
21403
|
+
}
|
|
21404
|
+
}
|
|
21405
|
+
}
|
|
21406
|
+
}
|
|
21407
|
+
],
|
|
21408
|
+
"submitButton": {
|
|
21409
|
+
"id": "himi_create_post.submit",
|
|
21410
|
+
"body": {
|
|
21411
|
+
"package": "himalaya",
|
|
21412
|
+
"type": "Button",
|
|
21413
|
+
"props": {
|
|
21414
|
+
"title": "Post",
|
|
21415
|
+
"style": "primary",
|
|
21416
|
+
"fullWidth": true,
|
|
21417
|
+
"action": {
|
|
21418
|
+
"actionId": "tier5.spacesCreatePost.submit"
|
|
21419
|
+
}
|
|
21420
|
+
}
|
|
21421
|
+
}
|
|
21400
21422
|
}
|
|
21401
21423
|
}
|
|
21402
21424
|
}
|