@ampless/plugin-x-embed 1.0.0-alpha.8 → 1.0.0-alpha.9

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 (2) hide show
  1. package/dist/editor.js +2 -1
  2. package/package.json +1 -1
package/dist/editor.js CHANGED
@@ -175,7 +175,8 @@ var tiptapNodeToHtml = {
175
175
  const tweetId = String(node.attrs?.tweetId ?? "").trim();
176
176
  if (!tweetId) return null;
177
177
  const attrs = placeholderAttrs(node.attrs ?? {});
178
- return `<div ${attrsToHtmlString(attrs)}><span>Tweet: ${escapeAttr(tweetId)}</span></div>`;
178
+ const url = `https://x.com/i/status/${tweetId}`;
179
+ return `<div ${attrsToHtmlString(attrs)}><a href="${escapeAttr(url)}">${escapeAttr(url)}</a></div>`;
179
180
  }
180
181
  };
181
182
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampless/plugin-x-embed",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0-alpha.9",
4
4
  "description": "x.com (Twitter) embed plugin for ampless — renders tweet URLs inline as blockquotes hydrated by widgets.js",
5
5
  "license": "MIT",
6
6
  "type": "module",