cirrojs 0.0.6 → 0.0.7

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/CHANGELOG.md CHANGED
@@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
13
13
 
14
14
  ## [Unreleased]
15
15
 
16
+ ## [0.0.7] - 2026-06-19
17
+
18
+ ### Added
19
+ - The `Island` component now accepts an optional `className` prop, which is applied to its top-level wrapper element.
20
+
16
21
  ## [0.0.6] - 2026-06-19
17
22
 
18
23
  ### Fixed
@@ -46,7 +51,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
46
51
  ## 0.0.1 - 2026-06-15
47
52
  - initial release
48
53
 
49
- [Unreleased]: https://github.com/osawa-naotaka/cirro/compare/v0.0.6...HEAD
54
+ [Unreleased]: https://github.com/osawa-naotaka/cirro/compare/v0.0.7...HEAD
55
+ [0.0.7]: https://github.com/osawa-naotaka/cirro/compare/v0.0.6...v0.0.7
50
56
  [0.0.6]: https://github.com/osawa-naotaka/cirro/compare/v0.0.5...v0.0.6
51
57
  [0.0.5]: https://github.com/osawa-naotaka/cirro/compare/v0.0.4...v0.0.5
52
58
  [0.0.4]: https://github.com/osawa-naotaka/cirro/compare/v0.0.3...v0.0.4
package/dist/server.d.ts CHANGED
@@ -7,11 +7,14 @@ import { Schema } from "hast-util-sanitize";
7
7
  type IslandRegistry = Record<string, ComponentType<any>>;
8
8
  declare function createIsland<R extends IslandRegistry>(islands: R): <K extends keyof R & string>({
9
9
  name,
10
- props
10
+ props,
11
+ className
11
12
  }: {
12
13
  name: K;
13
14
  props: ComponentProps<R[K]>;
15
+ className?: string;
14
16
  }) => import("react").DetailedReactHTMLElement<{
17
+ className: string | undefined;
15
18
  "data-island": K;
16
19
  "data-props": string;
17
20
  dangerouslySetInnerHTML: {
package/dist/server.js CHANGED
@@ -1 +1 @@
1
- import{createElement as e}from"react";import{renderToString as t}from"react-dom/server";import n from"rehype-prism";import r,{defaultSchema as i}from"rehype-sanitize";import a from"rehype-stringify";import o from"remark-export-toc";import s from"remark-parse";import c from"remark-rehype";import{unified as l}from"unified";import{jsx as u}from"react/jsx-runtime";function d(n){return function({name:r,props:i}){let a=t(e(n[r],i));return e(`div`,{"data-island":r,"data-props":JSON.stringify(i),dangerouslySetInnerHTML:{__html:a}})}}function f(e={}){let t={prefix:`heading`,startLevel:2,...typeof e.toc==`object`?e.toc:{}},d={...i,clobber:(i.clobber??[]).filter(e=>e!==`id`)},f=e.sanitizeSchema?e.sanitizeSchema(d):d,p=l().use(s).use(e.remarkPlugins??[]).use(e.toc?[[o,t]]:[]).use(c).use(e.rehypePlugins??[]).use(r,f).use(e.highlight?[n]:[]).use(a).freeze();function m(e,t){return u(`div`,{className:t,dangerouslySetInnerHTML:{__html:e}})}function h(e,t){let n=p.processSync(e),r=n.data.toc??[];return{body:m(String(n),t?.className),toc:r}}function g({source:e,className:t}){return h(e,{className:t}).body}return{Markdown:g,render:h}}export{d as createIsland,f as createMarkdown};
1
+ import{createElement as e}from"react";import{renderToString as t}from"react-dom/server";import n from"rehype-prism";import r,{defaultSchema as i}from"rehype-sanitize";import a from"rehype-stringify";import o from"remark-export-toc";import s from"remark-parse";import c from"remark-rehype";import{unified as l}from"unified";import{jsx as u}from"react/jsx-runtime";function d(n){return function({name:r,props:i,className:a}){let o=t(e(n[r],i));return e(`div`,{className:a,"data-island":r,"data-props":JSON.stringify(i),dangerouslySetInnerHTML:{__html:o}})}}function f(e={}){let t={prefix:`heading`,startLevel:2,...typeof e.toc==`object`?e.toc:{}},d={...i,clobber:(i.clobber??[]).filter(e=>e!==`id`)},f=e.sanitizeSchema?e.sanitizeSchema(d):d,p=l().use(s).use(e.remarkPlugins??[]).use(e.toc?[[o,t]]:[]).use(c).use(e.rehypePlugins??[]).use(r,f).use(e.highlight?[n]:[]).use(a).freeze();function m(e,t){return u(`div`,{className:t,dangerouslySetInnerHTML:{__html:e}})}function h(e,t){let n=p.processSync(e),r=n.data.toc??[];return{body:m(String(n),t?.className),toc:r}}function g({source:e,className:t}){return h(e,{className:t}).body}return{Markdown:g,render:h}}export{d as createIsland,f as createMarkdown};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cirrojs",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "React islands SSG with strict CSP (no unsafe-inline). Vite-based, MPA-first.",
5
5
  "license": "MIT",
6
6
  "type": "module",