@garagem-ai/site-sdk 0.6.0 → 0.6.1
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/index.d.mts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +21 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/studio-contract.ts +21 -20
package/dist/index.mjs
CHANGED
|
@@ -2592,11 +2592,13 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
2592
2592
|
* Exact pin for generated Studio sites. Must match a tarball already on
|
|
2593
2593
|
* npm — v0 installs this version. After a later changeset publishes, bump
|
|
2594
2594
|
* this and move that release's names from `optionalReactExports` /
|
|
2595
|
-
* `unpublishedSearchExports` into the
|
|
2596
|
-
* until that tarball is on npm.
|
|
2597
|
-
*
|
|
2595
|
+
* `unpublishedSearchExports` / `unpublishedPhoneExports` into the
|
|
2596
|
+
* prompt-safe lists. Do not bump here until that tarball is on npm.
|
|
2597
|
+
* Phone mask helpers shipped in 0.6.0. Search filter helpers
|
|
2598
|
+
* (`visibleSearchFilters` / `toolbarFilterIds`) shipped in 0.4.12 and
|
|
2599
|
+
* remain on this pin.
|
|
2598
2600
|
*/
|
|
2599
|
-
minNpmVersion: "0.
|
|
2601
|
+
minNpmVersion: "0.6.0",
|
|
2600
2602
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
2601
2603
|
selfInjectSince: "0.4.2",
|
|
2602
2604
|
chromeStrategy: "app-owned",
|
|
@@ -2649,18 +2651,9 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
2649
2651
|
"formatListingPrice"
|
|
2650
2652
|
],
|
|
2651
2653
|
/**
|
|
2652
|
-
* Prompt-safe phone helpers on `minNpmVersion
|
|
2653
|
-
* tarball exports them and this pin bumps — then move names here from
|
|
2654
|
-
* `unpublishedPhoneExports`.
|
|
2654
|
+
* Prompt-safe phone helpers on `minNpmVersion` (published in 0.6.0).
|
|
2655
2655
|
*/
|
|
2656
|
-
phoneExports: [
|
|
2657
|
-
/**
|
|
2658
|
-
* Headless phone mask helpers in git / newer tarballs but not on
|
|
2659
|
-
* `minNpmVersion` (0.4.12). Prompts, completeness, and repair text must
|
|
2660
|
-
* not mention these until the pin bumps — v0 installs the pin and the
|
|
2661
|
-
* ESM loader throws on missing named exports.
|
|
2662
|
-
*/
|
|
2663
|
-
unpublishedPhoneExports: [
|
|
2656
|
+
phoneExports: [
|
|
2664
2657
|
"PHONE_COUNTRIES",
|
|
2665
2658
|
"formatPhoneNational",
|
|
2666
2659
|
"toE164",
|
|
@@ -2670,12 +2663,19 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
2670
2663
|
"findPhoneCountry",
|
|
2671
2664
|
"remaskPhoneForCountry"
|
|
2672
2665
|
],
|
|
2666
|
+
/**
|
|
2667
|
+
* Headless phone helpers in git but not on `minNpmVersion`. Prompts,
|
|
2668
|
+
* completeness, and repair text must not mention these until the pin
|
|
2669
|
+
* bumps — v0 installs the pin and the ESM loader throws on missing
|
|
2670
|
+
* named exports.
|
|
2671
|
+
*/
|
|
2672
|
+
unpublishedPhoneExports: [],
|
|
2673
2673
|
amenityExports: ["listingAmenityGroups"],
|
|
2674
2674
|
/**
|
|
2675
|
-
* Names already on the pinned npm tarball (`minNpmVersion`
|
|
2676
|
-
*
|
|
2677
|
-
* `
|
|
2678
|
-
*
|
|
2675
|
+
* Names already on the pinned npm tarball (`minNpmVersion`) — safe for
|
|
2676
|
+
* Studio prompts and completeness. Includes `visibleSearchFilters` +
|
|
2677
|
+
* `toolbarFilterIds` (shipped in 0.4.12). Do not confuse with
|
|
2678
|
+
* `unpublishedSearchExports` (`searchChromeModel`, …).
|
|
2679
2679
|
*/
|
|
2680
2680
|
searchExports: [
|
|
2681
2681
|
"searchResultsHeading",
|
|
@@ -2786,7 +2786,8 @@ function studioSdkPinInstruction() {
|
|
|
2786
2786
|
}
|
|
2787
2787
|
function studioLeadInstruction() {
|
|
2788
2788
|
const names = STUDIO_SDK_CONTRACT.leadExports.join(", ");
|
|
2789
|
-
|
|
2789
|
+
const phone = STUDIO_SDK_CONTRACT.phoneExports.join(", ");
|
|
2790
|
+
return `Listing-detail visit/contact leads: import ${names} from \`${STUDIO_SDK_PACKAGE}\` (the main package, not \`/react\`). Call \`submitVisitLead\` / \`submitContactLead\` \u2014 never concatenate a leads webhook URL and never POST the Showcase demo leads route. Phone fields: import ${phone} from the same package. Display draft is \`formatPhoneNational\` (default country \`BR\`); changing country calls \`remaskPhoneForCountry\`; submit \`toE164\` and require \`isValidPhone\`. Do not invent a second mask and do not import \`@garagem/ui\` PhoneInput.`;
|
|
2790
2791
|
}
|
|
2791
2792
|
function studioListingCardInstruction() {
|
|
2792
2793
|
const names = STUDIO_SDK_CONTRACT.listingCardExports.join(", ");
|