@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.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 prompt-safe lists. Do not bump here
2596
- * until that tarball is on npm. Headless SearchPage already shipped in
2597
- * 0.4.12 (`visibleSearchFilters` / `toolbarFilterIds` are on that pin).
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.4.12",
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`. Empty until a published
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` / 0.4.12) —
2676
- * safe for Studio prompts and completeness. Includes
2677
- * `visibleSearchFilters` + `toolbarFilterIds` (shipped in 0.4.12). Do not
2678
- * confuse with `unpublishedSearchExports` (`searchChromeModel`, …).
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
- 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 use a national mask with a country picker and submit E.164 \u2014 do not invent a second mask and do not import \`@garagem/ui\` PhoneInput.`;
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(", ");