cirrojs 0.0.3 → 0.0.5

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,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
13
13
 
14
14
  ## [Unreleased]
15
15
 
16
+ ## [0.0.5] - 2026-06-18
17
+
18
+ ### Added
19
+ - New `cirrojs/server` entry point exporting the server-only API (`createIsland`, `createMarkdown`, and the `MarkdownConfig`, `RenderResult`, `ToC` types).
20
+
21
+ ### Changed
22
+ - Moved `createIsland` and `createMarkdown` from the main entry point (`cirrojs`) to `cirrojs/server` to keep server-only dependencies (`react-dom/server`, remark/rehype/prismjs) out of the client bundle.
23
+ - Changed the `genCssFn` signature to take a single `GenCssFnOpt` options object (`{ mediaAtRule?, layer? }`) instead of positional arguments.
24
+
25
+ ## [0.0.4] - 2026-06-17
26
+
27
+ ### Added
28
+ - CSS-in-JS system. The `css` and `genCssFn` functions generate scoped styles, and `initCssRegistry` and `getCssRegistry` manage the style registry. All are exported from the package entry point.
29
+ - `Properties` and `CssOpt` types.
30
+
16
31
  ## [0.0.3] - 2026-06-15
17
32
 
18
33
  ### Fixed
@@ -26,6 +41,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
26
41
  ## 0.0.1 - 2026-06-15
27
42
  - initial release
28
43
 
29
- [Unreleased]: https://github.com/osawa-naotaka/cirro/compare/v0.0.3...HEAD
44
+ [Unreleased]: https://github.com/osawa-naotaka/cirro/compare/v0.0.5...HEAD
45
+ [0.0.5]: https://github.com/osawa-naotaka/cirro/compare/v0.0.4...v0.0.5
46
+ [0.0.4]: https://github.com/osawa-naotaka/cirro/compare/v0.0.3...v0.0.4
30
47
  [0.0.3]: https://github.com/osawa-naotaka/cirro/compare/v0.0.2...v0.0.3
31
48
  [0.0.2]: https://github.com/osawa-naotaka/cirro/compare/v0.0.1...v0.0.2
package/dist/cli.js CHANGED
@@ -1 +1 @@
1
- import{r as e,t}from"./router-CJ9aQRbJ.js";import{Fragment as n,createElement as r}from"react";import{renderToStaticMarkup as i}from"react-dom/server";import{dirname as a,join as o,resolve as s}from"node:path";import{mkdir as c,readFile as l,writeFile as u}from"node:fs/promises";import{build as d,createServer as f,createServerModuleRunner as p}from"vite";import{createServer as m}from"node:http";function h(e,t){return r(n,null,e,r(`script`,{async:!0,type:`module`,src:t,key:`cirro-client`}))}function g(e){for(let t of e.plugins){let e=t.api;if(t.name===`cirro`&&e?.options)return e.options}throw Error(`cirro: plugin not found in Vite config (did you add cirro() to plugins?)`)}async function _(){await d();let n=await f({server:{middlewareMode:!0,hmr:!1},appType:`custom`}),r=p(n.environments.ssr);try{let d=n.config,f=g(d),p=d.root,m=s(p,d.build.outDir),_=s(p,f.routes),v=JSON.parse(await l(o(m,`.vite/manifest.json`),`utf-8`))[`virtual:cirro/client`];if(!v)throw Error(`cirro: manifest entry "virtual:cirro/client" not found`);let y=`/${v.file}`,{routes:b}=await r.import(_);for(let n of t(b)){let t=`<!DOCTYPE html>${i(h(n.render(),y))}`,r=o(m,e(n.url));await c(a(r),{recursive:!0}),await u(r,t),console.log(`wrote ${r} (url: ${n.url})`)}}finally{await n.close()}}function v(e,t){let n=[t,t.replaceAll(`\\`,`/`)];for(let t of Object.values(e.environments)){let e=t.moduleGraph;if(!e)continue;let r=new Set,i=t=>{if(!r.has(t)){r.add(t),e.invalidateModule(t);for(let e of t.importers)i(e)}};for(let t of n){let n=e.getModulesByFile(t);if(n)for(let e of n)i(e)}}}async function y(e=5173){let n=await f({server:{middlewareMode:!0},appType:`custom`}),r=p(n.environments.ssr),o=g(n.config),c=n.config.root,l=s(c,o.routes),u=a(s(c,o.islands)).replaceAll(`\\`,`/`),d=m((e,a)=>{n.middlewares(e,a,async()=>{let o=e.url??`/`;try{let{routes:e}=await r.import(l),s=t(e),c=new URL(o,`http://localhost`).pathname.replace(/\/+$/,``)||`/`,u=s.find(e=>(e.url.replace(/\/+$/,``)||`/`)===c);if(!u){a.statusCode=404,a.setHeader(`Content-Type`,`text/html; charset=utf-8`),a.end(`<!DOCTYPE html><meta charset="utf-8"><h1>404 Not Found</h1>`);return}let d=`<!DOCTYPE html>${i(h(u.render(),`/@id/__x00__virtual:cirro/client`))}`;d=await n.transformIndexHtml(o,d),a.statusCode=200,a.setHeader(`Content-Type`,`text/html; charset=utf-8`),a.end(d)}catch(e){a.statusCode=500,a.end(String(e))}})}),_=`${s(c,o.watchDir??`./src`).replaceAll(`\\`,`/`).replace(/\/+$/,``)}/`;n.watcher.on(`change`,e=>{let t=e.replaceAll(`\\`,`/`);t.startsWith(u)||t.startsWith(_)&&(v(n,e),n.ws.send({type:`full-reload`}))}),d.listen(e,()=>{console.log(`cirro dev: http://localhost:${e}`)})}async function b(e){let t=e[0];t===`dev`?await y():t===`build`?await _():(console.error(`usage: cirro <dev|build>`),process.exit(1))}export{b as main};
1
+ import{c as e,l as t,o as n,r}from"./css-DDEJecy6.js";import{Fragment as i,createElement as a}from"react";import{renderToStaticMarkup as o}from"react-dom/server";import{dirname as s,join as c,resolve as l}from"node:path";import{mkdir as u,readFile as d,writeFile as f}from"node:fs/promises";import{build as p,createServer as m,createServerModuleRunner as h}from"vite";import{createServer as g}from"node:http";function _(e,t,n){return a(i,null,e,a(`script`,{async:!0,type:`module`,src:t,key:`cirro-client`}),a(`link`,{rel:`stylesheet`,href:n,precedence:`default`,key:`cirro-css`}))}function v(e){for(let t of e.plugins){let e=t.api;if(t.name===`cirro`&&e?.options)return e.options}throw Error(`cirro: plugin not found in Vite config (did you add cirro() to plugins?)`)}async function y(){await p();let i=await m({server:{middlewareMode:!0,hmr:!1},appType:`custom`}),a=h(i.environments.ssr);try{let p=i.config,m=v(p),h=p.root,g=l(h,p.build.outDir),y=l(h,m.routes),b=JSON.parse(await d(c(g,`.vite/manifest.json`),`utf-8`))[`virtual:cirro/client`];if(!b)throw Error(`cirro: manifest entry "virtual:cirro/client" not found`);let x=`/${b.file}`,{routes:S,getCssRegistry:C,initCssRegistry:w}=await a.import(y);for(let i of n(S)){if(i.isCss){w(),o(i.render());let t=r(C()),n=c(g,e(i.url));await u(s(n),{recursive:!0}),await f(n,t),console.log(`wrote ${n} (url: ${i.url})`);continue}let n=`<!DOCTYPE html>${o(_(i.render(),x,i.cssPath))}`,a=c(g,t(i.url));await u(s(a),{recursive:!0}),await f(a,n),console.log(`wrote ${a} (url: ${i.url})`)}}finally{await i.close()}}function b(e,t){let n=[t,t.replaceAll(`\\`,`/`)];for(let t of Object.values(e.environments)){let e=t.moduleGraph;if(!e)continue;let r=new Set,i=t=>{if(!r.has(t)){r.add(t),e.invalidateModule(t);for(let e of t.importers)i(e)}};for(let t of n){let n=e.getModulesByFile(t);if(n)for(let e of n)i(e)}}}async function x(e=5173){let t=await m({server:{middlewareMode:!0},appType:`custom`}),i=h(t.environments.ssr),a=v(t.config),c=t.config.root,u=l(c,a.routes),d=s(l(c,a.islands)).replaceAll(`\\`,`/`),f=g((e,a)=>{t.middlewares(e,a,async()=>{let s=e.url??`/`;try{let{routes:e,getCssRegistry:c,initCssRegistry:l}=await i.import(u),d=n(e);if(s.endsWith(`.css`)){let e=d.find(e=>e.isCss&&e.url===s);if(!e){a.statusCode=404,a.end();return}l(),o(e.render());let t=r(c());a.statusCode=200,a.setHeader(`Content-Type`,`text/css; charset=utf-8`),a.end(t);return}let f=new URL(s,`http://localhost`).pathname.replace(/\/+$/,``)||`/`,p=d.find(e=>(e.url.replace(/\/+$/,``)||`/`)===f);if(!p){a.statusCode=404,a.setHeader(`Content-Type`,`text/html; charset=utf-8`),a.end(`<!DOCTYPE html><meta charset="utf-8"><h1>404 Not Found</h1>`);return}let m=`<!DOCTYPE html>${o(_(p.render(),`/@id/__x00__virtual:cirro/client`,p.cssPath))}`;m=await t.transformIndexHtml(s,m),a.statusCode=200,a.setHeader(`Content-Type`,`text/html; charset=utf-8`),a.end(m)}catch(e){a.statusCode=500,a.end(String(e))}})}),p=`${l(c,a.watchDir??`./src`).replaceAll(`\\`,`/`).replace(/\/+$/,``)}/`;t.watcher.on(`change`,e=>{let n=e.replaceAll(`\\`,`/`);n.startsWith(d)||n.startsWith(p)&&(b(t,e),t.ws.send({type:`full-reload`}))}),f.listen(e,()=>{console.log(`cirro dev: http://localhost:${e}`)})}async function S(e){let t=e[0];t===`dev`?await x():t===`build`?await y():(console.error(`usage: cirro <dev|build>`),process.exit(1))}export{S as main};
@@ -0,0 +1,4 @@
1
+ function e(e){return e}function t(e){let t=[];for(let n of e)if(`getStaticPaths`in n){for(let e of n.getStaticPaths())t.push({url:n.path(e),isCss:!1,cssPath:n.cssPath,render:()=>n.component({params:e})});t.push({url:n.cssPath,isCss:!0,cssPath:n.cssPath,render:()=>n.component({params:n.getStaticPaths()[0]})})}else t.push({url:n.path,isCss:!1,cssPath:i(n.path,`index.css`),render:()=>n.component({params:{}})}),t.push({url:i(n.path,`index.css`),isCss:!0,cssPath:i(n.path,`index.css`),render:()=>n.component({params:{}})});return t}function n(e){return e===`/`?`index.html`:`${e.replace(/^\/+|\/+$/g,``)}/index.html`}function r(e){return e===`/`?`index.css`:`${e.replace(/^\/+|\/+$/g,``)}`}function i(...e){return e.reduce((e,t)=>e.endsWith(`/`)&&t.startsWith(`/`)?`${e}${t.substring(1)}`:e.endsWith(`/`)||t.startsWith(`/`)?`${e}${t}`:`${e}/${t}`,``)}let a=[];function o(e,t){a.push([e,t])}function s(){a=[]}function c(){return a}function l(e,t){let n=t?.selector??`&`,r=t?.atrules??[],i=p(e),a=`${t?.name??`cirro`}-${i.toString(16)}`;return f([...r,n],e,a),a}function u(e){let t=[];return e.layer&&t.push(`@layer ${e.layer}`),e.mediaAtRule&&t.push(`@media (${e.mediaAtRule})`),(e,n)=>l(e,{atrules:t,name:n?.name,selector:n?.selector})}function d(e){let t=`@charset "utf-8";
2
+ @layer base, font, low, main, high;
3
+ `;for(let[n,r]of e)t+=n.reduceRight((e,t)=>`${t} { ${e} }`,Object.entries(r).map(([e,t])=>`${e.replaceAll(`_`,`-`)}: ${t};`).join(` `)),t+=`
4
+ `;return t}function f(e,t,n){o(e.map(e=>e.replaceAll(`&`,`.${n}`)),t)}function p(...e){return m(e.map(e=>JSON.stringify(e)).join(``))}function m(e){let t=5381;for(let n of[...e])t=(t<<5)+t+n.charCodeAt(0)&4294967295;return t>>>0}export{s as a,r as c,c as i,n as l,u as n,t as o,d as r,e as s,l as t};
package/dist/index.d.ts CHANGED
@@ -1,52 +1,5 @@
1
- import { ComponentProps, ComponentType, ReactElement } from "react";
2
- import { ToC, ToC as ToC$1 } from "remark-export-toc";
3
- import { PluggableList } from "unified";
4
- import { Schema } from "hast-util-sanitize";
1
+ import { ReactElement } from "react";
5
2
 
6
- //#region src/island.d.ts
7
- type IslandRegistry = Record<string, ComponentType<any>>;
8
- declare function createIsland<R extends IslandRegistry>(islands: R): <K extends keyof R & string>({
9
- name,
10
- props
11
- }: {
12
- name: K;
13
- props: ComponentProps<R[K]>;
14
- }) => import("react").DetailedReactHTMLElement<{
15
- "data-island": K;
16
- "data-props": string;
17
- dangerouslySetInnerHTML: {
18
- __html: string;
19
- };
20
- }, HTMLElement>;
21
- //#endregion
22
- //#region src/markdown.d.ts
23
- interface MarkdownConfig {
24
- remarkPlugins?: PluggableList;
25
- rehypePlugins?: PluggableList;
26
- sanitizeSchema?: (defaults: Schema) => Schema;
27
- toc?: boolean | {
28
- prefix?: string;
29
- startLevel?: number;
30
- };
31
- highlight?: boolean;
32
- }
33
- interface RenderResult {
34
- body: ReactElement;
35
- toc: ToC$1[];
36
- }
37
- declare function createMarkdown(config?: MarkdownConfig): {
38
- Markdown: ({
39
- source,
40
- className
41
- }: {
42
- source: string;
43
- className?: string;
44
- }) => ReactElement;
45
- render: (source: string, options?: {
46
- className?: string;
47
- }) => RenderResult;
48
- };
49
- //#endregion
50
3
  //#region src/router.d.ts
51
4
  type Params = Record<string, string>;
52
5
  type StaticRoute = {
@@ -57,6 +10,7 @@ type StaticRoute = {
57
10
  };
58
11
  type DynamicRoute<P extends Params = Params> = {
59
12
  path: (params: P) => string;
13
+ cssPath: string;
60
14
  getStaticPaths: () => P[];
61
15
  component: (props: {
62
16
  params: P;
@@ -67,9 +21,490 @@ declare function route<P extends Params>(def: DynamicRoute<P>): DynamicRoute<P>;
67
21
  declare function route(def: StaticRoute): StaticRoute;
68
22
  type ResolvedPage = {
69
23
  url: string;
24
+ isCss: boolean;
25
+ cssPath: string;
70
26
  render: () => ReactElement;
71
27
  };
72
28
  declare function expandRoutes(routes: AnyRoute[]): ResolvedPage[];
73
29
  declare function urlToFilePath(url: string): string;
74
30
  //#endregion
75
- export { type AnyRoute, type DynamicRoute, type MarkdownConfig, type Params, type RenderResult, type ResolvedPage, type StaticRoute, type ToC, createIsland, createMarkdown, expandRoutes, route, urlToFilePath };
31
+ //#region src/properties.d.ts
32
+ type AlignContentBaseKeyword = "normal" | "start" | "center" | "end" | "flex-start" | "flex-end" | "baseline" | "first baseline" | "last baseline" | "space-between" | "space-around" | "space-evenly" | "stretch";
33
+ type AlignContentKeyword = AlignContentBaseKeyword | ["safe", AlignContentBaseKeyword] | ["unsafe", AlignContentBaseKeyword];
34
+ type BackgroundPositionKeyword = "left" | "center" | "right" | "top" | "bottom";
35
+ type BackgroundPositionValue = BackgroundPositionKeyword | string;
36
+ type PInherit = "inherit";
37
+ type PInitial = "initial";
38
+ type PRevert = "revert";
39
+ type PRevertLayer = "revert-layer";
40
+ type PUnset = "unset";
41
+ type PGlobal = PInherit | PInitial | PRevert | PRevertLayer | PUnset;
42
+ type DisplayOutsideValue = "block" | "inline" | "run-in";
43
+ type DisplayInsideValue = "flow" | "flow-root" | "table" | "flex" | "grid" | "ruby";
44
+ type DisplayListItemValue = "list-item";
45
+ type DisplayInternalValue = "table-row-group" | "table-header-group" | "table-footer-group" | "table-row" | "table-cell" | "table-column-group" | "table-column" | "table-caption" | "ruby-base" | "ruby-text" | "ruby-base-container" | "ruby-text-container";
46
+ type DisplayBoxValue = "contents" | "none";
47
+ type DisplayLegacyValue = "inline-block" | "inline-table" | "inline-flex" | "inline-grid";
48
+ type DisplayValue = DisplayOutsideValue | DisplayInsideValue | DisplayListItemValue | DisplayInternalValue | DisplayBoxValue | DisplayLegacyValue | "table" | "inline-block" | "inline-flex" | "inline-grid";
49
+ type DisplayMultiValue = DisplayValue | DisplayValue[];
50
+ type PositionValue = "static" | "relative" | "absolute" | "fixed" | "sticky";
51
+ type PAnimationGlobal = PGlobal;
52
+ type PTransitionGlobal = PGlobal;
53
+ type PColorGlobal = PGlobal;
54
+ type PBoxModelGlobal = PGlobal;
55
+ type PFontGlobal = PGlobal;
56
+ type PPositionGlobal = PGlobal;
57
+ type FlexDirectionValue = "row" | "row-reverse" | "column" | "column-reverse";
58
+ type FlexWrapValue = "nowrap" | "wrap" | "wrap-reverse";
59
+ type FlexFlowSingleValue = FlexDirectionValue | FlexWrapValue;
60
+ type FlexFlowMultiValue = FlexFlowSingleValue | [FlexFlowSingleValue, FlexFlowSingleValue];
61
+ type JustifyContentValue = "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly" | "start" | "end" | "left" | "right";
62
+ type AlignItemsSelfPosition = "center" | "start" | "end" | "self-start" | "self-end" | "flex-start" | "flex-end";
63
+ type AlignItemsValue = "normal" | "stretch" | "anchor-center" | "baseline" | "first baseline" | "last baseline" | AlignItemsSelfPosition | ["safe", AlignItemsSelfPosition] | ["unsafe", AlignItemsSelfPosition];
64
+ type AlignSelfValue = "auto" | "normal" | "stretch" | "baseline" | "first baseline" | "last baseline" | "anchor-center" | AlignItemsSelfPosition | ["unsafe", AlignItemsSelfPosition] | ["safe", AlignItemsSelfPosition];
65
+ type AlignmentBaselineValue = "baseline" | "text-bottom" | "alphabetic" | "ideographic" | "middle" | "central" | "mathematical" | "text-top";
66
+ type TextAlignValue = "left" | "right" | "center" | "justify" | "start" | "end";
67
+ type OverflowValue = "visible" | "hidden" | "scroll" | "auto" | "clip";
68
+ type OverflowMultiValue = OverflowValue | [OverflowValue, OverflowValue];
69
+ type TextDecorationLineValue = "none" | "underline" | "overline" | "line-through";
70
+ type TextDecorationStyleValue = "solid" | "double" | "dotted" | "dashed" | "wavy";
71
+ type TextDecorationColorValue = string;
72
+ type TextDecorationValue = TextDecorationLineValue | TextDecorationStyleValue | TextDecorationColorValue;
73
+ type TextDecorationMultiValue = TextDecorationValue | TextDecorationValue[];
74
+ type TextTransformValue = "none" | "capitalize" | "uppercase" | "lowercase" | "full-width";
75
+ type BorderStyleValue = "none" | "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset";
76
+ type BorderWidthValue = "thin" | "medium" | "thick" | string;
77
+ type BorderColorValue = string;
78
+ type BorderValue = BorderStyleValue | BorderWidthValue | BorderColorValue;
79
+ type CursorValue = "auto" | "default" | "pointer" | "wait" | "text" | "move" | "not-allowed" | "grab" | "grabbing" | "zoom-in" | "zoom-out" | "help" | "crosshair";
80
+ type AnimationNameValue = string;
81
+ type AnimationDurationValue = string;
82
+ type AnimationTimingFunctionValue = "ease" | "ease-in" | "ease-out" | "ease-in-out" | "linear" | "step-start" | "step-end" | string;
83
+ type AnimationDelayValue = string;
84
+ type AnimationIterationCountValue = string | "infinite";
85
+ type AnimationDirectionValue = "normal" | "reverse" | "alternate" | "alternate-reverse";
86
+ type AnimationFillModeValue = "none" | "forwards" | "backwards" | "both";
87
+ type AnimationPlayStateValue = "running" | "paused";
88
+ type AnimationCompositionValue = "replace" | "add" | "accumulate";
89
+ type AnimationTimeline = string;
90
+ type AnimationValueBase = AnimationNameValue | AnimationDurationValue | AnimationTimingFunctionValue | AnimationDelayValue | AnimationIterationCountValue | AnimationDirectionValue | AnimationFillModeValue | AnimationPlayStateValue | AnimationTimeline;
91
+ type AnimationValue = AnimationValueBase | AnimationValueBase[] | AnimationValueBase[][];
92
+ type FontWeightValue = "normal" | "bold" | "bolder" | "lighter" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
93
+ type FontValue = string | string[] | string[];
94
+ type GridTemplateAreasValue = "none" | string | string[];
95
+ type GridTemplateValue = string | string[] | string[][];
96
+ type GridTemplateColumnsValue = string | string[] | string[][] | "none";
97
+ type GridTemplateRowsValue = string | string[] | string[][] | "none";
98
+ type TransformFunctionValue = string;
99
+ type TransformValue = "none" | TransformFunctionValue | TransformFunctionValue[] | string[];
100
+ type TransitionPropertyValue = string | "none" | "all";
101
+ type TransitionTimingFunctionValue = "ease" | "ease-in" | "ease-out" | "ease-in-out" | "linear" | "step-start" | "step-end" | string;
102
+ type TransitionValue = string | string[] | string[][];
103
+ type Properties = Partial<{
104
+ align_content: AlignContentKeyword | PGlobal;
105
+ align_items: AlignItemsValue | PGlobal;
106
+ align_self: AlignSelfValue | PGlobal;
107
+ alignment_baseline: AlignmentBaselineValue | PGlobal;
108
+ all: PGlobal;
109
+ anchor_name: string | string[][];
110
+ animation: AnimationValue | PAnimationGlobal;
111
+ animation_composition: AnimationCompositionValue | AnimationCompositionValue[] | PAnimationGlobal;
112
+ animation_delay: string | string[][] | PAnimationGlobal;
113
+ animation_direction: AnimationDirectionValue | AnimationDirectionValue[][] | PAnimationGlobal;
114
+ animation_duration: string | string[][] | PAnimationGlobal;
115
+ animation_fill_mode: AnimationFillModeValue | AnimationFillModeValue[][] | PAnimationGlobal;
116
+ animation_iteration_count: AnimationIterationCountValue | AnimationIterationCountValue[][] | PAnimationGlobal;
117
+ animation_name: string | string[][] | PAnimationGlobal;
118
+ animation_play_state: AnimationPlayStateValue | AnimationPlayStateValue[][] | PAnimationGlobal;
119
+ animation_range: string | string[] | string[][] | PAnimationGlobal;
120
+ animation_range_end: string | string[] | string[][] | PAnimationGlobal;
121
+ animation_range_start: string | string[] | string[][] | PAnimationGlobal;
122
+ animation_timeline: string | string[][] | PAnimationGlobal;
123
+ animation_timing_function: AnimationTimingFunctionValue | AnimationTimingFunctionValue[][] | PAnimationGlobal;
124
+ appearance: "none" | "auto" | PGlobal;
125
+ aspect_ratio: "auto" | string | [string, "/", string];
126
+ backdrop_filter: string | string[] | PGlobal;
127
+ backface_visibility: "visible" | "hidden" | PGlobal;
128
+ background: string | string[] | string[][] | PGlobal;
129
+ background_attachment: "scroll" | "fixed" | "local" | string | string[] | string[][] | PGlobal;
130
+ background_blend_mode: string | string[] | string[][] | PGlobal;
131
+ background_clip: "border-box" | "padding-box" | "content-box" | "text" | string | string[] | string[][] | PGlobal;
132
+ background_color: string | PColorGlobal;
133
+ background_image: string | string[] | string[][] | PGlobal;
134
+ background_origin: "border-box" | "padding-box" | "content-box" | string | string[] | string[][] | PGlobal;
135
+ background_position: BackgroundPositionValue | BackgroundPositionValue[] | BackgroundPositionValue[][] | PGlobal;
136
+ background_repeat: "repeat" | "repeat-x" | "repeat-y" | "no-repeat" | "space" | "round" | string | string[] | string[][] | PGlobal;
137
+ background_size: string | string[] | string[][] | PGlobal;
138
+ block_size: string | "auto" | PGlobal;
139
+ border: BorderValue | BorderValue[] | PGlobal;
140
+ border_block: string | PGlobal;
141
+ border_block_color: string | PGlobal;
142
+ border_block_end: BorderValue | BorderValue[] | PGlobal;
143
+ border_block_end_color: string | PGlobal;
144
+ border_block_end_style: BorderStyleValue | PGlobal;
145
+ border_block_end_width: string | PGlobal;
146
+ border_block_start: string | PGlobal;
147
+ border_block_start_color: string | PGlobal;
148
+ border_block_start_style: BorderStyleValue | PGlobal;
149
+ border_block_start_width: string | PGlobal;
150
+ border_block_style: BorderStyleValue | PGlobal;
151
+ border_block_width: string | PGlobal;
152
+ border_bottom: string | PGlobal;
153
+ border_bottom_color: string | PGlobal;
154
+ border_bottom_left_radius: string | PGlobal;
155
+ border_bottom_right_radius: string | PGlobal;
156
+ border_bottom_style: BorderStyleValue | PGlobal;
157
+ border_bottom_width: string | PGlobal;
158
+ border_collapse: "collapse" | "separate" | PGlobal;
159
+ border_color: string | string[] | PGlobal;
160
+ border_end_end_radius: string | PGlobal;
161
+ border_end_start_radius: string | PGlobal;
162
+ border_image: string | PGlobal;
163
+ border_image_outset: string | string[] | PGlobal;
164
+ border_image_repeat: "stretch" | "repeat" | "round" | "space" | string | string[] | PGlobal;
165
+ border_image_slice: string | string[] | PGlobal;
166
+ border_image_source: string | PGlobal;
167
+ border_image_width: string | string[] | PGlobal;
168
+ border_inline: string | PGlobal;
169
+ border_inline_color: string | PGlobal;
170
+ border_inline_end: string | PGlobal;
171
+ border_inline_end_color: string | PGlobal;
172
+ border_inline_end_style: BorderStyleValue | PGlobal;
173
+ border_inline_end_width: string | PGlobal;
174
+ border_inline_start: BorderValue | BorderValue[] | PGlobal;
175
+ border_inline_start_color: string | PGlobal;
176
+ border_inline_start_style: BorderStyleValue | PGlobal;
177
+ border_inline_start_width: string | PGlobal;
178
+ border_inline_style: BorderStyleValue | PGlobal;
179
+ border_inline_width: string | PGlobal;
180
+ border_left: string | PGlobal;
181
+ border_left_color: string | PGlobal;
182
+ border_left_style: BorderStyleValue | PGlobal;
183
+ border_left_width: string | PGlobal;
184
+ border_radius: string | string[] | PGlobal;
185
+ border_right: string | PGlobal;
186
+ border_right_color: string | PGlobal;
187
+ border_right_style: BorderStyleValue | PGlobal;
188
+ border_right_width: string | PGlobal;
189
+ border_spacing: string | string[] | PGlobal;
190
+ border_start_end_radius: string | PGlobal;
191
+ border_start_start_radius: string | PGlobal;
192
+ border_style: BorderStyleValue | string | string[] | PGlobal;
193
+ border_top: string | PGlobal;
194
+ border_top_color: string | PGlobal;
195
+ border_top_left_radius: string | PGlobal;
196
+ border_top_right_radius: string | PGlobal;
197
+ border_top_style: BorderStyleValue | PGlobal;
198
+ border_top_width: string | PGlobal;
199
+ border_width: string | string[] | PGlobal;
200
+ bottom: string | "auto" | PGlobal;
201
+ box_decoration_break: "slice" | "clone" | PGlobal;
202
+ box_shadow: string | string[] | string[][] | PGlobal;
203
+ box_sizing: "content-box" | "border-box" | PGlobal;
204
+ break_after: "auto" | "avoid" | "always" | "all" | "avoid-page" | "page" | "left" | "right" | "recto" | "verso" | "avoid-column" | "column" | "avoid-region" | "region" | PGlobal;
205
+ break_before: "auto" | "avoid" | "always" | "all" | "avoid-page" | "page" | "left" | "right" | "recto" | "verso" | "avoid-column" | "column" | "avoid-region" | "region" | PGlobal;
206
+ break_inside: "auto" | "avoid" | "avoid-page" | "avoid-column" | "avoid-region" | PGlobal;
207
+ caption_side: "top" | "bottom" | PGlobal;
208
+ caret_color: string | "auto" | PGlobal;
209
+ clear: "none" | "left" | "right" | "both" | "inline-start" | "inline-end" | PGlobal;
210
+ clip: string | "auto" | PGlobal;
211
+ clip_path: string | PGlobal;
212
+ color: string | PColorGlobal;
213
+ color_scheme: string | string[] | PGlobal;
214
+ column_count: string | "auto" | PGlobal;
215
+ column_fill: "auto" | "balance" | "balance-all" | PGlobal;
216
+ column_gap: string | "normal" | PGlobal;
217
+ column_rule: string | PGlobal;
218
+ column_rule_color: string | PGlobal;
219
+ column_rule_style: BorderStyleValue | PGlobal;
220
+ column_rule_width: string | PGlobal;
221
+ column_span: "none" | "all" | PGlobal;
222
+ column_width: string | "auto" | PGlobal;
223
+ columns: string | string[] | PGlobal;
224
+ contain: "none" | "strict" | "content" | "size" | "layout" | "style" | "paint" | string | string[] | PGlobal;
225
+ contain_intrinsic_block_size: string | "none" | PGlobal;
226
+ contain_intrinsic_height: string | "none" | PGlobal;
227
+ contain_intrinsic_inline_size: string | "none" | PGlobal;
228
+ contain_intrinsic_size: string | string[] | "none" | PGlobal;
229
+ contain_intrinsic_width: string | "none" | PGlobal;
230
+ content: string | "normal" | "none" | PGlobal;
231
+ content_visibility: "visible" | "auto" | "hidden" | PGlobal;
232
+ counter_increment: string | string[] | "none" | PGlobal;
233
+ counter_reset: string | string[] | "none" | PGlobal;
234
+ counter_set: string | string[] | "none" | PGlobal;
235
+ cursor: CursorValue | string | string[] | PGlobal;
236
+ direction: "ltr" | "rtl" | PGlobal;
237
+ display: DisplayValue | DisplayMultiValue | PGlobal;
238
+ empty_cells: "show" | "hide" | PGlobal;
239
+ filter: string | string[] | PGlobal;
240
+ flex: string | string[] | "auto" | "none" | PGlobal;
241
+ flex_basis: string | "auto" | "fill" | "max-content" | "min-content" | "fit-content" | PGlobal;
242
+ flex_direction: FlexDirectionValue | PGlobal;
243
+ flex_flow: FlexFlowMultiValue | PGlobal;
244
+ flex_grow: string | PGlobal;
245
+ flex_shrink: string | PGlobal;
246
+ flex_wrap: FlexWrapValue | PGlobal;
247
+ float: "left" | "right" | "none" | "inline-start" | "inline-end" | PGlobal;
248
+ font: FontValue | PFontGlobal;
249
+ font_family: string | string[] | string[][] | PFontGlobal;
250
+ font_feature_settings: string | string[] | "normal" | PFontGlobal;
251
+ font_kerning: "auto" | "normal" | "none" | PFontGlobal;
252
+ font_language_override: string | "normal" | PFontGlobal;
253
+ font_optical_sizing: "auto" | "none" | PFontGlobal;
254
+ font_size: string | PFontGlobal;
255
+ font_size_adjust: string | "none" | PFontGlobal;
256
+ font_stretch: string | PFontGlobal;
257
+ font_style: "normal" | "italic" | "oblique" | string | PFontGlobal;
258
+ font_synthesis: "none" | "weight" | "style" | string | string[] | PFontGlobal;
259
+ font_variant: string | string[] | "normal" | "none" | PFontGlobal;
260
+ font_variant_alternates: string | "normal" | PFontGlobal;
261
+ font_variant_caps: "normal" | "small-caps" | "all-small-caps" | "petite-caps" | "all-petite-caps" | "unicase" | "titling-caps" | PFontGlobal;
262
+ font_variant_east_asian: string | string[] | "normal" | PFontGlobal;
263
+ font_variant_ligatures: string | string[] | "normal" | "none" | PFontGlobal;
264
+ font_variant_numeric: string | string[] | "normal" | PFontGlobal;
265
+ font_variant_position: "normal" | "sub" | "super" | PFontGlobal;
266
+ font_variation_settings: string | string[] | "normal" | PFontGlobal;
267
+ font_weight: FontWeightValue | PFontGlobal;
268
+ gap: string | string[] | PGlobal;
269
+ grid: string | string[] | string[][] | PGlobal;
270
+ grid_area: string | PGlobal;
271
+ grid_auto_columns: string | string[] | PGlobal;
272
+ grid_auto_flow: "row" | "column" | "dense" | string | string[] | PGlobal;
273
+ grid_auto_rows: string | string[] | PGlobal;
274
+ grid_column: string | string[] | "auto" | PGlobal;
275
+ grid_column_end: string | "auto" | PGlobal;
276
+ grid_column_gap: string | PGlobal;
277
+ grid_column_start: string | "auto" | PGlobal;
278
+ grid_gap: string | string[] | PGlobal;
279
+ grid_row: string | string[] | "auto" | PGlobal;
280
+ grid_row_end: string | "auto" | PGlobal;
281
+ grid_row_gap: string | PGlobal;
282
+ grid_row_start: string | "auto" | PGlobal;
283
+ grid_template: GridTemplateValue | PGlobal;
284
+ grid_template_areas: GridTemplateAreasValue | PGlobal;
285
+ grid_template_columns: GridTemplateColumnsValue | PGlobal;
286
+ grid_template_rows: GridTemplateRowsValue | PGlobal;
287
+ hanging_punctuation: "none" | "first" | "last" | "force-end" | "allow-end" | string | string[] | PGlobal;
288
+ height: string | "auto" | "max-content" | "min-content" | "fit-content" | PGlobal;
289
+ hyphens: "none" | "manual" | "auto" | PGlobal;
290
+ image_orientation: string | "none" | "from-image" | PGlobal;
291
+ image_rendering: "auto" | "crisp-edges" | "pixelated" | PGlobal;
292
+ image_resolution: string | PGlobal;
293
+ inline_size: string | "auto" | PGlobal;
294
+ inset: string | string[] | "auto" | PGlobal;
295
+ inset_block: string | string[] | "auto" | PGlobal;
296
+ inset_block_end: string | "auto" | PGlobal;
297
+ inset_block_start: string | "auto" | PGlobal;
298
+ inset_inline: string | string[] | "auto" | PGlobal;
299
+ inset_inline_end: string | "auto" | PGlobal;
300
+ inset_inline_start: string | "auto" | PGlobal;
301
+ isolation: "auto" | "isolate" | PGlobal;
302
+ justify_content: JustifyContentValue | PGlobal;
303
+ justify_items: "start" | "end" | "center" | "stretch" | "self-start" | "self-end" | "flex-start" | "flex-end" | "left" | "right" | string | PGlobal;
304
+ justify_self: "auto" | "start" | "end" | "center" | "stretch" | "self-start" | "self-end" | "flex-start" | "flex-end" | "left" | "right" | PGlobal;
305
+ left: string | "auto" | PGlobal;
306
+ letter_spacing: string | "normal" | PGlobal;
307
+ line_break: "auto" | "loose" | "normal" | "strict" | "anywhere" | PGlobal;
308
+ line_height: string | "normal" | PGlobal;
309
+ list_style: string | string[] | PGlobal;
310
+ list_style_image: string | "none" | PGlobal;
311
+ list_style_position: "inside" | "outside" | PGlobal;
312
+ list_style_type: string | "none" | PGlobal;
313
+ margin: string | string[] | "auto" | PBoxModelGlobal;
314
+ margin_block: string | string[] | "auto" | PBoxModelGlobal;
315
+ margin_block_end: string | "auto" | PBoxModelGlobal;
316
+ margin_block_start: string | "auto" | PBoxModelGlobal;
317
+ margin_bottom: string | "auto" | PBoxModelGlobal;
318
+ margin_inline: string | string[] | "auto" | PBoxModelGlobal;
319
+ margin_inline_end: string | "auto" | PBoxModelGlobal;
320
+ margin_inline_start: string | "auto" | PBoxModelGlobal;
321
+ margin_left: string | "auto" | PBoxModelGlobal;
322
+ margin_right: string | "auto" | PBoxModelGlobal;
323
+ margin_top: string | "auto" | PBoxModelGlobal;
324
+ mask: string | string[] | PGlobal;
325
+ mask_border: string | PGlobal;
326
+ mask_border_mode: "luminance" | "alpha" | PGlobal;
327
+ mask_border_outset: string | string[] | PGlobal;
328
+ mask_border_repeat: string | string[] | PGlobal;
329
+ mask_border_slice: string | string[] | PGlobal;
330
+ mask_border_source: string | "none" | PGlobal;
331
+ mask_border_width: string | string[] | "auto" | PGlobal;
332
+ mask_clip: string | string[] | "content-box" | "padding-box" | "border-box" | "margin-box" | "fill-box" | "stroke-box" | "view-box" | "no-clip" | PGlobal;
333
+ mask_composite: string | string[] | PGlobal;
334
+ mask_image: string | string[] | "none" | PGlobal;
335
+ mask_mode: string | string[] | "alpha" | "luminance" | "match-source" | PGlobal;
336
+ mask_origin: string | string[] | "content-box" | "padding-box" | "border-box" | "margin-box" | "fill-box" | "stroke-box" | "view-box" | PGlobal;
337
+ mask_position: string | string[] | string[][] | PGlobal;
338
+ mask_repeat: string | string[] | PGlobal;
339
+ mask_size: string | string[] | "auto" | "cover" | "contain" | PGlobal;
340
+ mask_type: "luminance" | "alpha" | PGlobal;
341
+ max_block_size: string | "none" | PGlobal;
342
+ max_height: string | "none" | "max-content" | "min-content" | "fit-content" | PGlobal;
343
+ max_inline_size: string | "none" | PGlobal;
344
+ max_width: string | "none" | "max-content" | "min-content" | "fit-content" | PGlobal;
345
+ min_block_size: string | "auto" | PGlobal;
346
+ min_height: string | "auto" | "max-content" | "min-content" | "fit-content" | PGlobal;
347
+ min_inline_size: string | "auto" | PGlobal;
348
+ min_width: string | "auto" | "max-content" | "min-content" | "fit-content" | PGlobal;
349
+ mix_blend_mode: string | PGlobal;
350
+ object_fit: "fill" | "contain" | "cover" | "none" | "scale-down" | PGlobal;
351
+ object_position: string | string[] | PGlobal;
352
+ offset: string | string[] | PGlobal;
353
+ offset_anchor: string | string[] | "auto" | PGlobal;
354
+ offset_distance: string | PGlobal;
355
+ offset_path: string | "none" | PGlobal;
356
+ offset_rotate: string | "auto" | "reverse" | PGlobal;
357
+ opacity: string | PGlobal;
358
+ order: string | PGlobal;
359
+ orphans: string | PGlobal;
360
+ outline: string | string[] | PGlobal;
361
+ outline_color: string | "invert" | PGlobal;
362
+ outline_offset: string | PGlobal;
363
+ outline_style: BorderStyleValue | "auto" | PGlobal;
364
+ outline_width: string | PGlobal;
365
+ overflow: OverflowValue | OverflowMultiValue | PGlobal;
366
+ overflow_anchor: "auto" | "none" | PGlobal;
367
+ overflow_block: OverflowValue | PGlobal;
368
+ overflow_clip_margin: string | "content-box" | PGlobal;
369
+ overflow_inline: OverflowValue | PGlobal;
370
+ overflow_wrap: "normal" | "break-word" | "anywhere" | PGlobal;
371
+ overflow_x: OverflowValue | PGlobal;
372
+ overflow_y: OverflowValue | PGlobal;
373
+ overscroll_behavior: "auto" | "contain" | "none" | string | string[] | PGlobal;
374
+ overscroll_behavior_block: "auto" | "contain" | "none" | PGlobal;
375
+ overscroll_behavior_inline: "auto" | "contain" | "none" | PGlobal;
376
+ overscroll_behavior_x: "auto" | "contain" | "none" | PGlobal;
377
+ overscroll_behavior_y: "auto" | "contain" | "none" | PGlobal;
378
+ padding: string | string[] | PBoxModelGlobal;
379
+ padding_block: string | string[] | PBoxModelGlobal;
380
+ padding_block_end: string | PBoxModelGlobal;
381
+ padding_block_start: string | PBoxModelGlobal;
382
+ padding_bottom: string | PBoxModelGlobal;
383
+ padding_inline: string | string[] | PBoxModelGlobal;
384
+ padding_inline_end: string | PBoxModelGlobal;
385
+ padding_inline_start: string | PBoxModelGlobal;
386
+ padding_left: string | PBoxModelGlobal;
387
+ padding_right: string | PBoxModelGlobal;
388
+ padding_top: string | PBoxModelGlobal;
389
+ page_break_after: "auto" | "always" | "avoid" | "left" | "right" | PGlobal;
390
+ page_break_before: "auto" | "always" | "avoid" | "left" | "right" | PGlobal;
391
+ page_break_inside: "auto" | "avoid" | PGlobal;
392
+ paint_order: "normal" | "fill" | "stroke" | "markers" | string | string[] | PGlobal;
393
+ perspective: string | "none" | PGlobal;
394
+ perspective_origin: string | string[] | PGlobal;
395
+ place_content: string | string[] | PGlobal;
396
+ place_items: string | string[] | PGlobal;
397
+ place_self: string | string[] | PGlobal;
398
+ pointer_events: "auto" | "none" | "visiblePainted" | "visibleFill" | "visibleStroke" | "visible" | "painted" | "fill" | "stroke" | "all" | PGlobal;
399
+ position: PositionValue | PPositionGlobal;
400
+ quotes: string | string[] | "auto" | "none" | PGlobal;
401
+ resize: "none" | "both" | "horizontal" | "vertical" | "block" | "inline" | PGlobal;
402
+ right: string | "auto" | PGlobal;
403
+ rotate: string | "none" | PGlobal;
404
+ row_gap: string | "normal" | PGlobal;
405
+ scale: string | string[] | "none" | PGlobal;
406
+ scroll_behavior: "auto" | "smooth" | PGlobal;
407
+ scroll_margin: string | string[] | PGlobal;
408
+ scroll_margin_block: string | string[] | PGlobal;
409
+ scroll_margin_block_end: string | PGlobal;
410
+ scroll_margin_block_start: string | PGlobal;
411
+ scroll_margin_bottom: string | PGlobal;
412
+ scroll_margin_inline: string | string[] | PGlobal;
413
+ scroll_margin_inline_end: string | PGlobal;
414
+ scroll_margin_inline_start: string | PGlobal;
415
+ scroll_margin_left: string | PGlobal;
416
+ scroll_margin_right: string | PGlobal;
417
+ scroll_margin_top: string | PGlobal;
418
+ scroll_padding: string | string[] | "auto" | PGlobal;
419
+ scroll_padding_block: string | string[] | "auto" | PGlobal;
420
+ scroll_padding_block_end: string | "auto" | PGlobal;
421
+ scroll_padding_block_start: string | "auto" | PGlobal;
422
+ scroll_padding_bottom: string | "auto" | PGlobal;
423
+ scroll_padding_inline: string | string[] | "auto" | PGlobal;
424
+ scroll_padding_inline_end: string | "auto" | PGlobal;
425
+ scroll_padding_inline_start: string | "auto" | PGlobal;
426
+ scroll_padding_left: string | "auto" | PGlobal;
427
+ scroll_padding_right: string | "auto" | PGlobal;
428
+ scroll_padding_top: string | "auto" | PGlobal;
429
+ scroll_snap_align: "none" | "start" | "end" | "center" | string | string[] | PGlobal;
430
+ scroll_snap_stop: "normal" | "always" | PGlobal;
431
+ scroll_snap_type: "none" | "x" | "y" | "block" | "inline" | "both" | string | string[] | PGlobal;
432
+ scrollbar_color: string | string[] | "auto" | PGlobal;
433
+ scrollbar_width: "auto" | "thin" | "none" | PGlobal;
434
+ shape_image_threshold: string | PGlobal;
435
+ shape_margin: string | PGlobal;
436
+ shape_outside: "none" | "margin-box" | "content-box" | "border-box" | "padding-box" | string | PGlobal;
437
+ tab_size: string | PGlobal;
438
+ table_layout: "auto" | "fixed" | PGlobal;
439
+ text_align: TextAlignValue | PGlobal;
440
+ text_align_last: TextAlignValue | "auto" | PGlobal;
441
+ text_combine_upright: "none" | "all" | string | PGlobal;
442
+ text_decoration: TextDecorationMultiValue | PGlobal;
443
+ text_decoration_color: string | PGlobal;
444
+ text_decoration_line: TextDecorationLineValue | string | string[] | PGlobal;
445
+ text_decoration_skip: "none" | "objects" | "spaces" | "ink" | "edges" | "box-decoration" | string | string[] | PGlobal;
446
+ text_decoration_skip_ink: "auto" | "none" | "all" | PGlobal;
447
+ text_decoration_style: "solid" | "double" | "dotted" | "dashed" | "wavy" | PGlobal;
448
+ text_decoration_thickness: string | "auto" | "from-font" | PGlobal;
449
+ text_emphasis: string | string[] | PGlobal;
450
+ text_emphasis_color: string | PGlobal;
451
+ text_emphasis_position: string | string[] | PGlobal;
452
+ text_emphasis_style: "none" | "filled" | "open" | "dot" | "circle" | "double-circle" | "triangle" | "sesame" | string | PGlobal;
453
+ text_indent: string | PGlobal;
454
+ text_justify: "auto" | "inter-character" | "inter-word" | "none" | PGlobal;
455
+ text_orientation: "mixed" | "upright" | "sideways" | PGlobal;
456
+ text_overflow: "clip" | "ellipsis" | string | PGlobal;
457
+ text_rendering: "auto" | "optimizeSpeed" | "optimizeLegibility" | "geometricPrecision" | PGlobal;
458
+ text_shadow: string | string[] | string[][] | "none" | PGlobal;
459
+ text_size_adjust: "none" | "auto" | string | PGlobal;
460
+ text_transform: TextTransformValue | PGlobal;
461
+ text_underline_offset: string | "auto" | PGlobal;
462
+ text_underline_position: "auto" | "from-font" | "under" | "left" | "right" | string | string[] | PGlobal;
463
+ top: string | "auto" | PGlobal;
464
+ touch_action: "auto" | "none" | "pan-x" | "pan-y" | "pan-left" | "pan-right" | "pan-up" | "pan-down" | "pinch-zoom" | "manipulation" | string | string[] | PGlobal;
465
+ transform: TransformValue | PGlobal;
466
+ transform_box: "content-box" | "border-box" | "fill-box" | "stroke-box" | "view-box" | PGlobal;
467
+ transform_origin: string | string[] | string[][] | PGlobal;
468
+ transform_style: "flat" | "preserve-3d" | PGlobal;
469
+ transition: TransitionValue | PTransitionGlobal;
470
+ transition_delay: string | string[] | string[][] | PTransitionGlobal;
471
+ transition_duration: string | string[] | string[][] | PTransitionGlobal;
472
+ transition_property: TransitionPropertyValue | TransitionPropertyValue[] | TransitionPropertyValue[][] | PTransitionGlobal;
473
+ transition_timing_function: TransitionTimingFunctionValue | TransitionTimingFunctionValue[] | TransitionTimingFunctionValue[][] | PTransitionGlobal;
474
+ translate: string | string[] | "none" | PGlobal;
475
+ unicode_bidi: "normal" | "embed" | "isolate" | "bidi-override" | "isolate-override" | "plaintext" | PGlobal;
476
+ user_select: "auto" | "none" | "text" | "contain" | "all" | PGlobal;
477
+ vertical_align: "baseline" | "sub" | "super" | "text-top" | "text-bottom" | "middle" | "top" | "bottom" | string | PGlobal;
478
+ visibility: "visible" | "hidden" | "collapse" | PGlobal;
479
+ white_space: "normal" | "nowrap" | "pre" | "pre-wrap" | "pre-line" | "break-spaces" | PGlobal;
480
+ widows: string | PGlobal;
481
+ width: string | "auto" | "max-content" | "min-content" | "fit-content" | PGlobal;
482
+ will_change: string | string[] | "auto" | PGlobal;
483
+ word_break: "normal" | "break-all" | "keep-all" | "break-word" | PGlobal;
484
+ word_spacing: string | "normal" | PGlobal;
485
+ word_wrap: "normal" | "break-word" | PGlobal;
486
+ writing_mode: "horizontal-tb" | "vertical-rl" | "vertical-lr" | "sideways-rl" | "sideways-lr" | PGlobal;
487
+ z_index: string | "auto" | PGlobal;
488
+ [key: `--${string}`]: string;
489
+ }>;
490
+ //#endregion
491
+ //#region src/registry.d.ts
492
+ type Registry = [string[], Partial<Properties>][];
493
+ declare function initCssRegistry(): void;
494
+ declare function getCssRegistry(): Registry;
495
+ //#endregion
496
+ //#region src/css.d.ts
497
+ type CssOpt = {
498
+ name?: string;
499
+ atrules?: string[];
500
+ selector?: string;
501
+ };
502
+ declare function css(properties: Properties, opt?: CssOpt): string;
503
+ type CssFnT = (properties: Properties, opt?: Omit<CssOpt, "atrules">) => string;
504
+ type GenCssFnOpt = {
505
+ mediaAtRule?: string;
506
+ layer?: string;
507
+ };
508
+ declare function genCssFn(opt: GenCssFnOpt): CssFnT;
509
+ //#endregion
510
+ export { type AnyRoute, type CssOpt, type DynamicRoute, type Params, type Properties, type ResolvedPage, type StaticRoute, css, expandRoutes, genCssFn, getCssRegistry, initCssRegistry, route, urlToFilePath };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"./router-CJ9aQRbJ.js";import{createElement as r}from"react";import{renderToString as i}from"react-dom/server";import a from"rehype-prism";import o,{defaultSchema as s}from"rehype-sanitize";import c from"rehype-stringify";import l from"remark-export-toc";import u from"remark-parse";import d from"remark-rehype";import{unified as f}from"unified";import{jsx as p}from"react/jsx-runtime";function m(e){return function({name:t,props:n}){let a=i(r(e[t],n));return r(`div`,{"data-island":t,"data-props":JSON.stringify(n),dangerouslySetInnerHTML:{__html:a}})}}function h(e={}){let t={prefix:`heading`,startLevel:2,...typeof e.toc==`object`?e.toc:{}},n={...s,clobber:(s.clobber??[]).filter(e=>e!==`id`)},r=e.sanitizeSchema?e.sanitizeSchema(n):n,i=f().use(u).use(e.remarkPlugins??[]).use(e.toc?[[l,t]]:[]).use(d).use(e.rehypePlugins??[]).use(o,r).use(e.highlight?[a]:[]).use(c).freeze();function m(e,t){return p(`div`,{className:t,dangerouslySetInnerHTML:{__html:e}})}function h(e,t){let n=i.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{m as createIsland,h as createMarkdown,n as expandRoutes,e as route,t as urlToFilePath};
1
+ import{a as e,i as t,l as n,n as r,o as i,s as a,t as o}from"./css-DDEJecy6.js";export{o as css,i as expandRoutes,r as genCssFn,t as getCssRegistry,e as initCssRegistry,a as route,n as urlToFilePath};
@@ -0,0 +1,50 @@
1
+ import { ComponentProps, ComponentType, ReactElement } from "react";
2
+ import { ToC, ToC as ToC$1 } from "remark-export-toc";
3
+ import { PluggableList } from "unified";
4
+ import { Schema } from "hast-util-sanitize";
5
+
6
+ //#region src/island.d.ts
7
+ type IslandRegistry = Record<string, ComponentType<any>>;
8
+ declare function createIsland<R extends IslandRegistry>(islands: R): <K extends keyof R & string>({
9
+ name,
10
+ props
11
+ }: {
12
+ name: K;
13
+ props: ComponentProps<R[K]>;
14
+ }) => import("react").DetailedReactHTMLElement<{
15
+ "data-island": K;
16
+ "data-props": string;
17
+ dangerouslySetInnerHTML: {
18
+ __html: string;
19
+ };
20
+ }, HTMLElement>;
21
+ //#endregion
22
+ //#region src/markdown.d.ts
23
+ interface MarkdownConfig {
24
+ remarkPlugins?: PluggableList;
25
+ rehypePlugins?: PluggableList;
26
+ sanitizeSchema?: (defaults: Schema) => Schema;
27
+ toc?: boolean | {
28
+ prefix?: string;
29
+ startLevel?: number;
30
+ };
31
+ highlight?: boolean;
32
+ }
33
+ interface RenderResult {
34
+ body: ReactElement;
35
+ toc: ToC$1[];
36
+ }
37
+ declare function createMarkdown(config?: MarkdownConfig): {
38
+ Markdown: ({
39
+ source,
40
+ className
41
+ }: {
42
+ source: string;
43
+ className?: string;
44
+ }) => ReactElement;
45
+ render: (source: string, options?: {
46
+ className?: string;
47
+ }) => RenderResult;
48
+ };
49
+ //#endregion
50
+ export { type MarkdownConfig, type RenderResult, type ToC, createIsland, createMarkdown };
package/dist/server.js ADDED
@@ -0,0 +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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cirrojs",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "React islands SSG with strict CSP (no unsafe-inline). Vite-based, MPA-first.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,6 +19,10 @@
19
19
  "types": "./dist/index.d.ts",
20
20
  "default": "./dist/index.js"
21
21
  },
22
+ "./server": {
23
+ "types": "./dist/server.d.ts",
24
+ "default": "./dist/server.js"
25
+ },
22
26
  "./vite": {
23
27
  "types": "./dist/vite.d.ts",
24
28
  "default": "./dist/vite.js"
@@ -1 +0,0 @@
1
- function e(e){return e}function t(e){let t=[];for(let n of e)if(`getStaticPaths`in n)for(let e of n.getStaticPaths())t.push({url:n.path(e),render:()=>n.component({params:e})});else t.push({url:n.path,render:()=>n.component({params:{}})});return t}function n(e){return e===`/`?`index.html`:`${e.replace(/^\/+|\/+$/g,``)}/index.html`}export{e as n,n as r,t};