@rocket/js 0.1.2 → 0.2.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.
Files changed (117) hide show
  1. package/README.md +8 -2
  2. package/dist-types/exports/layouts/atlasBlog.d.ts +2 -0
  3. package/dist-types/exports/layouts/atlasBlog.d.ts.map +1 -0
  4. package/dist-types/exports/ssr.d.ts +1 -1
  5. package/dist-types/exports/types/rocket.d.ts +60 -2
  6. package/dist-types/exports/types/rocket.d.ts.map +1 -1
  7. package/dist-types/exports/types.d.ts +1 -1
  8. package/dist-types/exports/types.d.ts.map +1 -1
  9. package/dist-types/src/PageData.d.ts +3 -1
  10. package/dist-types/src/PageData.d.ts.map +1 -1
  11. package/dist-types/src/RocketJsDemo.d.ts.map +1 -1
  12. package/dist-types/src/SocialPreviewPlayground.d.ts +1 -0
  13. package/dist-types/src/SocialPreviewPlayground.d.ts.map +1 -1
  14. package/dist-types/src/asyncMessage.d.ts +5 -0
  15. package/dist-types/src/asyncMessage.d.ts.map +1 -1
  16. package/dist-types/src/cli/RocketBuild.d.ts.map +1 -1
  17. package/dist-types/src/cli/RocketCli.d.ts.map +1 -1
  18. package/dist-types/src/cli/RocketStart.d.ts +6 -1
  19. package/dist-types/src/cli/RocketStart.d.ts.map +1 -1
  20. package/dist-types/src/component-hydration.d.ts.map +1 -1
  21. package/dist-types/src/components/RocketDrawer.d.ts +8 -0
  22. package/dist-types/src/components/RocketDrawer.d.ts.map +1 -1
  23. package/dist-types/src/components/RocketSocialLink.d.ts.map +1 -1
  24. package/dist-types/src/config.d.ts.map +1 -1
  25. package/dist-types/src/feeds.d.ts +38 -0
  26. package/dist-types/src/feeds.d.ts.map +1 -0
  27. package/dist-types/src/hydration/hydrationLoader.d.ts +13 -4
  28. package/dist-types/src/hydration/hydrationLoader.d.ts.map +1 -1
  29. package/dist-types/src/icons.d.ts.map +1 -1
  30. package/dist-types/src/layouts/atlas/atlasBlogLayout.d.ts +42 -0
  31. package/dist-types/src/layouts/atlas/atlasBlogLayout.d.ts.map +1 -0
  32. package/dist-types/src/layouts/atlas/atlasDocLayout.d.ts.map +1 -1
  33. package/dist-types/src/layouts/atlas/atlasHeroLayout.d.ts.map +1 -1
  34. package/dist-types/src/layouts/atlas/atlasNotFoundLayout.d.ts.map +1 -1
  35. package/dist-types/src/layouts/layout-helper.d.ts +3 -3
  36. package/dist-types/src/layouts/layout-helper.d.ts.map +1 -1
  37. package/dist-types/src/markdownHook.d.ts.map +1 -1
  38. package/dist-types/src/menu.d.ts +8 -3
  39. package/dist-types/src/menu.d.ts.map +1 -1
  40. package/dist-types/src/menus/MainMenu.d.ts.map +1 -1
  41. package/dist-types/src/{development-page-module-loader.d.ts → page-module-loader.d.ts} +7 -2
  42. package/dist-types/src/page-module-loader.d.ts.map +1 -0
  43. package/dist-types/src/page-runtime.d.ts +11 -0
  44. package/dist-types/src/page-runtime.d.ts.map +1 -1
  45. package/dist-types/src/pages.d.ts.map +1 -1
  46. package/dist-types/src/prefer-project-packages-plugin.d.ts +9 -0
  47. package/dist-types/src/prefer-project-packages-plugin.d.ts.map +1 -0
  48. package/dist-types/src/project-package-resolution.d.ts +8 -0
  49. package/dist-types/src/project-package-resolution.d.ts.map +1 -0
  50. package/dist-types/src/resolve.d.ts.map +1 -1
  51. package/dist-types/src/route-pattern.d.ts +10 -0
  52. package/dist-types/src/route-pattern.d.ts.map +1 -0
  53. package/dist-types/src/siteDiscoverability.d.ts +4 -0
  54. package/dist-types/src/siteDiscoverability.d.ts.map +1 -1
  55. package/dist-types/src/socialPreviewImages.d.ts +2 -1
  56. package/dist-types/src/socialPreviewImages.d.ts.map +1 -1
  57. package/dist-types/src/ssr.d.ts +3 -0
  58. package/dist-types/src/ssr.d.ts.map +1 -1
  59. package/dist-types/src/static-params.d.ts +33 -0
  60. package/dist-types/src/static-params.d.ts.map +1 -0
  61. package/dist-types/src/transform.d.ts +4 -0
  62. package/dist-types/src/transform.d.ts.map +1 -1
  63. package/dist-types/src/wds-plugin.d.ts.map +1 -1
  64. package/exports/layouts/atlasBlog.js +11 -0
  65. package/exports/ssr.js +1 -1
  66. package/exports/types/rocket.test.ts +26 -0
  67. package/exports/types/rocket.ts +70 -2
  68. package/exports/types.ts +7 -0
  69. package/package.json +16 -31
  70. package/src/PageData.js +12 -2
  71. package/src/RocketJsDemo.js +1 -0
  72. package/src/SocialPreviewPlayground.js +26 -20
  73. package/src/asyncMessage.js +8 -2
  74. package/src/cli/RocketBuild.js +110 -13
  75. package/src/cli/RocketCli.js +11 -1
  76. package/src/cli/RocketStart.js +60 -16
  77. package/src/cli/cli.js +10 -1
  78. package/src/component-hydration.js +23 -3
  79. package/src/components/RocketDrawer.js +44 -10
  80. package/src/components/RocketSocialLink.js +26 -2
  81. package/src/config.js +33 -4
  82. package/src/feeds.js +212 -0
  83. package/src/hydration/hydrationLoader.js +80 -48
  84. package/src/icons.js +10 -1
  85. package/src/layouts/atlas/atlasBlog.css +143 -0
  86. package/src/layouts/atlas/atlasBlogLayout.js +234 -0
  87. package/src/layouts/atlas/atlasDocLayout.js +3 -2
  88. package/src/layouts/atlas/atlasHeroLayout.js +4 -6
  89. package/src/layouts/atlas/atlasNotFoundLayout.js +9 -21
  90. package/src/layouts/layout-helper.js +5 -5
  91. package/src/layouts/layout.js +2 -2
  92. package/src/loaded-page-module.js +3 -1
  93. package/src/main.js +2 -0
  94. package/src/markdownCompiler.js +2 -2
  95. package/src/markdownHook.js +7 -2
  96. package/src/menu.js +25 -19
  97. package/src/menus/MainMenu.js +10 -4
  98. package/src/{static-page-module-loader.js → page-module-loader.js} +6 -1
  99. package/src/page-pagination.js +2 -2
  100. package/src/page-runtime.js +48 -3
  101. package/src/pages.js +47 -56
  102. package/src/prefer-project-packages-plugin.js +31 -0
  103. package/src/project-package-resolution.js +36 -0
  104. package/src/publicAssets.js +2 -2
  105. package/src/resolve.js +32 -2
  106. package/src/route-pattern.js +21 -0
  107. package/src/siteDiscoverability.js +14 -1
  108. package/src/socialPreviewImages.js +80 -14
  109. package/src/ssr.js +3 -0
  110. package/src/standalone-demo-url.js +2 -2
  111. package/src/static-params.js +114 -0
  112. package/src/transform.js +93 -26
  113. package/src/wds-plugin.js +16 -3
  114. package/dist-types/src/development-page-module-loader.d.ts.map +0 -1
  115. package/dist-types/src/static-page-module-loader.d.ts +0 -15
  116. package/dist-types/src/static-page-module-loader.d.ts.map +0 -1
  117. package/src/development-page-module-loader.js +0 -29
@@ -1 +1 @@
1
- {"version":3,"file":"MainMenu.d.ts","sourceRoot":"","sources":["../../../src/menus/MainMenu.js"],"names":[],"mappings":"AAIA;IACE;;;;;;;MAGE;IA4CF,uCAIE;IA5CA,qDAAqD;IAErD,UAFW,OAAO,qBAAqB,EAAE,QAAQ,CAExB;IACzB,oBAAqB;IAGvB,2DAOC;IAED;;;;OAIG;IACH,WAJW,OAAO,qBAAqB,EAAE,QAAQ,UACtC,MAAM,GACJ,OAAO,KAAK,EAAE,cAAc,CAoBxC;CAOF;2BAzDqC,KAAK"}
1
+ {"version":3,"file":"MainMenu.d.ts","sourceRoot":"","sources":["../../../src/menus/MainMenu.js"],"names":[],"mappings":"AAIA;IACE;;;;;;;MAGE;IAkDF,uCAIE;IAlDA,qDAAqD;IAErD,UAFW,OAAO,qBAAqB,EAAE,QAAQ,CAExB;IACzB,oBAAqB;IAGvB,2DAOC;IAED;;;;OAIG;IACH,WAJW,OAAO,qBAAqB,EAAE,QAAQ,UACtC,MAAM,GACJ,OAAO,KAAK,EAAE,cAAc,CA0BxC;CAOF;2BA/DqC,KAAK"}
@@ -1,5 +1,10 @@
1
1
  /** @typedef {import('./page-runtime.js').PageModuleLoaderOptions} PageModuleLoaderOptions */
2
- export function createDevelopmentPageModuleLoader(): {
2
+ /**
3
+ * The Page Module Loader used by both the development server and static builds.
4
+ * Loading goes through Rocket's import hooks, which behave the same in both
5
+ * runtime environments.
6
+ */
7
+ export function createPageModuleLoader(): {
3
8
  /**
4
9
  * @param {PageModuleLoaderOptions} options
5
10
  */
@@ -12,4 +17,4 @@ export function createDevelopmentPageModuleLoader(): {
12
17
  }>;
13
18
  };
14
19
  export type PageModuleLoaderOptions = import("./page-runtime.js").PageModuleLoaderOptions;
15
- //# sourceMappingURL=development-page-module-loader.d.ts.map
20
+ //# sourceMappingURL=page-module-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-module-loader.d.ts","sourceRoot":"","sources":["../../src/page-module-loader.js"],"names":[],"mappings":"AAGA,6FAA6F;AAE7F;;;;GAIG;AACH;IAEI;;OAEG;4BADQ,uBAAuB;;;;;;;EAoBrC;sCA9Ba,OAAO,mBAAmB,EAAE,uBAAuB"}
@@ -71,6 +71,17 @@ export class PageRuntime {
71
71
  render(request: Request, { adapterContext }?: {
72
72
  adapterContext?: unknown;
73
73
  }): Promise<Response>;
74
+ /**
75
+ * Development falls back to the request origin so Page Feeds work before a
76
+ * Site Origin is configured; builds always pass the configured Site Origin.
77
+ *
78
+ * @param {{ page: Page; routePath: string }} feedMatch
79
+ * @param {string} requestOrigin
80
+ */
81
+ renderPageFeed(feedMatch: {
82
+ page: Page;
83
+ routePath: string;
84
+ }, requestOrigin: string): Response;
74
85
  }
75
86
  export type PageRegistry = import("@rocket/js/types.js").PageRegistry;
76
87
  export type Page = {
@@ -1 +1 @@
1
- {"version":3,"file":"page-runtime.d.ts","sourceRoot":"","sources":["../../src/page-runtime.js"],"names":[],"mappings":"AAmTA;;;GAGG;AACH,sDAHW,OAAO,GACL,QAAQ,CAepB;AA5TD,yEAAyE;AACzE,iKAAiK;AACjK,2IAA2I;AAC3I,kFAAkF;AAClF,mFAAmF;AACnF,wFAAwF;AACxF,mHAAmH;AACnH,2HAA2H;AAC3H,qFAAqF;AACrF,6EAA6E;AAC7E,mFAAmF;AAEnF;IACE;;;;OAIG;IACH,kBAJW,oBAAoB,WACpB,MAAM,YACN;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,IAAI,CAAC;QAAC,SAAS,C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E,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE;+BACzE;IAAE,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;CAAE;iCACxF,OAAO,qBAAqB,EAAE,kBAAkB;6BAChD,OAAO,qBAAqB,EAAE,cAAc;mCAC5C,qBAAqB,GAAG,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/pages.js"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,+BAJW,MAAM,WACN,MAAM,EAAE,WACR,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,uDA6D7B;2BAtEa,OAAO,qBAAqB,EAAE,YAAY;iCAC1C,OAAO,qBAAqB,EAAE,kBAAkB;iCAChD,OAAO,qBAAqB,EAAE,kBAAkB"}
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/pages.js"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,+BAJW,MAAM,WACN,MAAM,EAAE,WACR,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,uDAsD7B;2BA/Da,OAAO,qBAAqB,EAAE,YAAY;iCAC1C,OAAO,qBAAqB,EAAE,kBAAkB;iCAChD,OAAO,qBAAqB,EAAE,kBAAkB"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Keeps browser packages shared between a Site Author project and a linked Rocket checkout.
3
+ * Packages absent from the project are left to normal Node resolution, which falls back to
4
+ * Rocket's dependency.
5
+ *
6
+ * @returns {import('@web/dev-server-core').Plugin}
7
+ */
8
+ export function preferProjectPackagesPlugin(): import("@web/dev-server-core").Plugin;
9
+ //# sourceMappingURL=prefer-project-packages-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefer-project-packages-plugin.d.ts","sourceRoot":"","sources":["../../src/prefer-project-packages-plugin.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,+CAFa,OAAO,sBAAsB,EAAE,MAAM,CAsBjD"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Resolve a bare package import from the Site Author project using browser ESM conditions.
3
+ * Built-in modules and packages absent from the project are left to another resolver.
4
+ *
5
+ * @param {string} specifier
6
+ */
7
+ export function resolveProjectBrowserPackage(specifier: string): string | undefined;
8
+ //# sourceMappingURL=project-package-resolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-package-resolution.d.ts","sourceRoot":"","sources":["../../src/project-package-resolution.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,wDAFW,MAAM,sBAahB"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/resolve.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,6BAJW,MAAM,QACN,UAAU,GACR,MAAM,CAQlB"}
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/resolve.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,6BAJW,MAAM,QACN,UAAU,GACR,MAAM,CAWlB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Compiling a URLPattern is comparatively expensive and route paths repeat on
3
+ * every request, so compiled patterns are cached per route path.
4
+ *
5
+ * @param {string} routePath
6
+ * @returns {URLPattern}
7
+ */
8
+ export function routePattern(routePath: string): URLPattern;
9
+ import { URLPattern } from 'urlpattern-polyfill';
10
+ //# sourceMappingURL=route-pattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-pattern.d.ts","sourceRoot":"","sources":["../../src/route-pattern.js"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wCAHW,MAAM,GACJ,UAAU,CAStB;2BAnB0B,qBAAqB"}
@@ -21,6 +21,10 @@ export function createSitemap({ pages, siteOrigin }: {
21
21
  siteOrigin: string;
22
22
  }): string;
23
23
  /**
24
+ * The Robots File always references the canonical Sitemap URL, even when
25
+ * Rocket does not generate `sitemap.xml` itself — this is documented behavior
26
+ * so projects can supply a sitemap through other tooling.
27
+ *
24
28
  * @param {{
25
29
  * pages?: import('@rocket/js/types.js').PageRegistry;
26
30
  * siteOrigin: string;
@@ -1 +1 @@
1
- {"version":3,"file":"siteDiscoverability.d.ts","sourceRoot":"","sources":["../../src/siteDiscoverability.js"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,2EANW;IACN,KAAK,EAAE,OAAO,qBAAqB,EAAE,YAAY,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,qBAAqB,EAAE,oBAAoB,CAAC;CAC5D,QAoBH;AAED;;;;;GAKG;AACH,qDALW;IACN,KAAK,EAAE,OAAO,qBAAqB,EAAE,YAAY,CAAC;IAClD,UAAU,EAAE,MAAM,CAAC;CACpB,UAeH;AAED;;;;;GAKG;AACH,wDALW;IACN,KAAK,CAAC,EAAE,OAAO,qBAAqB,EAAE,YAAY,CAAC;IACnD,UAAU,EAAE,MAAM,CAAC;CACpB,UAaH"}
1
+ {"version":3,"file":"siteDiscoverability.d.ts","sourceRoot":"","sources":["../../src/siteDiscoverability.js"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,2EANW;IACN,KAAK,EAAE,OAAO,qBAAqB,EAAE,YAAY,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,qBAAqB,EAAE,oBAAoB,CAAC;CAC5D,QAoBH;AAED;;;;;GAKG;AACH,qDALW;IACN,KAAK,EAAE,OAAO,qBAAqB,EAAE,YAAY,CAAC;IAClD,UAAU,EAAE,MAAM,CAAC;CACpB,UAeH;AAED;;;;;;;;;GASG;AACH,wDALW;IACN,KAAK,CAAC,EAAE,OAAO,qBAAqB,EAAE,YAAY,CAAC;IACnD,UAAU,EAAE,MAAM,CAAC;CACpB,UAaH"}
@@ -134,9 +134,10 @@ export function createSocialPreviewTemplateData({ metadata, pageMetadata, pathna
134
134
  export function captureSocialPreviewImageWithBrowser({ html }: SocialPreviewCaptureOptions): Promise<Buffer<ArrayBufferLike>>;
135
135
  /**
136
136
  * @param {string} html
137
+ * @param {import('puppeteer-core').Browser} [existingBrowser] reused across captures; the caller owns closing it
137
138
  * @returns {Promise<Buffer>}
138
139
  */
139
- export function renderSocialPreviewImage(html: string): Promise<Buffer>;
140
+ export function renderSocialPreviewImage(html: string, existingBrowser?: import("puppeteer-core").Browser): Promise<Buffer>;
140
141
  /**
141
142
  * @param {{
142
143
  * platform?: NodeJS.Platform;
@@ -1 +1 @@
1
- {"version":3,"file":"socialPreviewImages.d.ts","sourceRoot":"","sources":["../../src/socialPreviewImages.js"],"names":[],"mappings":"AAuBA;;;;;;;GAOG;AAEH;;GAEG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;GASG;AACH,8IATW;IACN,KAAK,EAAE,OAAO,qBAAqB,EAAE,YAAY,CAAC;IAClD,gBAAgB,CAAC,EAAE,OAAO,qBAAqB,EAAE,sBAAsB,CAAC;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yBAAyB,CAAC,EAAE,oBAAoB,CAAC;CAClD,GACS,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC,CAwEjE;AAED;;;GAGG;AACH,4DAHW,OAAO,qBAAqB,EAAE,YAAY,GACxC,OAAO,qBAAqB,EAAE,YAAY,CAYtD;AAED;;;GAGG;AACH,gDAHW,OAAO,qBAAqB,EAAE,YAAY,GACxC,OAAO,qBAAqB,EAAE,YAAY,CAYtD;AAED;;;;;;GAMG;AACH,qFANW;IACN,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,qBAAqB,EAAE,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,OAAO,qBAAqB,EAAE,sBAAsB,CAAC;CACzE,WAQH;AAED;;GAEG;AACH,iEAFW,OAAO,qBAAqB,EAA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AO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CACzD,mBAuBH;0CArYY;IACR,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;mCAIS,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU;8CAI1E;IACR,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;CAClB;6CAhCG,mCAAmC"}
1
+ {"version":3,"file":"socialPreviewImages.d.ts","sourceRoot":"","sources":["../../src/socialPreviewImages.js"],"names":[],"mappings":"AAuBA;;;;;;;GAOG;AAEH;;GAEG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;GASG;AACH,8IATW;IACN,KAAK,EAAE,OAAO,qBAAqB,EAAE,YAAY,CAAC;IAClD,gBAAgB,CAAC,EAAE,OAAO,qBAAqB,EAAE,sBAAsB,CAAC;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yBAAyB,CAAC,EAAE,oBAAoB,CAAC;CAClD,GACS,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC,CAsCjE;AAwED;;;GAGG;AACH,4DAHW,OAAO,qBAAqB,EAAE,YAAY,GACxC,OAAO,qBAAqB,EAAE,YAAY,CAYtD;AAED;;;GAGG;AACH,gDAHW,OAAO,qBAAqB,EAAE,YAAY,GACxC,OAAO,qBAAqB,EAAE,YAAY,CAYtD;AAED;;;;;;GAMG;AACH,qFANW;IACN,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,qBAAqB,EAAE,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,OAAO,qBAAqB,EAAE,sBAAsB,CAAC;CACzE,WAQH;AAED;;GAEG;AACH,iE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AAM,KAAK,OAAO,CAAC;IACvC,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CACzD,mBAqCH;0CA5bY;IACR,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;mCAIS,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,UAAU,CAAC,GAAG,UAAU;8CAI1E;IACR,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;CAClB;6CAhCG,mCAAmC"}
@@ -3,4 +3,7 @@
3
3
  * @returns {Promise<string>}
4
4
  */
5
5
  export function ssrRender(template: string | import("lit").TemplateResult): Promise<string>;
6
+ import { html } from 'lit';
7
+ import { render } from '@lit-labs/ssr';
8
+ export { html, render };
6
9
  //# sourceMappingURL=ssr.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../src/ssr.js"],"names":[],"mappings":"AAIA;;;GAGG;AACH,oCAHW,MAAM,GAAG,OAAO,KAAK,EAAE,cAAc,GACnC,OAAO,CAAC,MAAM,CAAC,CAO3B"}
1
+ {"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../src/ssr.js"],"names":[],"mappings":"AAOA;;;GAGG;AACH,oCAHW,MAAM,GAAG,OAAO,KAAK,EAAE,cAAc,GACnC,OAAO,CAAC,MAAM,CAAC,CAO3B;qBAboB,KAAK;uBAFH,eAAe"}
@@ -0,0 +1,33 @@
1
+ /** @typedef {import('@rocket/js/types.js').Page} Page */
2
+ /** @typedef {import('@rocket/js/types.js').PageRegistry} PageRegistry */
3
+ /** @typedef {import('@rocket/js/types.js').PageStaticParams} PageStaticParams */
4
+ /** @typedef {import('@rocket/js/types.js').PageStaticParamsDeclaration} PageStaticParamsDeclaration */
5
+ /**
6
+ * @param {Page} page
7
+ */
8
+ export function hasStaticParams(page: Page): boolean;
9
+ /**
10
+ * @param {string} pagePath
11
+ */
12
+ export function hasPathParameter(pagePath: string): boolean;
13
+ /**
14
+ * Enumerates the concrete output paths of a parameterized static JavaScript
15
+ * Page from its `staticParams` export.
16
+ *
17
+ * @param {{
18
+ * pages: PageRegistry;
19
+ * page: Page;
20
+ * pagePath: string;
21
+ * }} options
22
+ * @returns {string[]}
23
+ */
24
+ export function staticParamsPagePaths({ pages, page, pagePath }: {
25
+ pages: PageRegistry;
26
+ page: Page;
27
+ pagePath: string;
28
+ }): string[];
29
+ export type Page = import("@rocket/js/types.js").Page;
30
+ export type PageRegistry = import("@rocket/js/types.js").PageRegistry;
31
+ export type PageStaticParams = import("@rocket/js/types.js").PageStaticParams;
32
+ export type PageStaticParamsDeclaration = import("@rocket/js/types.js").PageStaticParamsDeclaration;
33
+ //# sourceMappingURL=static-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-params.d.ts","sourceRoot":"","sources":["../../src/static-params.js"],"names":[],"mappings":"AAEA,yDAAyD;AACzD,yEAAyE;AACzE,iFAAiF;AACjF,uGAAuG;AAEvG;;GAEG;AACH,sCAFW,IAAI,WAId;AAED;;GAEG;AACH,2CAFW,MAAM,WAIhB;AAED;;;;;;;;;;GAUG;AACH,iEAPW;IACN,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB,GACS,MAAM,EAAE,CA8BpB;mBA1Da,OAAO,qBAAqB,EAAE,IAAI;2BAClC,OAAO,qBAAqB,EAAE,YAAY;+BAC1C,OAAO,qBAAqB,EAAE,gBAAgB;0CAC9C,OAAO,qBAAqB,EAAE,2BAA2B"}
@@ -7,4 +7,8 @@ export function mdToJs(md: string): Promise<string>;
7
7
  * @param {string} demo
8
8
  */
9
9
  export function mdToJsSingleDemo(md: string, demo: string): Promise<string>;
10
+ /**
11
+ * @param {import('mdast').Code} node
12
+ */
13
+ export function isDemoCodeNode(node: import("mdast").Code): boolean;
10
14
  //# sourceMappingURL=transform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/transform.js"],"names":[],"mappings":"AA8BA;;GAEG;AACH,2BAFW,MAAM,mBAoChB;AAED;;;GAGG;AACH,qCAHW,MAAM,QACN,MAAM,mBAwChB"}
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/transform.js"],"names":[],"mappings":"AA8BA;;GAEG;AACH,2BAFW,MAAM,mBAoChB;AAED;;;GAGG;AACH,qCAHW,MAAM,QACN,MAAM,mBAsChB;AAoSD;;GAEG;AACH,qCAFW,OAAO,OAAO,EAAE,IAAI,WAI9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"wds-plugin.d.ts","sourceRoot":"","sources":["../../src/wds-plugin.js"],"names":[],"mappings":"yBA8BgB,iBAAO,EAAE,4BAAO,EAAE,kDAAY,EAAE,gDAAY,KADmG,OAAO,sBAAsB,EAAE,MAAM;;iCAJtL,OAAO,qBAAqB,EAAE,kBAAkB;2CAChD;IAAE,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAAC,gBAAgB,CAAC,EAAE,OAAO,qBAAqB,EAAE,sBAAsB,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,OAAO,qBAAqB,EAAE,yBAAyB,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,qBAAqB,EAAE,mBAAmB,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,yBAAyB,CAAC,EAAE,OAAO,0BAA0B,EAAE,oBAAoB,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE;yCACxZ,4BAA4B,GAAG,kBAAkB"}
1
+ {"version":3,"file":"wds-plugin.d.ts","sourceRoot":"","sources":["../../src/wds-plugin.js"],"names":[],"mappings":"yBAkCgB,iBAAO,EAAE,4BAAO,EAAE,kDAAY,EAAE,gDAAY,KADmG,OAAO,sBAAsB,EAAE,MAAM;;iCAJtL,OAAO,qBAAqB,EAAE,kBAAkB;2CAChD;IAAE,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAAC,gBAAgB,CAAC,EAAE,OAAO,qBAAqB,EAAE,sBAAsB,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,OAAO,qBAAqB,EAAE,yBAAyB,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,qBAAqB,EAAE,mBAAmB,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,yBAAyB,CAAC,EAAE,OAAO,0BAA0B,EAAE,oBAAoB,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE;yCACxZ,4BAA4B,GAAG,kBAAkB"}
@@ -0,0 +1,11 @@
1
+ export {
2
+ atlasBlogComponents,
3
+ atlasBlogIndexLayout,
4
+ atlasPostLayout,
5
+ blogTagPath,
6
+ formatBlogDate,
7
+ renderBlogByline,
8
+ renderBlogPagination,
9
+ renderBlogPostList,
10
+ renderBlogTags,
11
+ } from '../../src/layouts/atlas/atlasBlogLayout.js';
package/exports/ssr.js CHANGED
@@ -1 +1 @@
1
- export { ssrRender } from '../src/ssr.js';
1
+ export { html, render, ssrRender } from '../src/ssr.js';
@@ -0,0 +1,26 @@
1
+ import { html } from 'lit';
2
+ import type { AtlasLayoutHeadContent, BlogData, DocData, HeroData } from './rocket.js';
3
+
4
+ const pageAwareHeadContent: AtlasLayoutHeadContent = ({ pageData }) =>
5
+ html`<meta name="page-url" content=${pageData.url} />`;
6
+
7
+ const siteWideHeadContent: AtlasLayoutHeadContent = () =>
8
+ html`<meta name="site-extension" content="enabled" />`;
9
+
10
+ function sharedAtlasHeadContent(data: DocData | HeroData | BlogData) {
11
+ return data.headContent;
12
+ }
13
+
14
+ // @ts-expect-error Atlas Layout Head Content requires a Lit template result.
15
+ const rawStringHeadContent: AtlasLayoutHeadContent = () => '<meta name="raw-string" />';
16
+
17
+ // @ts-expect-error Atlas Layout Head Content is synchronous.
18
+ const asyncHeadContent: AtlasLayoutHeadContent = async () => html`<meta name="async" />`;
19
+
20
+ export {
21
+ asyncHeadContent,
22
+ pageAwareHeadContent,
23
+ rawStringHeadContent,
24
+ sharedAtlasHeadContent,
25
+ siteWideHeadContent,
26
+ };
@@ -322,6 +322,8 @@ export type JsPage = (
322
322
  export type Module = {
323
323
  config: PageConfig;
324
324
  pagination?: PagePaginationDeclaration;
325
+ feed?: PageFeedDeclaration;
326
+ staticParams?: PageStaticParamsDeclaration;
325
327
  components?: Components;
326
328
  _$title$?: string;
327
329
  _$menuLinkText$?: string;
@@ -411,6 +413,37 @@ export type PagePagination = {
411
413
  previousPath?: string;
412
414
  };
413
415
 
416
+ export type PageFeedConfig = {
417
+ /**
418
+ * Feed display title.
419
+ */
420
+ title: string;
421
+ /**
422
+ * Optional feed subtitle text.
423
+ */
424
+ description?: string;
425
+ /**
426
+ * Page Collection entries included as feed entries, in collection order.
427
+ */
428
+ collection: PageCollectionEntry[];
429
+ /**
430
+ * Optional maximum number of feed entries taken from the start of the collection.
431
+ */
432
+ limit?: number;
433
+ };
434
+
435
+ export type PageFeedDeclaration = PageFeedConfig | ((pageData: PageData) => PageFeedConfig);
436
+
437
+ /**
438
+ * Concrete param values for one generated output document of a parameterized static
439
+ * JavaScript Page. Every route param in the Page path must be present.
440
+ */
441
+ export type PageStaticParams = Record<string, string>;
442
+
443
+ export type PageStaticParamsDeclaration =
444
+ | PageStaticParams[]
445
+ | ((pageData: PageData) => PageStaticParams[]);
446
+
414
447
  export type PageRegistrySortDirection = 'asc' | 'desc';
415
448
 
416
449
  export type PageRegistryQueryOptions = {
@@ -569,7 +602,24 @@ export type WorkflowData = {
569
602
  steps: WorkflowStep[];
570
603
  };
571
604
 
572
- export type HeroData = {
605
+ export type AtlasLayoutHeadContentContext = {
606
+ /** The current PageData for this Page render. */
607
+ pageData: PageData;
608
+ };
609
+
610
+ /**
611
+ * Returns trusted Site Author markup appended after Atlas-owned document head content.
612
+ */
613
+ export type AtlasLayoutHeadContent = (context: AtlasLayoutHeadContentContext) => TemplateResult;
614
+
615
+ type AtlasLayoutHeadContentData = {
616
+ /**
617
+ * Trusted Site Author markup evaluated once and appended after Atlas-owned document head content.
618
+ */
619
+ headContent?: AtlasLayoutHeadContent;
620
+ };
621
+
622
+ export type HeroData = AtlasLayoutHeadContentData & {
573
623
  headerData: HeaderData;
574
624
  footerData: FooterSection[];
575
625
  /**
@@ -584,13 +634,31 @@ export type HeroData = {
584
634
  secondaryLinksData?: FooterLink[];
585
635
  };
586
636
 
637
+ export type BlogData = AtlasLayoutHeadContentData & {
638
+ headerData: HeaderData;
639
+ /**
640
+ * Project-owned stylesheet URLs loaded after the package Atlas layout stylesheets.
641
+ */
642
+ stylesheets?: string[];
643
+ /**
644
+ * Site-root path prefix for tag archive links, e.g. '/blog/tags/'. Tags render as
645
+ * plain text when omitted.
646
+ */
647
+ tagPathPrefix?: string;
648
+ /**
649
+ * Site-root path of the blog's Page Feed, e.g. '/blog/feed.xml'. Adds a feed
650
+ * alternate link to the document head and a visible feed link on the index.
651
+ */
652
+ feedPath?: string;
653
+ };
654
+
587
655
  export type AtlasDocAsideTip = {
588
656
  title?: string;
589
657
  description: string;
590
658
  iconName?: string;
591
659
  };
592
660
 
593
- export type DocData = {
661
+ export type DocData = AtlasLayoutHeadContentData & {
594
662
  headerData: HeaderData;
595
663
  footerData: FooterSection[];
596
664
  /**
package/exports/types.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  export type {
2
+ AtlasLayoutHeadContent,
3
+ AtlasLayoutHeadContentContext,
2
4
  AtlasDocAsideTip,
5
+ BlogData,
3
6
  Components,
4
7
  DocData,
5
8
  Feature,
@@ -27,6 +30,8 @@ export type {
27
30
  PageCollectionEntry,
28
31
  PageDiscoverabilityConfig,
29
32
  PageConfig,
33
+ PageFeedConfig,
34
+ PageFeedDeclaration,
30
35
  PageMetadata,
31
36
  PageMetadataConfig,
32
37
  PageMetadataCustom,
@@ -38,6 +43,8 @@ export type {
38
43
  PageRegistryQuery,
39
44
  PageRegistryQueryOptions,
40
45
  PageRegistrySortDirection,
46
+ PageStaticParams,
47
+ PageStaticParamsDeclaration,
41
48
  PageTree,
42
49
  PackageIconLibrarySource,
43
50
  PathIconLibrarySource,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocket/js",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "HTML-first static-site metaframework for content sites and Web Component docs.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,6 +16,7 @@
16
16
  "types": "./dist-types/exports/*",
17
17
  "default": "./exports/*"
18
18
  },
19
+ "./layouts/atlasBlog.css": "./src/layouts/atlas/atlasBlog.css",
19
20
  "./layouts/atlasDoc.css": "./src/layouts/atlas/atlasDoc.css",
20
21
  "./layouts/atlasHero.css": "./src/layouts/atlas/atlasHero.css",
21
22
  "./layouts/atlasNotFound.css": "./src/layouts/atlas/atlasNotFound.css",
@@ -51,7 +52,7 @@
51
52
  "build": "rm -rf dist && npx rocket build",
52
53
  "build:start": "npx http-server dist -o",
53
54
  "ai:do": "node scripts/codex-issue-loop.js",
54
- "ai:do:loop": "node scripts/codex-issue-loop.js --max 6",
55
+ "ai:do-loop": "node scripts/codex-issue-loop.js --max 6",
55
56
  "ai:check": "node scripts/codex-issue-loop.js --dry-run",
56
57
  "lint": "eslint . --ignore-pattern .gitignore && prettier \"**/*.{ts,js,json,md}\" --check --ignore-path .gitignore --ignore-path .prettierignore",
57
58
  "format": "eslint . --ignore-pattern .gitignore --fix && prettier \"**/*.{ts,js,json,md}\" --write --ignore-path .gitignore --ignore-path .prettierignore",
@@ -65,31 +66,20 @@
65
66
  "prepack": "npm run types",
66
67
  "release": "changeset publish"
67
68
  },
68
- "eslintConfig": {
69
- "overrides": [
70
- {
71
- "files": [
72
- "*.demo.js"
73
- ],
74
- "rules": {
75
- "no-console": "off"
76
- }
77
- }
78
- ]
79
- },
80
69
  "bin": {
81
70
  "rocket": "src/cli/cli.js"
82
71
  },
83
72
  "dependencies": {
84
73
  "@awesome.me/webawesome": "^3.7.0",
85
74
  "@lit-labs/ssr": "^4.1.0",
86
- "@sparticuz/chromium": "^148.0.0",
75
+ "@sparticuz/chromium": "^149.0.0",
87
76
  "@web/dev-server": "^0.4.6",
88
77
  "bootstrap-icons": "^1.13.1",
89
- "commander": "14.0.3",
78
+ "commander": "^15.0.0",
90
79
  "es-module-lexer": "^2.1.0",
80
+ "import-meta-resolve": "^4.2.0",
91
81
  "lit": "^3.3.3",
92
- "parse5": "^7.3.0",
82
+ "parse5": "^8.0.1",
93
83
  "puppeteer-core": "^25.1.0",
94
84
  "rehype-autolink-headings": "^7.1.0",
95
85
  "rehype-prism-plus": "^2.0.2",
@@ -98,40 +88,33 @@
98
88
  "rehype-stringify": "^10.0.1",
99
89
  "remark-gfm": "^4.0.1",
100
90
  "remark-rehype": "^11.1.2",
101
- "typescript": "6.0.3",
91
+ "typescript": "^6.0.3",
102
92
  "unified": "^11.0.5",
103
- "unist-util-inspect": "8.1.0",
104
93
  "unist-util-remove": "^4.0.0",
105
94
  "unist-util-visit": "^5.1.0",
106
- "urlpattern-polyfill": "10.1.0",
95
+ "urlpattern-polyfill": "^10.1.0",
107
96
  "vite": "^8.0.14"
108
97
  },
109
98
  "devDependencies": {
110
99
  "@changesets/cli": "^2.31.0",
111
100
  "@eslint/eslintrc": "^3.3.5",
112
101
  "@eslint/js": "^10.0.1",
113
- "@netlify/functions": "^5.2.2",
114
102
  "@open-wc/testing": "^4.0.0",
115
103
  "@types/hast": "^3.0.4",
116
- "@types/mdast": "4.0.4",
117
- "@types/node": "^24.12.4",
104
+ "@types/mdast": "^4.0.4",
105
+ "@types/node": "^24.13.3",
118
106
  "@typescript-eslint/eslint-plugin": "^8.59.4",
119
107
  "@typescript-eslint/parser": "^8.59.4",
120
- "@web/mocks": "^2.0.0",
121
108
  "@web/test-runner": "^0.20.2",
122
- "@web/test-runner-playwright": "^0.11.1",
123
- "dotenv": "^17.4.2",
124
109
  "eslint": "^10.4.0",
125
110
  "eslint-config-prettier": "^10.1.8",
126
111
  "eslint-plugin-no-only-tests": "^3.4.0",
127
112
  "globals": "^17.6.0",
128
113
  "netlify-cli": "^26.0.2",
129
- "patch-package": "^8.0.1",
130
114
  "prettier": "^3.8.3",
131
115
  "prettier-plugin-packagejson": "^3.0.2",
132
- "typescript": "6.0.3",
133
116
  "typescript-eslint": "^8.59.4",
134
- "vfile": "6.0.3",
117
+ "vfile": "^6.0.3",
135
118
  "wireit": "^0.14.12"
136
119
  },
137
120
  "engines": {
@@ -145,7 +128,7 @@
145
128
  },
146
129
  "wireit": {
147
130
  "deploy": {
148
- "command": "rm -f ../../node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node && netlify deploy --prod --site 2439aca3-b7d1-495c-bb8a-478ce089b666 --no-build",
131
+ "command": "netlify deploy --prod --site 2439aca3-b7d1-495c-bb8a-478ce089b666 --no-build",
149
132
  "files": [
150
133
  "dist/**/*"
151
134
  ],
@@ -159,7 +142,8 @@
159
142
  "command": "tsc --build --pretty",
160
143
  "files": [
161
144
  "src/**/*",
162
- "types/**/*",
145
+ "exports/**/*",
146
+ "docs/**/*.js",
163
147
  "tsconfig.json"
164
148
  ],
165
149
  "output": [
@@ -186,6 +170,7 @@
186
170
  "files": [
187
171
  "exports/**/*",
188
172
  "src/**/*",
173
+ "scripts/**/*.js",
189
174
  "!src/**/*.test-browser.js"
190
175
  ],
191
176
  "output": []
package/src/PageData.js CHANGED
@@ -26,11 +26,14 @@ export class PageData {
26
26
  url,
27
27
  { siteHeadMetadata, pageSiteHeadMetadata, defaultSocialPreviewImage, siteOrigin } = {},
28
28
  ) {
29
- const pageMetadata = typeof metadata === 'string' ? { title: metadata } : metadata;
29
+ // Copy so layout/page writes (e.g. the title setter) never mutate the
30
+ // shared Page Registry across renders.
31
+ const pageMetadata = typeof metadata === 'string' ? { title: metadata } : { ...metadata };
30
32
  this.pageRegistry = pageRegistry;
31
33
  /** @type {import('@rocket/js/types.js').PageRegistryQuery} */
32
34
  this.pages = new PageRegistryQuery(pageRegistry);
33
- this.pageTree = treeFromPages(pageRegistry);
35
+ /** @type {import('@rocket/js/types.js').PageTree | undefined} */
36
+ this._pageTree = undefined;
34
37
  this._clientCode = '';
35
38
  this._hydrationScript = '';
36
39
  /** @type {boolean} */
@@ -64,6 +67,13 @@ export class PageData {
64
67
  : undefined;
65
68
  }
66
69
 
70
+ get pageTree() {
71
+ if (!this._pageTree) {
72
+ this._pageTree = treeFromPages(this.pageRegistry);
73
+ }
74
+ return this._pageTree;
75
+ }
76
+
67
77
  get title() {
68
78
  return this.metadata.title;
69
79
  }
@@ -279,6 +279,7 @@ export class RocketJsDemo extends LitElement {
279
279
  max-width: 100%;
280
280
  min-width: min-content;
281
281
  background: white;
282
+ z-index: 0;
282
283
  }
283
284
 
284
285
  #bottom {