@riebeckite/plugin-responsive-image 0.0.14 → 0.0.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.
package/README.md CHANGED
@@ -90,4 +90,5 @@ commit them next to the original image. Sites copy referenced vault assets into
90
90
 
91
91
  ## See also
92
92
 
93
- - [Plugin guide](../../../docs/en/reference/plugin-api.md)
93
+ - [Plugin guide](../../../docs/en/docs/reference/plugin-api.md)
94
+
package/README_ja.md CHANGED
@@ -70,4 +70,5 @@ export default defineConfig({
70
70
 
71
71
  ## ????
72
72
 
73
- - [?????????](../../../docs/ja/reference/plugin-api.md)
73
+ - [?????????](../../../docs/ja/docs/reference/plugin-api.md)
74
+
package/dist/index.js CHANGED
@@ -382,18 +382,19 @@ function serializeAttribute(attribute) {
382
382
  var PLUGIN_NAME = "responsive-image";
383
383
  function responsiveImage(options = {}) {
384
384
  const resolved = resolveResponsiveImageOptions(options);
385
- const tracked = /* @__PURE__ */ new Map();
386
385
  return definePlugin({
387
386
  name: PLUGIN_NAME,
388
387
  order: 100,
388
+ processedContentCache: {
389
+ version: "responsive-image-v1",
390
+ dependencyMode: "none"
391
+ },
392
+ outputDependencies: [{ type: "global" }],
389
393
  options,
390
394
  validateOptions: validateResponsiveImageOptions,
391
395
  extendHtmlPipeline: (pipeline) => {
392
396
  pipeline.use(rehypeResponsiveImage, options);
393
397
  },
394
- onPostProcessed: (context) => {
395
- tracked.set(context.slug, context.content);
396
- },
397
398
  onManifestCreated: (context) => {
398
399
  const knownPaths = collectKnownAssetPaths(context.manifest);
399
400
  for (const entry of context.manifest.entries) {
@@ -401,8 +402,6 @@ function responsiveImage(options = {}) {
401
402
  const html = applyResponsiveImages(entry.html, knownPaths, options);
402
403
  if (html === entry.html) continue;
403
404
  entry.html = html;
404
- const content = tracked.get(entry.slug);
405
- if (content) content.html = html;
406
405
  }
407
406
  if (resolved.generate) {
408
407
  context.logger.warn(
@@ -3,7 +3,7 @@ import type { ResponsiveImageOptions } from "./options.js";
3
3
  * Manifest pass: replace marked `<img>` elements with a `<picture>` element
4
4
  * built from sibling variants that already exist in the content manifest.
5
5
  *
6
- * This is the "dual mutation" step used by the query plugin: the manifest
7
- * entry HTML and the cached `PostContent.html` must stay in sync.
6
+ * The mutated entry HTML becomes the final rendering source; the Core
7
+ * synchronization step makes it visible to `getProcessedContent`.
8
8
  */
9
9
  export declare function applyResponsiveImages(html: string, knownPaths: Iterable<string>, options?: ResponsiveImageOptions): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-responsive-image",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,11 +15,11 @@
15
15
  "./style.css": "./style.css"
16
16
  },
17
17
  "dependencies": {
18
- "@riebeckite/core": "0.0.14"
18
+ "@riebeckite/core": "0.0.15"
19
19
  },
20
20
  "devDependencies": {
21
21
  "tsx": "^4.22.4",
22
- "@riebeckite/test": "0.0.14"
22
+ "@riebeckite/test": "0.0.15"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"