@omniharmonic/openspace-cli 0.1.14 → 0.1.15

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.
Files changed (30) hide show
  1. package/dist/{agents-md-63S3T7CX.js → agents-md-OWDSHBGF.js} +2 -2
  2. package/dist/bin.js +3 -3
  3. package/dist/{chunk-SY5NDWS2.js → chunk-GMKHKHUR.js} +127 -25
  4. package/dist/chunk-GMKHKHUR.js.map +1 -0
  5. package/dist/{chunk-TDLUJHWB.js → chunk-PBN36VUE.js} +1965 -122
  6. package/dist/chunk-PBN36VUE.js.map +1 -0
  7. package/dist/{chunk-N7WFQYFE.js → chunk-YAPLQ4OA.js} +24 -1
  8. package/dist/chunk-YAPLQ4OA.js.map +1 -0
  9. package/dist/{crawl-YPDLNAN7.js → crawl-WQQDFI7W.js} +2 -2
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +3 -3
  12. package/dist/starter/site/AGENTS.md +1 -1
  13. package/dist/templates/darkroom/content/pages/about.json +2 -2
  14. package/dist/templates/encore/content/pages/home.json +1 -1
  15. package/dist/templates/folio/content/pages/home.json +2 -2
  16. package/dist/templates/gather/content/pages/home.json +2 -2
  17. package/dist/templates/harbor/content/pages/home.json +1 -1
  18. package/dist/templates/hearth/content/pages/home.json +6 -6
  19. package/dist/templates/inkwell/content/pages/about.json +2 -2
  20. package/dist/templates/inkwell/content/pages/books.json +1 -1
  21. package/dist/templates/keystone/content/pages/about.json +2 -2
  22. package/dist/templates/kiln/content/pages/home.json +7 -5
  23. package/dist/templates/ledger/content/pages/about.json +4 -4
  24. package/dist/templates/vow/content/pages/home.json +1 -1
  25. package/package.json +8 -8
  26. package/dist/chunk-N7WFQYFE.js.map +0 -1
  27. package/dist/chunk-SY5NDWS2.js.map +0 -1
  28. package/dist/chunk-TDLUJHWB.js.map +0 -1
  29. /package/dist/{agents-md-63S3T7CX.js.map → agents-md-OWDSHBGF.js.map} +0 -0
  30. /package/dist/{crawl-YPDLNAN7.js.map → crawl-WQQDFI7W.js.map} +0 -0
@@ -8511,6 +8511,15 @@ function scriptText(el) {
8511
8511
  }
8512
8512
 
8513
8513
  // ../import/src/squarespace/blocks.ts
8514
+ function signupAsksName(form) {
8515
+ return !!find(form, (e) => {
8516
+ if (e.tagName !== "input") return false;
8517
+ const t = (attr(e, "type") ?? "text").toLowerCase();
8518
+ if (t !== "text" || attr(e, "tabindex") === "-1") return false;
8519
+ const key = `${attr(e, "name") ?? ""} ${attr(e, "id") ?? ""} ${attr(e, "autocomplete") ?? ""}`;
8520
+ return /first.?name|given-name|\bfname\b|full.?name|(?:^|[\s_-])name(?:$|[\s_-])/i.test(key);
8521
+ });
8522
+ }
8514
8523
  function cleanImageUrl(raw) {
8515
8524
  let url = raw.trim();
8516
8525
  if (url.startsWith("//")) url = `https:${url}`;
@@ -8816,6 +8825,7 @@ function parseBlock(el) {
8816
8825
  const success = text(find(el, (e) => classes(e).some((c) => /form-submission-text/.test(c))));
8817
8826
  return {
8818
8827
  kind: "newsletter",
8828
+ ...signupAsksName(el) ? { askName: true } : {},
8819
8829
  ...heading ? { heading } : {},
8820
8830
  ...description ? { description } : {},
8821
8831
  ...button ? { buttonLabel: button } : {},
@@ -9861,6 +9871,7 @@ function leafBlocks(el, ctx, out) {
9861
9871
  );
9862
9872
  out.push({
9863
9873
  kind: "newsletter",
9874
+ ...signupAsksName(el) ? { askName: true } : {},
9864
9875
  ...btn && (text(btn) || attr(btn, "value")) ? { buttonLabel: text(btn) || attr(btn, "value") } : {},
9865
9876
  ...input && attr(input, "placeholder") ? { placeholder: attr(input, "placeholder") } : {}
9866
9877
  });
@@ -11231,6 +11242,16 @@ function platformInfo(p) {
11231
11242
  return PLATFORMS[p ?? "squarespace"];
11232
11243
  }
11233
11244
  var platformLabel = (p) => platformInfo(p).label;
11245
+ var NO_SUBSCRIBER_LIST = /* @__PURE__ */ new Set([
11246
+ "github",
11247
+ "jekyll",
11248
+ "hugo",
11249
+ "eleventy",
11250
+ "generic"
11251
+ ]);
11252
+ function subscribersAdvice(p) {
11253
+ return p && NO_SUBSCRIBER_LIST.has(p) ? "Sign-up forms came across, and new sign-ups are kept for you in OpenSpace. Your old site didn't keep a subscriber list itself: if its form sent sign-ups to an email service (like Mailchimp or Buttondown), download the list there and add it in Inbox \u2192 Subscribers \u2192 Import." : `Sign-up forms came across, but subscribers stay with ${platformLabel(p)}. Export them there and import them here.`;
11254
+ }
11234
11255
  var RULES = [
11235
11256
  {
11236
11257
  platform: "squarespace",
@@ -13081,6 +13102,7 @@ var escapeHtml2 = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(
13081
13102
  export {
13082
13103
  platformInfo,
13083
13104
  platformLabel,
13105
+ subscribersAdvice,
13084
13106
  detectPlatform,
13085
13107
  parsePlatform,
13086
13108
  RobotsDisallowed,
@@ -13093,6 +13115,7 @@ export {
13093
13115
  findAll,
13094
13116
  find,
13095
13117
  text,
13118
+ signupAsksName,
13096
13119
  videoUrl,
13097
13120
  stripTags,
13098
13121
  hiddenClassesFromCss,
@@ -13109,4 +13132,4 @@ export {
13109
13132
  crawlSquarespace,
13110
13133
  crawlGeneric
13111
13134
  };
13112
- //# sourceMappingURL=chunk-N7WFQYFE.js.map
13135
+ //# sourceMappingURL=chunk-YAPLQ4OA.js.map