@elmethis/core 0.17.0 → 0.19.0

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.
@@ -889,16 +889,23 @@
889
889
  },
890
890
  "html": {
891
891
  "type": "string",
892
- "description": "Raw HTML markup to render inside a sandboxed iframe."
892
+ "description": "Raw HTML markup to render inside a sandboxed iframe. Mutually exclusive with `src` — provide exactly one of the two."
893
+ },
894
+ "src": {
895
+ "type": "string",
896
+ "description": "URL of a remote document to render inside the iframe instead of inline `html` (e.g. a presigned, time-limited link). Mutually exclusive with `html` — provide exactly one of the two. `autoHeight` doesn't apply here since cross-origin content can't be measured, and a time-limited URL isn't refreshed automatically — the caller is responsible for keeping it current."
893
897
  },
894
898
  "autoHeight": {
895
899
  "type": "boolean",
896
- "description": "Stretch the iframe to fit its content height. Defaults to true."
900
+ "description": "Stretch the iframe to fit its content height. Defaults to true. Only takes effect for `html`-rendered content."
901
+ },
902
+ "allowScripts": {
903
+ "type": "boolean",
904
+ "description": "Allow the embedded content to run JavaScript (adds the iframe sandbox's `allow-scripts` token). Defaults to false — script execution is disabled by default. `allow-same-origin` is never granted together with this, in `html` or `src` mode, so the embedded document can never escape the sandbox even with scripts enabled."
897
905
  }
898
906
  },
899
907
  "required": [
900
- "component",
901
- "html"
908
+ "component"
902
909
  ]
903
910
  }
904
911
  ],
package/dist/index.cjs CHANGED
@@ -267,15 +267,19 @@ const BlockImageApi = {
267
267
  }).strict()
268
268
  };
269
269
  /**
270
- * Sandboxed raw-HTML embed. Renders `html` inside an iframe (e.g. a
271
- * Claude-authored artifact or a Notion page export).
270
+ * Sandboxed HTML embed, rendered inside an iframe. Provide exactly one of
271
+ * `html` (inline markup, e.g. a Claude-authored artifact or a Notion page
272
+ * export) or `src` (a remote document URL) — this catalog doesn't validate
273
+ * cross-field constraints, so the contract is documentation-only.
272
274
  */
273
275
  const HtmlApi = {
274
276
  name: "Html",
275
277
  schema: zod.z.object({
276
278
  ...CommonProps,
277
- html: zod.z.string().describe("Raw HTML markup to render inside a sandboxed iframe."),
278
- autoHeight: zod.z.boolean().describe("Stretch the iframe to fit its content height. Defaults to true.").optional()
279
+ html: zod.z.string().describe("Raw HTML markup to render inside a sandboxed iframe. Mutually exclusive with `src` — provide exactly one of the two.").optional(),
280
+ src: zod.z.string().describe("URL of a remote document to render inside the iframe instead of inline `html` (e.g. a presigned, time-limited link). Mutually exclusive with `html` — provide exactly one of the two. `autoHeight` doesn't apply here since cross-origin content can't be measured, and a time-limited URL isn't refreshed automatically — the caller is responsible for keeping it current.").optional(),
281
+ autoHeight: zod.z.boolean().describe("Stretch the iframe to fit its content height. Defaults to true. Only takes effect for `html`-rendered content.").optional(),
282
+ allowScripts: zod.z.boolean().describe("Allow the embedded content to run JavaScript (adds the iframe sandbox's `allow-scripts` token). Defaults to false — script execution is disabled by default. `allow-same-origin` is never granted together with this, in `html` or `src` mode, so the embedded document can never escape the sandbox even with scripts enabled.").optional()
279
283
  }).strict()
280
284
  };
281
285
  const CodeBlockApi = {
package/dist/index.d.cts CHANGED
@@ -2556,14 +2556,18 @@ declare const BlockImageApi: {
2556
2556
  }>;
2557
2557
  };
2558
2558
  /**
2559
- * Sandboxed raw-HTML embed. Renders `html` inside an iframe (e.g. a
2560
- * Claude-authored artifact or a Notion page export).
2559
+ * Sandboxed HTML embed, rendered inside an iframe. Provide exactly one of
2560
+ * `html` (inline markup, e.g. a Claude-authored artifact or a Notion page
2561
+ * export) or `src` (a remote document URL) — this catalog doesn't validate
2562
+ * cross-field constraints, so the contract is documentation-only.
2561
2563
  */
2562
2564
  declare const HtmlApi: {
2563
2565
  name: string;
2564
2566
  schema: z.ZodObject<{
2565
- html: z.ZodString;
2567
+ html: z.ZodOptional<z.ZodString>;
2568
+ src: z.ZodOptional<z.ZodString>;
2566
2569
  autoHeight: z.ZodOptional<z.ZodBoolean>;
2570
+ allowScripts: z.ZodOptional<z.ZodBoolean>;
2567
2571
  accessibility: z.ZodOptional<z.ZodObject<{
2568
2572
  label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
2569
2573
  path: z.ZodString;
@@ -2636,7 +2640,6 @@ declare const HtmlApi: {
2636
2640
  }>>;
2637
2641
  weight: z.ZodOptional<z.ZodNumber>;
2638
2642
  }, "strict", z.ZodTypeAny, {
2639
- html: string;
2640
2643
  accessibility?: {
2641
2644
  description?: string | {
2642
2645
  path: string;
@@ -2654,9 +2657,11 @@ declare const HtmlApi: {
2654
2657
  } | undefined;
2655
2658
  } | undefined;
2656
2659
  weight?: number | undefined;
2660
+ src?: string | undefined;
2661
+ html?: string | undefined;
2657
2662
  autoHeight?: boolean | undefined;
2663
+ allowScripts?: boolean | undefined;
2658
2664
  }, {
2659
- html: string;
2660
2665
  accessibility?: {
2661
2666
  description?: string | {
2662
2667
  path: string;
@@ -2674,7 +2679,10 @@ declare const HtmlApi: {
2674
2679
  } | undefined;
2675
2680
  } | undefined;
2676
2681
  weight?: number | undefined;
2682
+ src?: string | undefined;
2683
+ html?: string | undefined;
2677
2684
  autoHeight?: boolean | undefined;
2685
+ allowScripts?: boolean | undefined;
2678
2686
  }>;
2679
2687
  };
2680
2688
  declare const CodeBlockApi: {
package/dist/index.d.mts CHANGED
@@ -2556,14 +2556,18 @@ declare const BlockImageApi: {
2556
2556
  }>;
2557
2557
  };
2558
2558
  /**
2559
- * Sandboxed raw-HTML embed. Renders `html` inside an iframe (e.g. a
2560
- * Claude-authored artifact or a Notion page export).
2559
+ * Sandboxed HTML embed, rendered inside an iframe. Provide exactly one of
2560
+ * `html` (inline markup, e.g. a Claude-authored artifact or a Notion page
2561
+ * export) or `src` (a remote document URL) — this catalog doesn't validate
2562
+ * cross-field constraints, so the contract is documentation-only.
2561
2563
  */
2562
2564
  declare const HtmlApi: {
2563
2565
  name: string;
2564
2566
  schema: z.ZodObject<{
2565
- html: z.ZodString;
2567
+ html: z.ZodOptional<z.ZodString>;
2568
+ src: z.ZodOptional<z.ZodString>;
2566
2569
  autoHeight: z.ZodOptional<z.ZodBoolean>;
2570
+ allowScripts: z.ZodOptional<z.ZodBoolean>;
2567
2571
  accessibility: z.ZodOptional<z.ZodObject<{
2568
2572
  label: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
2569
2573
  path: z.ZodString;
@@ -2636,7 +2640,6 @@ declare const HtmlApi: {
2636
2640
  }>>;
2637
2641
  weight: z.ZodOptional<z.ZodNumber>;
2638
2642
  }, "strict", z.ZodTypeAny, {
2639
- html: string;
2640
2643
  accessibility?: {
2641
2644
  description?: string | {
2642
2645
  path: string;
@@ -2654,9 +2657,11 @@ declare const HtmlApi: {
2654
2657
  } | undefined;
2655
2658
  } | undefined;
2656
2659
  weight?: number | undefined;
2660
+ src?: string | undefined;
2661
+ html?: string | undefined;
2657
2662
  autoHeight?: boolean | undefined;
2663
+ allowScripts?: boolean | undefined;
2658
2664
  }, {
2659
- html: string;
2660
2665
  accessibility?: {
2661
2666
  description?: string | {
2662
2667
  path: string;
@@ -2674,7 +2679,10 @@ declare const HtmlApi: {
2674
2679
  } | undefined;
2675
2680
  } | undefined;
2676
2681
  weight?: number | undefined;
2682
+ src?: string | undefined;
2683
+ html?: string | undefined;
2677
2684
  autoHeight?: boolean | undefined;
2685
+ allowScripts?: boolean | undefined;
2678
2686
  }>;
2679
2687
  };
2680
2688
  declare const CodeBlockApi: {
package/dist/index.mjs CHANGED
@@ -266,15 +266,19 @@ const BlockImageApi = {
266
266
  }).strict()
267
267
  };
268
268
  /**
269
- * Sandboxed raw-HTML embed. Renders `html` inside an iframe (e.g. a
270
- * Claude-authored artifact or a Notion page export).
269
+ * Sandboxed HTML embed, rendered inside an iframe. Provide exactly one of
270
+ * `html` (inline markup, e.g. a Claude-authored artifact or a Notion page
271
+ * export) or `src` (a remote document URL) — this catalog doesn't validate
272
+ * cross-field constraints, so the contract is documentation-only.
271
273
  */
272
274
  const HtmlApi = {
273
275
  name: "Html",
274
276
  schema: z.object({
275
277
  ...CommonProps,
276
- html: z.string().describe("Raw HTML markup to render inside a sandboxed iframe."),
277
- autoHeight: z.boolean().describe("Stretch the iframe to fit its content height. Defaults to true.").optional()
278
+ html: z.string().describe("Raw HTML markup to render inside a sandboxed iframe. Mutually exclusive with `src` — provide exactly one of the two.").optional(),
279
+ src: z.string().describe("URL of a remote document to render inside the iframe instead of inline `html` (e.g. a presigned, time-limited link). Mutually exclusive with `html` — provide exactly one of the two. `autoHeight` doesn't apply here since cross-origin content can't be measured, and a time-limited URL isn't refreshed automatically — the caller is responsible for keeping it current.").optional(),
280
+ autoHeight: z.boolean().describe("Stretch the iframe to fit its content height. Defaults to true. Only takes effect for `html`-rendered content.").optional(),
281
+ allowScripts: z.boolean().describe("Allow the embedded content to run JavaScript (adds the iframe sandbox's `allow-scripts` token). Defaults to false — script execution is disabled by default. `allow-same-origin` is never granted together with this, in `html` or `src` mode, so the embedded document can never escape the sandbox even with scripts enabled.").optional()
278
282
  }).strict()
279
283
  };
280
284
  const CodeBlockApi = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elmethis/core",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "author": {
5
5
  "name": "Ikuma Yamashita",
6
6
  "url": "https://www.ikuma.cloud/"