@numueg/theme-sdk 0.10.1 → 0.12.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/CHANGELOG.md +86 -0
- package/dist/{chunk-O4GLTNLE.cjs → chunk-7RZISLP2.cjs} +3 -3
- package/dist/{chunk-O4GLTNLE.cjs.map → chunk-7RZISLP2.cjs.map} +1 -1
- package/dist/{chunk-QFFTHIFZ.mjs → chunk-ZECKSIDL.mjs} +3 -3
- package/dist/{chunk-QFFTHIFZ.mjs.map → chunk-ZECKSIDL.mjs.map} +1 -1
- package/dist/{entities-B8378GKp.d.mts → entities-1XRRUTlO.d.mts} +45 -1
- package/dist/{entities-B8378GKp.d.ts → entities-1XRRUTlO.d.ts} +45 -1
- package/dist/index.cjs +212 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +282 -8
- package/dist/index.d.ts +282 -8
- package/dist/index.mjs +187 -20
- package/dist/index.mjs.map +1 -1
- package/dist/{mount-BDo4a42I.d.mts → mount-DDFMacmj.d.mts} +1 -1
- package/dist/{mount-DQZu8aBB.d.ts → mount-qofjiBxw.d.ts} +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/v2-compat.d.mts +1 -1
- package/dist/v2-compat.d.ts +1 -1
- package/dist/validation.cjs +11 -11
- package/dist/validation.mjs +1 -1
- package/dist/verify.cjs +3 -3
- package/dist/verify.d.mts +2 -2
- package/dist/verify.d.ts +2 -2
- package/dist/verify.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as Store, e as Product, b as Collection, c as Customer, P as Page, S as SizeChart, g as ProductVariant, C as Cart } from './entities-
|
|
2
|
-
export { A as Address, a as CartItem, O as Order, d as OrderItem, f as ProductImage,
|
|
1
|
+
import { i as Store, e as Product, b as Collection, c as Customer, P as Page, M as Metafield, j as ArticleDetail, k as ArticleSummary, B as BlogSummary, S as SizeChart, g as ProductVariant, C as Cart } from './entities-1XRRUTlO.js';
|
|
2
|
+
export { A as Address, a as CartItem, O as Order, d as OrderItem, f as ProductImage, l as ProductOption, h as SizeChartMode } from './entities-1XRRUTlO.js';
|
|
3
3
|
import { T as ThemeSettingsV3, c as SectionInstance, M as MountResult, B as BlockInstance, b as BlockSchema, a as BlockProps$1, f as SectionSchema, e as SectionProps$1 } from './theme-CNTB4KnU.js';
|
|
4
4
|
export { E as ExternalThemeMetadata, h as MAX_BLOCK_DEPTH, P as PageTemplate, i as PresetBlock, S as SectionGroup, d as SectionPreset, g as SettingDefinition } from './theme-CNTB4KnU.js';
|
|
5
5
|
export { KNOWN_SETTING_TYPES, KNOWN_TEMPLATES, REQUIRED_TEMPLATES, SDK_VERSION, THEME_CONTRACT_VERSION, ValidationIssue, ValidationResult, mergeResults, validateBuiltManifest, validateManifest, validateSectionSchema, validateSettingsAgainstSchema } from './validation.js';
|
|
6
|
-
import { C as CartContextValue, L as LocalizationState, a as CurrencyState, T as ThemeMountContext, b as ThemeRenderArgs, M as MenuItemData } from './mount-
|
|
7
|
-
export { c as CartContext, d as CartMutationResult, e as CollectionContext, f as CurrencyConfig, g as CurrencyContext, h as CustomerContext, i as LocalizationContext, N as NavigationContext, P as PageContext, j as ProductContext, S as ShopContext, k as ThemeMountPage, l as ThemeSettingsContext, m as buildThemeElement, n as mountTheme } from './mount-
|
|
6
|
+
import { C as CartContextValue, L as LocalizationState, a as CurrencyState, T as ThemeMountContext, b as ThemeRenderArgs, M as MenuItemData } from './mount-qofjiBxw.js';
|
|
7
|
+
export { c as CartContext, d as CartMutationResult, e as CollectionContext, f as CurrencyConfig, g as CurrencyContext, h as CustomerContext, i as LocalizationContext, N as NavigationContext, P as PageContext, j as ProductContext, S as ShopContext, k as ThemeMountPage, l as ThemeSettingsContext, m as buildThemeElement, n as mountTheme } from './mount-qofjiBxw.js';
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ReactElement, ReactNode, ElementType, CSSProperties, ImgHTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, FormHTMLAttributes, ComponentType } from 'react';
|
|
10
10
|
export { resolveThemeSettings } from './normalize.js';
|
|
@@ -43,6 +43,54 @@ declare function useProductOptional(): Product | null;
|
|
|
43
43
|
declare function useCollection(): Collection;
|
|
44
44
|
declare function useCollectionOptional(): Collection | null;
|
|
45
45
|
|
|
46
|
+
interface ListingHeading {
|
|
47
|
+
/** The collection the shopper is inside, or `null` on the all-products listing. */
|
|
48
|
+
collection: Collection | null;
|
|
49
|
+
/** `true` when this listing is scoped to one collection. */
|
|
50
|
+
isCollection: boolean;
|
|
51
|
+
/** What to render as the page heading. */
|
|
52
|
+
title: string;
|
|
53
|
+
/** What to render under it. Empty string when there is nothing to say. */
|
|
54
|
+
description: string;
|
|
55
|
+
}
|
|
56
|
+
interface ListingHeadingOptions {
|
|
57
|
+
/** The merchant's own heading from this section's settings, if they set one. */
|
|
58
|
+
title?: string | null;
|
|
59
|
+
/** The merchant's own sub-heading from this section's settings. */
|
|
60
|
+
description?: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* The theme's wording for the UNSCOPED listing — already localized by the
|
|
63
|
+
* theme, e.g. `localized(locale, "All products", "كل المنتجات")`.
|
|
64
|
+
*/
|
|
65
|
+
defaultTitle?: string | null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* What a product-listing section should call itself.
|
|
69
|
+
*
|
|
70
|
+
* Every theme hardcoded "All products" as its listing heading, so a shopper who
|
|
71
|
+
* clicked into a category landed on a page titled **All products** showing a
|
|
72
|
+
* subset of the catalog. The products were correctly scoped — the page just
|
|
73
|
+
* never said which collection it was. That reads as a bug ("where did the rest
|
|
74
|
+
* go?") and it costs the collection name in the one place it matters most.
|
|
75
|
+
*
|
|
76
|
+
* Precedence, highest first:
|
|
77
|
+
* 1. the collection's own name — when the shopper is inside one, that IS the
|
|
78
|
+
* page, and it always beats a static setting;
|
|
79
|
+
* 2. the merchant's section setting — their wording for the all-products page;
|
|
80
|
+
* 3. the theme's default.
|
|
81
|
+
*
|
|
82
|
+
* Categories carry no separate Arabic column, so `collection.name` is rendered
|
|
83
|
+
* as the merchant typed it; only the fallback is localized, by the caller.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* const { title, description, isCollection } = useListingHeading({
|
|
87
|
+
* title: asString(s.title),
|
|
88
|
+
* description: asString(s.subtitle),
|
|
89
|
+
* defaultTitle: localized(locale, "All products", "كل المنتجات"),
|
|
90
|
+
* });
|
|
91
|
+
*/
|
|
92
|
+
declare function useListingHeading(options?: ListingHeadingOptions): ListingHeading;
|
|
93
|
+
|
|
46
94
|
declare function useCart(): CartContextValue;
|
|
47
95
|
|
|
48
96
|
declare function useCustomer(): Customer | null;
|
|
@@ -121,6 +169,44 @@ declare function useNumberFormat(): (n: number, options?: Intl.NumberFormatOptio
|
|
|
121
169
|
|
|
122
170
|
declare function usePage(): Page | null;
|
|
123
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Owners a theme can read metafields from. Matches the platform's
|
|
174
|
+
* metafield owner types (product / collection / page). Only PUBLIC
|
|
175
|
+
* metafields ever reach the storefront — the privacy filter runs
|
|
176
|
+
* server-side at the payload layer, so a private field is simply absent
|
|
177
|
+
* here, never present-but-hidden.
|
|
178
|
+
*/
|
|
179
|
+
type MetafieldOwner = "product" | "collection" | "page";
|
|
180
|
+
/**
|
|
181
|
+
* All public metafields of the given owner currently in context.
|
|
182
|
+
* Empty array when the owner isn't in context (e.g. `"product"` on a
|
|
183
|
+
* collection page) or has no fields — never throws.
|
|
184
|
+
*/
|
|
185
|
+
declare function useMetafields(owner: MetafieldOwner): Metafield[];
|
|
186
|
+
/**
|
|
187
|
+
* Read one merchant-defined field directly:
|
|
188
|
+
*
|
|
189
|
+
* ```tsx
|
|
190
|
+
* const material = useMetafield("product", "specs", "material");
|
|
191
|
+
* if (material) <dd>{String(material.value)}</dd>;
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
194
|
+
* Returns the full {@link Metafield} (value pre-coerced to its declared
|
|
195
|
+
* type by the platform) or `null` when missing — same convention as the
|
|
196
|
+
* dynamic-source resolver (`{owner}.metafield:{namespace}.{key}`), so a
|
|
197
|
+
* theme's own fallback renders for stores that haven't set the field.
|
|
198
|
+
*/
|
|
199
|
+
declare function useMetafield(owner: MetafieldOwner, namespace: string, key: string): Metafield | null;
|
|
200
|
+
|
|
201
|
+
/** Published blogs of the store (blogs-index template). */
|
|
202
|
+
declare function useBlogs(): BlogSummary[];
|
|
203
|
+
/** The current blog (blog template), or the article's blog on an article page. */
|
|
204
|
+
declare function useBlog(): BlogSummary | null;
|
|
205
|
+
/** Published articles of the current blog (blog template), newest first. */
|
|
206
|
+
declare function useArticles(): ArticleSummary[];
|
|
207
|
+
/** The current article (article template). */
|
|
208
|
+
declare function useArticle(): ArticleDetail | null;
|
|
209
|
+
|
|
124
210
|
declare const SectionContext: react.Context<SectionInstance | null>;
|
|
125
211
|
declare function useSection(): SectionInstance;
|
|
126
212
|
declare function useSectionOptional(): SectionInstance | null;
|
|
@@ -1340,9 +1426,16 @@ declare function asImageTransform(v: unknown): ImageTransform | undefined;
|
|
|
1340
1426
|
* CSS reproducing the transform on an `<img>` that fills a fixed-aspect,
|
|
1341
1427
|
* overflow-hidden frame. Default fit is `cover` (Shopify-style: the image
|
|
1342
1428
|
* fills its frame, cropping to the focal point) — pass `"contain"` only for
|
|
1343
|
-
* placements that must show the whole image (e.g. a logo).
|
|
1344
|
-
*
|
|
1345
|
-
*
|
|
1429
|
+
* placements that must show the whole image (e.g. a logo).
|
|
1430
|
+
*
|
|
1431
|
+
* **No transform → empty object.** An inline style beats a className, so
|
|
1432
|
+
* returning `{ objectFit: fit }` here would silently override a placement's
|
|
1433
|
+
* own `object-contain` / `object-none` class on every untransformed image —
|
|
1434
|
+
* which is most merchant images. The section's className stays in charge; a
|
|
1435
|
+
* caller that needs a guaranteed fit supplies it itself, e.g.
|
|
1436
|
+
* `{ objectFit: fit, ...applyImageTransform(t, fit) }` (see `HeroMedia`).
|
|
1437
|
+
* This matches `Image.tsx`'s untransformed branch and the behaviour every
|
|
1438
|
+
* theme's local copy has shipped with.
|
|
1346
1439
|
*/
|
|
1347
1440
|
declare function applyImageTransform(t: ImageTransform | undefined | null, fit?: "cover" | "contain"): CSSProperties;
|
|
1348
1441
|
/**
|
|
@@ -2264,6 +2357,187 @@ declare function collectBlocks<T extends Record<string, unknown>>(modules: T): R
|
|
|
2264
2357
|
*/
|
|
2265
2358
|
declare function assetUrl(name: string): string;
|
|
2266
2359
|
|
|
2360
|
+
/**
|
|
2361
|
+
* Storefront route builders.
|
|
2362
|
+
*
|
|
2363
|
+
* The storefront's URL shape is platform knowledge, not theme knowledge: a
|
|
2364
|
+
* theme that hardcodes `/products/${slug}` has quietly taken a dependency on
|
|
2365
|
+
* the host's routing, and every copy of that template is a place the fleet can
|
|
2366
|
+
* disagree with the host. Centralising the templates here means a route change
|
|
2367
|
+
* is one edit rather than a fleet-wide grep.
|
|
2368
|
+
*
|
|
2369
|
+
* Hoisted out of the themes' `sections/_shared.ts`, where `productHref` was
|
|
2370
|
+
* hand-copied into 4 themes and their 4 scaffold templates.
|
|
2371
|
+
*/
|
|
2372
|
+
/**
|
|
2373
|
+
* Link to a product detail page.
|
|
2374
|
+
*
|
|
2375
|
+
* Falls back to the product index when there's no identifier, so a card built
|
|
2376
|
+
* from incomplete data links somewhere useful instead of `/products/undefined`.
|
|
2377
|
+
*/
|
|
2378
|
+
declare function productHref(slugOrId: string | undefined | null): string;
|
|
2379
|
+
/**
|
|
2380
|
+
* Link to a collection page.
|
|
2381
|
+
*
|
|
2382
|
+
* Prefers the slug and falls back to the id, because a category with no slug
|
|
2383
|
+
* is common in practice and the bare template produces `/collections/undefined`
|
|
2384
|
+
* — a 404 the merchant sees as a broken menu item. Accepts either a category
|
|
2385
|
+
* object or a plain slug string so call sites don't have to unpack first.
|
|
2386
|
+
*/
|
|
2387
|
+
declare function collectionHref(category: string | {
|
|
2388
|
+
slug?: string | null;
|
|
2389
|
+
id?: string | null;
|
|
2390
|
+
} | null | undefined): string;
|
|
2391
|
+
|
|
2392
|
+
/**
|
|
2393
|
+
* Money formatting for NUMU storefronts.
|
|
2394
|
+
*
|
|
2395
|
+
* Three implementations of this existed and disagreed:
|
|
2396
|
+
*
|
|
2397
|
+
* - the themes' own `fmt` (4 byte-identical copies): EGP fallback,
|
|
2398
|
+
* `maximumFractionDigits: 0`, locale `"ar"` mapped to `"ar-EG"`
|
|
2399
|
+
* - `@numueg/theme-kit`'s `formatMoney`: **USD** fallback, 2 fraction
|
|
2400
|
+
* digits, raw locale passed through
|
|
2401
|
+
* - `NuMuProvider`'s own `formatMoney`: a third variant again
|
|
2402
|
+
*
|
|
2403
|
+
* This adopts the themes' behaviour, because that is what production renders
|
|
2404
|
+
* today: adopting the kit's would silently turn every promo nudge from
|
|
2405
|
+
* `LE 500` into `£E 500.00` on live stores. NUMU is Egypt-first — EGP is the
|
|
2406
|
+
* right fallback, whole piastres are noise at Egyptian price points, and
|
|
2407
|
+
* `ar-EG` is what produces Egyptian Arabic numerals and currency placement.
|
|
2408
|
+
*
|
|
2409
|
+
* The unit is CENTS, matching the API end to end. `formatMoneyMajor` exists
|
|
2410
|
+
* for the one place that already divided (the SDK exposes cart money in major
|
|
2411
|
+
* units), so nobody has to remember which side of the boundary they're on.
|
|
2412
|
+
*/
|
|
2413
|
+
interface FormatMoneyOptions {
|
|
2414
|
+
/** Currency code. Falls back to EGP — Egypt-first, not USD. */
|
|
2415
|
+
currency?: string | null;
|
|
2416
|
+
/** `"ar"` maps to `ar-EG`; anything else formats as `en-EG`. */
|
|
2417
|
+
locale?: string | null;
|
|
2418
|
+
/**
|
|
2419
|
+
* Fraction digits. Defaults to 0: Egyptian retail prices are whole pounds,
|
|
2420
|
+
* and `500.00 EGP` reads as noise next to `500 EGP`. Pass 2 where sub-unit
|
|
2421
|
+
* precision genuinely matters (a unit price, an FX-converted amount).
|
|
2422
|
+
*/
|
|
2423
|
+
fractionDigits?: number;
|
|
2424
|
+
}
|
|
2425
|
+
/**
|
|
2426
|
+
* Format an integer amount of cents.
|
|
2427
|
+
*
|
|
2428
|
+
* @example formatMoney(50000) // "EGP 500"
|
|
2429
|
+
* @example formatMoney(50000, { locale: "ar" }) // "٥٠٠ ج.م."
|
|
2430
|
+
*/
|
|
2431
|
+
declare function formatMoney(cents: number, options?: FormatMoneyOptions): string;
|
|
2432
|
+
/**
|
|
2433
|
+
* Format an amount already expressed in major units.
|
|
2434
|
+
*
|
|
2435
|
+
* The SDK hands cart money to themes in major units while the API speaks
|
|
2436
|
+
* cents, so a shared helper that only accepted one of the two guaranteed a
|
|
2437
|
+
* factor-of-100 bug at the seam.
|
|
2438
|
+
*/
|
|
2439
|
+
declare function formatMoneyMajor(amount: number, options?: FormatMoneyOptions): string;
|
|
2440
|
+
/** Cents to major units. Non-finite input yields 0, never NaN. */
|
|
2441
|
+
declare function centsToMajor(cents: number): number;
|
|
2442
|
+
/** Major units to integer cents, rounded — the inverse of `centsToMajor`. */
|
|
2443
|
+
declare function majorToCents(amount: number): number;
|
|
2444
|
+
|
|
2445
|
+
/**
|
|
2446
|
+
* Template + section-group resolution — the "no blank page" engine.
|
|
2447
|
+
*
|
|
2448
|
+
* This is engine policy, not theme code, and it was copy-pasted into every
|
|
2449
|
+
* theme: `src/sections/_template-utils.ts` is BYTE-IDENTICAL across 11 of the
|
|
2450
|
+
* 14 themes that carry it (md5 59608dd4f4a702136854d7aaf33ba5e3); the
|
|
2451
|
+
* remaining copies differ only in comments and brace style. The file's own
|
|
2452
|
+
* header instructed theme authors to copy it and said it could be deleted
|
|
2453
|
+
* "once the published SDK ships its own sanitizeTemplate". This is that.
|
|
2454
|
+
*
|
|
2455
|
+
* Why centralising it is safe — and why it matters:
|
|
2456
|
+
* - It contains ZERO design. It decides WHICH sections render, never how
|
|
2457
|
+
* they look, so it cannot homogenise themes.
|
|
2458
|
+
* - Getting it subtly wrong renders an EMPTY STORE. Empire re-implemented a
|
|
2459
|
+
* weaker version inline with no unknown-type filtering, so a stale
|
|
2460
|
+
* customisation renders "Unknown section" placeholders there while every
|
|
2461
|
+
* other theme degrades gracefully. One implementation removes that class.
|
|
2462
|
+
*
|
|
2463
|
+
* The two rules it encodes, both learned from real blank-page incidents:
|
|
2464
|
+
* 1. A template may arrive as an ARRAY or as a MAP + `order[]`. The
|
|
2465
|
+
* customizer writes one shape, theme presets use the other.
|
|
2466
|
+
* 2. Host customisation wins over the theme's bundled preset — UNLESS it
|
|
2467
|
+
* resolves to nothing this theme can render, in which case fall back to
|
|
2468
|
+
* the preset rather than showing the shopper an empty page.
|
|
2469
|
+
*/
|
|
2470
|
+
|
|
2471
|
+
/** A template or section group, in either of the two shapes hosts send. */
|
|
2472
|
+
interface MaybeOrderedTemplate {
|
|
2473
|
+
name?: string;
|
|
2474
|
+
sections?: Record<string, SectionInstance> | SectionInstance[];
|
|
2475
|
+
order?: string[];
|
|
2476
|
+
}
|
|
2477
|
+
/** A section instance paired with the stable id the customizer selects by. */
|
|
2478
|
+
interface ResolvedSection {
|
|
2479
|
+
id: string;
|
|
2480
|
+
instance: SectionInstance;
|
|
2481
|
+
}
|
|
2482
|
+
/**
|
|
2483
|
+
* Normalise a template/group into an ordered list.
|
|
2484
|
+
*
|
|
2485
|
+
* Array form gets synthetic `${type}-${index}` ids (presets have no ids of
|
|
2486
|
+
* their own). Map form is walked in `order`, skipping ids the map doesn't
|
|
2487
|
+
* contain — a dangling id in `order` is a customisation that referenced a
|
|
2488
|
+
* deleted section and must not throw.
|
|
2489
|
+
*/
|
|
2490
|
+
declare function resolveSections(group: MaybeOrderedTemplate | undefined): ResolvedSection[];
|
|
2491
|
+
/**
|
|
2492
|
+
* Choose between the host's customisation and the theme's bundled preset,
|
|
2493
|
+
* then drop section types this theme cannot render.
|
|
2494
|
+
*
|
|
2495
|
+
* `isKnown` is the theme's own registry lookup — the one thing that genuinely
|
|
2496
|
+
* belongs to the theme, so it stays a parameter.
|
|
2497
|
+
*
|
|
2498
|
+
* The order of the three checks is load-bearing:
|
|
2499
|
+
* - nothing from the host → preset (a fresh install renders its demo)
|
|
2500
|
+
* - host sections, none known → preset (a customisation built for a
|
|
2501
|
+
* DIFFERENT theme must not blank the page)
|
|
2502
|
+
* - otherwise → host sections, unknown types filtered out
|
|
2503
|
+
*/
|
|
2504
|
+
declare function selectTemplateSections(hostTemplate: MaybeOrderedTemplate | undefined, builtinTemplate: MaybeOrderedTemplate | undefined, isKnown: (sectionType: string) => boolean): ResolvedSection[];
|
|
2505
|
+
/**
|
|
2506
|
+
* Find the theme's header/footer for a route it has no template for.
|
|
2507
|
+
*
|
|
2508
|
+
* Chrome reaches a theme from `section_groups` — except most themes never used
|
|
2509
|
+
* that channel: they put the header and footer INLINE in each template's own
|
|
2510
|
+
* section list. That works right up until the shopper hits a route the theme
|
|
2511
|
+
* ships no template for. Then there are no sections, so there is no chrome,
|
|
2512
|
+
* and the page renders with no navigation and no way back into the store.
|
|
2513
|
+
*
|
|
2514
|
+
* That is what `/blogs` looked like on every theme: correct, readable content
|
|
2515
|
+
* with nothing around it — no logo, no menu, no cart, no footer. A shopper
|
|
2516
|
+
* arriving from search had to press Back to escape.
|
|
2517
|
+
*
|
|
2518
|
+
* The template's OWN inline chrome still wins when it has some. This only
|
|
2519
|
+
* supplies chrome to routes that would otherwise have none, by borrowing the
|
|
2520
|
+
* chrome the theme already renders everywhere else — `home` first, since it is
|
|
2521
|
+
* the one template every theme ships and the one merchants customise.
|
|
2522
|
+
*
|
|
2523
|
+
* Returns `[]` when the theme genuinely has no chrome of this kind anywhere,
|
|
2524
|
+
* so a caller can still fall back to its own default.
|
|
2525
|
+
*/
|
|
2526
|
+
declare function selectChromeSections(options: {
|
|
2527
|
+
/** `section_groups[kind]` from the host — the customizer's channel. */
|
|
2528
|
+
hostGroup?: MaybeOrderedTemplate;
|
|
2529
|
+
/** The theme's own preset `section_groups[kind]`. */
|
|
2530
|
+
presetGroup?: MaybeOrderedTemplate;
|
|
2531
|
+
/** Chrome found inline in the CURRENT template's section list. */
|
|
2532
|
+
inline?: ResolvedSection[];
|
|
2533
|
+
/** Every template the theme can draw on — host customisation and presets. */
|
|
2534
|
+
templates?: Array<MaybeOrderedTemplate | undefined>;
|
|
2535
|
+
/** True for the section types that count as this kind of chrome. */
|
|
2536
|
+
isChrome: (sectionType: string) => boolean;
|
|
2537
|
+
/** The theme's registry lookup. */
|
|
2538
|
+
isKnown: (sectionType: string) => boolean;
|
|
2539
|
+
}): ResolvedSection[];
|
|
2540
|
+
|
|
2267
2541
|
/**
|
|
2268
2542
|
* `applyGlobalStyleTokens(globalSettings, el)` — Phase 3.5.
|
|
2269
2543
|
*
|
|
@@ -2459,4 +2733,4 @@ declare function pickTranslations(bundle: LocaleBundle, locale: string): LocaleM
|
|
|
2459
2733
|
*/
|
|
2460
2734
|
declare function buildLocaleBundle<T extends Record<string, unknown>>(modules: T): LocaleBundle;
|
|
2461
2735
|
|
|
2462
|
-
export { AddToCartButton, type AddressInput, type AnalyticsApi, type AnalyticsPayload, type AppManifestBlock, type AppPayload, type AppState, Block, BlockInstance, BlockProps$1 as BlockProps, BlockSchema, type CacheFetcher, type CacheMutator, type CachedResource, type CachedResourceState, Cart, CartContextValue, type CheckoutAddress, type CheckoutApi, type CheckoutSessionState, type CheckoutStep, Collection, CollectionCard, type CollectionCardProps, type CollectionCardSlots, CollectionProvider, type ComputedStyleTokens, CurrencyState, CurrencySwitcher, type CurrencySwitcherProps, Customer, type CustomerAddress, type CustomerAddressesState, type DefineBlockInput, type DefineSectionInput, type DefinedBlock, type DefinedSection, type DynamicResolveContext, type DynamicSourceRef, EditableImage, type EditableImageProps, EditableText, type EditableTextProps, type FocalSrcOptions, Form, type GiftCardBalance, HeroMedia, type HeroMediaProps, ICON_NAMES, Icon, IconMap, type IconProps, Image, type ImageTransform, LOGO_SHAPE_OPTIONS, LOGO_SIZE_OPTIONS, Link, type LocaleBundle, type LocaleMessages, LocaleSwitcher, type LocaleSwitcherProps, Logo, type LogoProps, type LogoShape, type LogoSize, MenuItemData, Money, MountResult, type MutateOptions, NAVIGATE_EVENT, type NavigateEventDetail, type NavigationItem, type NavigationState, NuMuProvider, type OrderDetail, type OrderListEntry, type OrderListState, type OrderState, Page, type PlaceOrderResult, Product, ProductCard, type ProductCardProps, type ProductCardSlots, ProductProvider, ProductVariant, type RelatedProductsState, type ReorderResult, type ReorderSkipReason, type ReorderSkippedItem, RichText, type RichTextProps, type SearchResults, type SearchState, Section, SectionContext, type SectionGroupInstance, SectionInstance, SectionProps$1 as SectionProps, SectionSchema, type ShippingRateOption, type ShopWithHelpers, SizeChart, Store, type ThemeEntry, ThemeMountContext, ThemeRenderArgs, ThemeSettingsV3, type UseCachedResourceOptions, type UseGiftCardBalance, type UseReorder, type UseSearchOptions, type UseShippingRatesOptions, type UseShippingRatesState, type UseVariantSelection, type WishlistItem, type WishlistState, applyGlobalStyleTokens, applyImageTransform, asImageTransform, assetUrl, availableValues, buildLocaleBundle, clearSdkSingleton, collectBlocks, collectSections, computeGlobalStyleTokens, defaultVariant, defineBlock, defineSection, defineThemeEntry, dynamicSource, findVariantByOptions, flattenMessages, focalSrc, getReactSingleton, getSdkSingleton, isDefinedBlock, isDefinedSection, isDynamicSource, isSdkAvailable, logoImgStyle, logoStyleTokens, pickTranslations, publishVariantSelection, readVariantSelection, registerReactSingleton, registerSdkSingleton, requestNavigate, resolveDynamicValue, resolveFontStack, resolveSettingsMap, resolveSizeChart, resolveSourcePath, sanitizeHtml, useAnalytics, useApp, useCachedResource, useCart, useCheckout, useCollection, useCollectionOptional, useCollections, useCurrency, useCurrentTemplate, useCustomer, useCustomerActions, useCustomerAddresses, useDirection, useFieldTranslation, useGiftCardBalance, useImage, useLocale, useLocalization, useMoney, useNavigation, useNumberFormat, useOrder, useOrders, usePage, useProduct, useProductOptional, useProductSizeChart, useProducts, useRelatedProducts, useReorder, useResolvedSettings, useSearch, useSection, useSectionGroup, useSectionOptional, useShippingRates, useShop, useThemeSettings, useTranslation, useVariantSelection, useWishlist };
|
|
2736
|
+
export { AddToCartButton, type AddressInput, type AnalyticsApi, type AnalyticsPayload, type AppManifestBlock, type AppPayload, type AppState, ArticleDetail, ArticleSummary, Block, BlockInstance, BlockProps$1 as BlockProps, BlockSchema, BlogSummary, type CacheFetcher, type CacheMutator, type CachedResource, type CachedResourceState, Cart, CartContextValue, type CheckoutAddress, type CheckoutApi, type CheckoutSessionState, type CheckoutStep, Collection, CollectionCard, type CollectionCardProps, type CollectionCardSlots, CollectionProvider, type ComputedStyleTokens, CurrencyState, CurrencySwitcher, type CurrencySwitcherProps, Customer, type CustomerAddress, type CustomerAddressesState, type DefineBlockInput, type DefineSectionInput, type DefinedBlock, type DefinedSection, type DynamicResolveContext, type DynamicSourceRef, EditableImage, type EditableImageProps, EditableText, type EditableTextProps, type FocalSrcOptions, Form, type FormatMoneyOptions, type GiftCardBalance, HeroMedia, type HeroMediaProps, ICON_NAMES, Icon, IconMap, type IconProps, Image, type ImageTransform, LOGO_SHAPE_OPTIONS, LOGO_SIZE_OPTIONS, Link, type ListingHeading, type ListingHeadingOptions, type LocaleBundle, type LocaleMessages, LocaleSwitcher, type LocaleSwitcherProps, Logo, type LogoProps, type LogoShape, type LogoSize, type MaybeOrderedTemplate, MenuItemData, type MetafieldOwner, Money, MountResult, type MutateOptions, NAVIGATE_EVENT, type NavigateEventDetail, type NavigationItem, type NavigationState, NuMuProvider, type OrderDetail, type OrderListEntry, type OrderListState, type OrderState, Page, type PlaceOrderResult, Product, ProductCard, type ProductCardProps, type ProductCardSlots, ProductProvider, ProductVariant, type RelatedProductsState, type ReorderResult, type ReorderSkipReason, type ReorderSkippedItem, type ResolvedSection, RichText, type RichTextProps, type SearchResults, type SearchState, Section, SectionContext, type SectionGroupInstance, SectionInstance, SectionProps$1 as SectionProps, SectionSchema, type ShippingRateOption, type ShopWithHelpers, SizeChart, Store, type ThemeEntry, ThemeMountContext, ThemeRenderArgs, ThemeSettingsV3, type UseCachedResourceOptions, type UseGiftCardBalance, type UseReorder, type UseSearchOptions, type UseShippingRatesOptions, type UseShippingRatesState, type UseVariantSelection, type WishlistItem, type WishlistState, applyGlobalStyleTokens, applyImageTransform, asImageTransform, assetUrl, availableValues, buildLocaleBundle, centsToMajor, clearSdkSingleton, collectBlocks, collectSections, collectionHref, computeGlobalStyleTokens, defaultVariant, defineBlock, defineSection, defineThemeEntry, dynamicSource, findVariantByOptions, flattenMessages, focalSrc, formatMoney, formatMoneyMajor, getReactSingleton, getSdkSingleton, isDefinedBlock, isDefinedSection, isDynamicSource, isSdkAvailable, logoImgStyle, logoStyleTokens, majorToCents, pickTranslations, productHref, publishVariantSelection, readVariantSelection, registerReactSingleton, registerSdkSingleton, requestNavigate, resolveDynamicValue, resolveFontStack, resolveSections, resolveSettingsMap, resolveSizeChart, resolveSourcePath, sanitizeHtml, selectChromeSections, selectTemplateSections, useAnalytics, useApp, useArticle, useArticles, useBlog, useBlogs, useCachedResource, useCart, useCheckout, useCollection, useCollectionOptional, useCollections, useCurrency, useCurrentTemplate, useCustomer, useCustomerActions, useCustomerAddresses, useDirection, useFieldTranslation, useGiftCardBalance, useImage, useListingHeading, useLocale, useLocalization, useMetafield, useMetafields, useMoney, useNavigation, useNumberFormat, useOrder, useOrders, usePage, useProduct, useProductOptional, useProductSizeChart, useProducts, useRelatedProducts, useReorder, useResolvedSettings, useSearch, useSection, useSectionGroup, useSectionOptional, useShippingRates, useShop, useThemeSettings, useTranslation, useVariantSelection, useWishlist };
|