decaframe 0.1.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.
- package/LICENSE +32 -0
- package/README.md +55 -0
- package/dist/archetype.js +1 -0
- package/dist/blocks.css +2822 -0
- package/dist/blocks.js +6 -0
- package/dist/brand.js +1 -0
- package/dist/chart.js +3 -0
- package/dist/chartView.js +1 -0
- package/dist/cli.js +22 -0
- package/dist/colour.js +1 -0
- package/dist/commands.js +1 -0
- package/dist/design.js +1 -0
- package/dist/diagram.js +99 -0
- package/dist/diagramRender.js +1 -0
- package/dist/diagramTheme.js +1 -0
- package/dist/diagramView.js +1 -0
- package/dist/diagramZoom.js +2 -0
- package/dist/export/assets.js +1 -0
- package/dist/export/html.js +6 -0
- package/dist/export/spec.js +1 -0
- package/dist/export/viewer.js +1112 -0
- package/dist/extensions.js +1 -0
- package/dist/figure.js +1 -0
- package/dist/filename.js +1 -0
- package/dist/fit.js +6 -0
- package/dist/fitLoop.js +1 -0
- package/dist/furniture.js +1 -0
- package/dist/icons.js +1 -0
- package/dist/id.js +1 -0
- package/dist/index.js +1 -0
- package/dist/item.js +1 -0
- package/dist/layout.js +1 -0
- package/dist/lint.js +1 -0
- package/dist/markdown.js +32 -0
- package/dist/mcp/browser.js +81 -0
- package/dist/mcp/channel.js +7 -0
- package/dist/mcp/export.js +1 -0
- package/dist/mcp/exportCli.js +11 -0
- package/dist/mcp/fit.js +1 -0
- package/dist/mcp/open.js +1 -0
- package/dist/mcp/openCli.js +1 -0
- package/dist/mcp/read.js +1 -0
- package/dist/mcp/server.js +31 -0
- package/dist/mcp/session.js +2 -0
- package/dist/mcp/stdio.js +2 -0
- package/dist/media.js +1 -0
- package/dist/notes.js +1 -0
- package/dist/page.js +1 -0
- package/dist/placeholder.js +1 -0
- package/dist/present/constants.js +1 -0
- package/dist/prose.js +1 -0
- package/dist/registry.js +1 -0
- package/dist/sizePreview.js +1 -0
- package/dist/slotMarkdown.js +3 -0
- package/dist/table.js +2 -0
- package/dist/template/catalogue.json +1 -0
- package/dist/template/index.js +1 -0
- package/dist/template/look.js +1 -0
- package/dist/text.js +8 -0
- package/dist/theme/atelier.json +1 -0
- package/dist/theme/aurora.json +1 -0
- package/dist/theme/boardroom.json +1 -0
- package/dist/theme/decaframe.json +1 -0
- package/dist/theme/editorial.json +1 -0
- package/dist/theme/emit.js +19 -0
- package/dist/theme/fonts.js +1 -0
- package/dist/theme/foundry.json +1 -0
- package/dist/theme/index.js +1 -0
- package/dist/theme/meadow.json +1 -0
- package/dist/theme/signal.json +1 -0
- package/dist/theme/tokens.json +1 -0
- package/dist/videoPlay.js +1 -0
- package/editor/assets/App-BvOGZ4cc.js +56 -0
- package/editor/assets/PresenterView-Barr5wsl.js +1 -0
- package/editor/assets/Shell-Dvc8Yvly.js +413 -0
- package/editor/assets/_commonjsHelpers-CqkleIqs.js +1 -0
- package/editor/assets/abnfDiagram-N423BO3Z-DMNuYXhv.js +1 -0
- package/editor/assets/arc-DOR9Dhm9.js +1 -0
- package/editor/assets/architectureDiagram-T3A2C74G-CpcCHDGw.js +36 -0
- package/editor/assets/blockDiagram-VBNYF7ZC-CbCqcHim.js +132 -0
- package/editor/assets/c4Diagram-5PPSVZJV-DouVYESX.js +10 -0
- package/editor/assets/channel-Dt7MgGxB.js +1 -0
- package/editor/assets/chunk-2GRJ4B5K-DCJz-Q3N.js +1 -0
- package/editor/assets/chunk-2Q5K7J3B-D5q9RvV7.js +1 -0
- package/editor/assets/chunk-5RXB4S5H-DnaXL-Vg.js +231 -0
- package/editor/assets/chunk-5VM5RSS4-Dsc890tp.js +15 -0
- package/editor/assets/chunk-6Q2QTUOP-B5F620Er.js +88 -0
- package/editor/assets/chunk-GF5L2VYU-D6F2cocl.js +206 -0
- package/editor/assets/chunk-JWPE2WC7-bRknM2iE.js +1 -0
- package/editor/assets/chunk-KBJHAD2P-DOPClpqF.js +1 -0
- package/editor/assets/chunk-RYQCIY6F-CvMFFqLU.js +1 -0
- package/editor/assets/chunk-XXDRQBXY-1qxA3khf.js +1 -0
- package/editor/assets/classDiagram-JCYQIIEL-DCQKoo1F.js +1 -0
- package/editor/assets/classDiagram-v2-OCEON4UE-DCQKoo1F.js +1 -0
- package/editor/assets/cose-bilkent-JH36ORCC-ClwDXN93.js +1 -0
- package/editor/assets/cynefin-VYW2F7L2-D_3oIqit.js +178 -0
- package/editor/assets/cynefinDiagram-MW4NZA55-5VKykgH3.js +62 -0
- package/editor/assets/cytoscape.esm-BjAbmLdb.js +331 -0
- package/editor/assets/dagre-VZM6K2ZE-DcheWwdS.js +4 -0
- package/editor/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/editor/assets/diagram-7IWD3JNH-BKU8hufg.js +30 -0
- package/editor/assets/diagram-B4RE2ZJO-C6NwNXMM.js +3 -0
- package/editor/assets/diagram-LBJQPF4R-D5l8kaaB.js +24 -0
- package/editor/assets/diagram-Q27KOJAE-B839mp_E.js +24 -0
- package/editor/assets/diagram-UB23O5K3-BEJ8nrHN.js +41 -0
- package/editor/assets/ebnfDiagram-BXEA7PRR-Clexv7zP.js +1 -0
- package/editor/assets/erDiagram-JOGREHBK-CQiS9gcI.js +85 -0
- package/editor/assets/flowDiagram-UKHOOZJN-CKnVd1JX.js +156 -0
- package/editor/assets/ganttDiagram-PKOTCBZU-B2_YsT7P.js +292 -0
- package/editor/assets/gitGraphDiagram-DS77QQ5N-woKMsCpe.js +106 -0
- package/editor/assets/graph-C9eacEi8.js +1 -0
- package/editor/assets/index-CBRsrwap.css +1 -0
- package/editor/assets/index-CnMC8Z9d.js +9167 -0
- package/editor/assets/index-CzJ1nSGZ.js +61 -0
- package/editor/assets/infoDiagram-6WML65LV-DQBHUzYs.js +2 -0
- package/editor/assets/init-Gi6I4Gst.js +1 -0
- package/editor/assets/ishikawaDiagram-WSZJBQD7-B0ECJjey.js +70 -0
- package/editor/assets/journeyDiagram-NVQOT4AX-C6IoE7ds.js +139 -0
- package/editor/assets/kanban-definition-27J2QSJJ-BsRx6-QA.js +89 -0
- package/editor/assets/katex-C5jXJg4s.js +257 -0
- package/editor/assets/layout-DEXfKzaS.js +1 -0
- package/editor/assets/linear-CZdkbpsZ.js +1 -0
- package/editor/assets/map-Czzmt4hB.js +1 -0
- package/editor/assets/mermaid.core-BD7SxJD7.js +314 -0
- package/editor/assets/mindmap-definition-FAOFIHXS-zQTmawZC.js +96 -0
- package/editor/assets/ordinal-Cboi1Yqb.js +1 -0
- package/editor/assets/pegDiagram-VL7TDLO6-DwfoSDjb.js +1 -0
- package/editor/assets/pieDiagram-7S7Q4E2Y-CFju-NFP.js +39 -0
- package/editor/assets/quadrantDiagram-CIZ2JOQS-BD6kYPyE.js +7 -0
- package/editor/assets/railroadDiagram-AXF67PYL-RqQwm-lL.js +1 -0
- package/editor/assets/requirementDiagram-LRYGKXZP-piqHrBVs.js +84 -0
- package/editor/assets/sankeyDiagram-W5VNT64P-CiALLT6P.js +40 -0
- package/editor/assets/sequenceDiagram-SI44F4Z6-CjpaYPxa.js +162 -0
- package/editor/assets/sizeCapture-X5ZJPWSS-DG9i3uEZ.js +1 -0
- package/editor/assets/stateDiagram-OKZ733FA-BgfrUiLR.js +1 -0
- package/editor/assets/stateDiagram-v2-UEYNNEHI-OBUiw3fk.js +1 -0
- package/editor/assets/swimlanes-SLNWSIFB-edAhP15G.js +2 -0
- package/editor/assets/swimlanesDiagram-ULZ7WXOC-BvcKTcG0.js +8 -0
- package/editor/assets/timeline-definition-Z64GVDOM-CLCag48V.js +120 -0
- package/editor/assets/vennDiagram-T6HMQDX7-CNuGpJHG.js +34 -0
- package/editor/assets/wardleyDiagram-T6FBY63Y-D-NVpbtn.js +78 -0
- package/editor/assets/xychartDiagram-ELKLHX3M-CmO8305Y.js +7 -0
- package/editor/favicon.ico +0 -0
- package/editor/index.html +15 -0
- package/package.json +61 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{existsSync as c,readFileSync as l,renameSync as d,watch as f,writeFileSync as p}from"node:fs";import{basename as h,dirname as g,extname as w}from"node:path";import{Editor as y}from"@tiptap/core";import{DOC_ATTRS as F,decaframeExtensions as S,defaultThemeId as v,loadDocument as u}from"decaframe";const P=o=>h(o,w(o)),m={type:"doc",attrs:{title:"",format:"16:9",align:"middle",theme:v(),mode:"light"},content:[{type:"page",content:[{type:"box",content:[{type:"item",content:[{type:"itemTitle"}]}]}]}]};class C{editor;currentPath;lastWritten=null;rev=1;listeners=new Set;lastFit=new Map;watching=null;get path(){return this.currentPath}constructor(t){this.currentPath=t;const e=this.readFile();this.lastWritten=e,this.editor=b(e===null?m:a(e,t),t)}get revision(){return this.rev}fitSeen(t,e){const i=this.lastFit.get(t);return e>0?this.lastFit.set(t,e):this.lastFit.delete(t),i}onChange(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}bump(){this.rev+=1;for(const t of this.listeners)try{t(this.rev)}catch(e){console.error(`decaframe: change listener failed: ${e.message}`)}}readFile(){return c(this.path)?l(this.path,"utf8"):null}adopt(t){const e=u(t);this.editor.commands.setContent(e,{errorOnInvalidContent:!0});const i=this.editor.schema.nodes.doc.defaultAttrs,r=e.attrs??{},s={};for(const n of F)s[n]=n in r?r[n]:i[n];this.editor.commands.setDocument(s)}sync(){const t=this.readFile();t===null||t===this.lastWritten||(this.adopt(a(t,this.path)),this.lastWritten=t,this.bump())}watchFile(){this.watching?.();const t=this.beginWatch();return this.watching=t,()=>{this.watching===t&&(t(),this.watching=null)}}beginWatch(){const t=h(this.currentPath);let e=null;const i=()=>{e=null;try{this.sync()}catch(s){console.error(`decaframe: ${s.message}`)}};let r;try{r=f(g(this.currentPath),(s,n)=>{n!==null&&n!==t||(e&&clearTimeout(e),e=setTimeout(i,25))})}catch(s){return console.error(`decaframe: not watching ${this.currentPath}: ${s.message}`),()=>{}}return r.unref(),r.on("error",s=>console.error(`decaframe: watch failed: ${s.message}`)),()=>{e&&clearTimeout(e),r.close()}}replace(t,e){return e!==this.rev?!1:(this.adopt(t),this.save(),!0)}openAt(t){if(t===this.currentPath)return;const e=c(t)?l(t,"utf8"):null;this.adopt(e===null?m:a(e,t)),this.currentPath=t,this.lastWritten=e,this.lastFit.clear(),this.watching&&this.watchFile(),this.bump()}save(){const t=`${JSON.stringify(this.editor.getJSON(),null,2)}
|
|
2
|
+
`;if(t===this.lastWritten)return;const e=`${this.path}.tmp`;p(e,t),d(e,this.path),this.lastWritten=t,this.bump()}}function a(o,t){try{return JSON.parse(o)}catch(e){throw new Error(`${t} is not valid JSON: ${e.message}`)}}function b(o,t){const e=n=>new Error(`${t} is not a valid Decaframe document: ${n}`);let i;try{i=u(o)}catch(n){throw e(n.message)}let r=null;const s=new y({extensions:S(),content:i,enableContentCheck:!0,onContentError:({error:n})=>{r=n}});if(r)throw e(r.message);return s}export{C as Session,P as docFileName};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{resolve as t}from"node:path";import{StdioServerTransport as c}from"@modelcontextprotocol/sdk/server/stdio.js";import{startChannel as s}from"./channel.js";import{createServer as a}from"./server.js";import{Session as m}from"./session.js";const n=t(process.env.DECAFRAME_DOC??"document.json"),o=new m(n),i=a(o);await i.connect(new c),console.error(`decaframe mcp \xB7 document: ${n}`);const e=Number(process.env.DECAFRAME_CHANNEL_PORT??"");if(Number.isInteger(e)&&e>0)try{const r=await s(o,e);o.watchFile(),console.error(`decaframe mcp \xB7 change channel: http://127.0.0.1:${r.port}`)}catch(r){console.error(`decaframe mcp \xB7 change channel NOT started on ${e}: ${r.message}. The agent surface is unaffected; the browser cannot commit edits.`)}
|
package/dist/media.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Node as f,mergeAttributes as d}from"@tiptap/core";import{Image as x}from"@tiptap/extension-image";import{blockAttributes as $,sizeAttributes as T}from"./design.js";const p=new Set(["http","https"]),k=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,z=/(?:youtu\.be\/|\/embed\/|\/v\/|\/shorts\/|[?&]v=)([\w-]+)/;function g(e){if(typeof e!="string")return null;const a=e.trim();return k.test(a)?z.exec(a)?.[1]??null:null}const u="https://i.ytimg.com/vi",I=e=>{const a=g(e);return a?`${u}/${a}/hqdefault.jpg`:null};function Y(e){const a=new RegExp(`^${u}/([\\w-]+)/hqdefault\\.jpg$`).exec(e)?.[1];return a?[`${u}/${a}/maxresdefault.jpg`,e]:[e]}const N=(e,a={})=>`https://www.youtube-nocookie.com/embed/${e}?rel=0${a.autoplay?"&autoplay=1":""}`,S=new Set(["youtube"]),O=e=>e!==void 0&&S.has(e)?"video":"image";function b(e){if(typeof e!="string"||!e.trim())return"a media address is empty.";const a=e.trim();if(/^data:/i.test(a))return"a media address may not be a data: URL.";if(/^file:/i.test(a))return"a media address may not be a file:// path.";const t=/^([a-z][a-z0-9+.-]*):/i.exec(a)?.[1]?.toLowerCase();return t?p.has(t)?null:`a media address may not use the '${t}:' scheme.`:"a media address needs https:// on the front."}function A(e,a){if(typeof e!="string"||e.trim()==="")return a==="video"?"a video needs a 'src': the web address of the YouTube video, like 'https://www.youtube.com/watch?v=aqz-KE-bpKQ'. Copy it out of the browser's address bar on the video's own page.":"an image needs a 'src': the full web address of the picture, like 'https://example.com/photo.jpg'. There is no upload \u2014 put the image somewhere with an address first, then give that address here.";const t=e.trim();if(/^data:/i.test(t))return"a 'src' may not be a data: URL \u2014 that puts the image's bytes inside the document, which is the one thing this cannot hold: the whole document is sent on every edit, so a few inlined photos stop the human's typing being saved at all. Host the image and give its address.";if(/^file:/i.test(t))return"a 'src' may not be a file:// path \u2014 it only resolves on the machine that wrote it, and a browser will not load one at all. Put the image somewhere with a web address instead.";const o=/^([a-z][a-z0-9+.-]*):/i.exec(t)?.[1]?.toLowerCase();if(!o)return`'${t}' is not a full web address \u2014 it has no https:// on the front. A relative path or a bare host resolves against whoever happens to be showing the page, which is a different place on each of them. Give the whole address.`;if(!p.has(o))return`'${t}' uses the '${o}:' scheme, which a browser will not load as an image. Use https:// (or http:// for something on this machine).`;const i=g(t);return a==="video"&&!i?`'${t}' is not a YouTube video address. This block plays YouTube, so the 'src' has to name one video \u2014 'https://www.youtube.com/watch?v=\u2026', 'https://youtu.be/\u2026', a '/shorts/\u2026' or an '/embed/\u2026' address. A playlist address names no single video and a channel or a search page names none at all. For a picture, use the \`image\` block instead.`:a==="image"&&i?`'${t}' is a YouTube address, and this block draws a picture file \u2014 it would render an empty frame. Use the \`video\` block, which takes exactly this address, draws the video's own still frame and plays it when clicked.`:null}const w=4;function M(e){const a=(s,n)=>typeof s=="number"&&Number.isFinite(s)?s:n,t=a(e.focusX,50),o=a(e.focusY,50),i=a(e.zoom,1);return{focusX:t,focusY:o,zoom:i,framed:t!==50||o!==50||i!==1}}function B(e){if(typeof e!="object"||e===null)return null;const a=e;for(const o of["focusX","focusY"]){const i=a[o];if(i!=null){if(typeof i!="number"||!Number.isFinite(i))return`'${o}' must be a plain number between 0 and 100 \u2014 ${JSON.stringify(i)} is not one. It is a position across the PICTURE, not a length on the page: no per cent sign, no unit. 50 is the middle, which is what you get by leaving it out.`;if(i<0||i>100)return`'${o}' is ${i}, which is outside 0 to 100. It says which part of the picture to keep in view \u2014 0 is its left edge (or top), 100 its right edge (or bottom), 50 the middle.`}}const t=a.zoom;return t==null?null:typeof t!="number"||!Number.isFinite(t)?`'zoom' must be a plain number of 1 or more \u2014 ${JSON.stringify(t)} is not one. 1 fills the frame with the picture, 2 is twice as close in. No unit, no trailing x.`:t<1?`'zoom' is ${t}, and it may not go below 1. At 1 the picture already fills the frame, so anything smaller would leave empty space around it rather than showing more of the photo. To show more of the picture, leave the framing out entirely.`:t>w?`'zoom' is ${t}, and ${w} is the most this allows: past that a picture sized for a web page is being enlarged into its own pixels. Crop the file itself if you need closer.`:null}const m=e=>e.querySelector(".media-frame"),c=e=>({default:null,parseHTML:a=>{const t=m(a)?.getAttribute(e);if(t==null||t.trim()==="")return null;const o=Number(t);return Number.isFinite(o)?o:null},renderHTML:()=>({})}),P=f.create({name:"mediaItem",content:"mediaCaption? mediaTitle? mediaBody?",defining:!0,addAttributes(){return{src:{default:null,parseHTML:e=>{const a=m(e)?.querySelector("a.media-play")?.getAttribute("href")||e.querySelector('img:not([src^="data:" i])')?.getAttribute("src")||null;return a&&!b(a)?a:null},renderHTML:()=>({})},alt:{default:null,parseHTML:e=>m(e)?.getAttribute("data-alt")||null,renderHTML:()=>({})},focusX:c("data-focus-x"),focusY:c("data-focus-y"),zoom:c("data-zoom")}},parseHTML:()=>[{tag:'figure[data-node="mediaItem"]'}],renderHTML({node:e,HTMLAttributes:a}){const t=typeof e.attrs.src=="string"?e.attrs.src:"",o=typeof e.attrs.alt=="string"?e.attrs.alt:"",i=I(t),{focusX:s,focusY:n,zoom:h,framed:y}=M(e.attrs),v=y?{"data-framed":"true","data-focus-x":String(s),"data-focus-y":String(n),"data-zoom":String(h),style:`--mf-x:${s}%;--mf-y:${n}%;--mf-z:${h}`}:{},l=["div",{class:"media-frame",contenteditable:"false",...o?{"data-alt":o}:{},...v,...t?{}:{"data-missing":"true"}}];return t&&i?l.push(["a",{class:"media-play",href:t,target:"_blank",rel:"noopener noreferrer","aria-label":o?`Play: ${o}`:"Play the video"},["img",{class:"media-img",src:i,alt:o}],["span",{class:"media-play-badge","aria-hidden":"true"}]]):t?l.push(["img",{class:"media-img",src:t,alt:o}]):l.push(["span",{class:"media-add"},["span",{class:"media-add-plus"},"+"],["span",{class:"media-add-label"},"Add an image"]]),["figure",d(a,{"data-node":"mediaItem",class:"media"}),l,["div",{class:"media-slots"},0]]}});function r(e,a,t,o=!1){return f.create({name:e,group:"block",content:"mediaItem+",defining:!0,addAttributes:()=>({...$(t),...o?T():{}}),parseHTML:()=>[{tag:`div[data-node="${e}"]`}],renderHTML:({HTMLAttributes:i})=>["div",d(i,{"data-node":e,class:`blk ${a}`}),0]})}const U=r("imageBlock","blk-image",1,!0),C=r("imageGrid","blk-image-grid",1),F=r("imageText","blk-image-with-text",1),X=r("people","blk-people",1),_=r("videoBlock","blk-youtube",1,!0),q=x.extend({name:"inlineImage",markdownTokenName:"image",parseMarkdown:(e,a)=>a.createNode("inlineImage",{src:e.href&&!A(e.href,"image")?e.href:null,alt:e.text||null}),addAttributes(){return{src:{default:null},alt:{default:null}}},parseHTML(){return[{tag:'img.inline-img[src]:not([src^="data:" i])',getAttrs:e=>b(e.getAttribute("src"))?!1:null}]},renderHTML({HTMLAttributes:e}){return["img",d(e,{class:"inline-img"})]}}).configure({inline:!0,allowBase64:!1});export{U as ImageBlock,C as ImageGrid,F as ImageText,q as InlineImage,P as MediaItem,X as People,_ as VideoBlock,w as ZOOM_MAX,N as embedUrl,M as framingOf,B as mediaFramingProblem,O as mediaKindOf,A as mediaSrcProblem,b as mediaSrcSchemeProblem,Y as posterCandidates,I as posterFor,g as youtubeId};
|
package/dist/notes.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@tiptap/starter-kit";import{Markdown as o}from"@tiptap/markdown";const a=()=>[e.configure({blockquote:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,link:!1,strike:!1,underline:!1}),o];export{a as notesExtensions};
|
package/dist/page.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Node as t,mergeAttributes as n}from"@tiptap/core";import{cssString as f}from"./furniture.js";import{defaultThemeId as c}from"./theme/index.js";const m=t.create({name:"doc",topNode:!0,content:"page+",addAttributes(){return{title:{default:""},format:{default:"16:9"},align:{default:"middle"},autoFit:{default:!0},theme:{default:c()},mode:{default:"light"},footer:{default:""},footerLogo:{default:""},footerLogoWide:{default:!1},footerNumbers:{default:!1}}}}),A=["title","format","align","autoFit","theme","mode","footer","footerLogo","footerLogoWide","footerNumbers"],s=["16:9","4:3","A4","fluid"],T=["top","middle","bottom"],b=s.filter(e=>e!=="fluid"),L=["A4"],M=t.create({name:"page",content:"pageAccent? pageEyebrow? pageTitle? pageSubtitle? (block | layout)*",defining:!0,isolating:!0,addAttributes(){return{mode:{default:null,parseHTML:e=>e.getAttribute("data-mode"),renderHTML:e=>e.mode?{"data-mode":e.mode}:{}},accent:{default:null,parseHTML:e=>e.getAttribute("data-accent"),renderHTML:e=>e.accent?{"data-accent":e.accent}:{}},surface:{default:null,parseHTML:e=>e.getAttribute("data-surface"),renderHTML:e=>e.surface?{"data-surface":e.surface}:{}},notes:{default:null,rendered:!1},footer:{default:null,parseHTML:e=>e.getAttribute("data-footer"),renderHTML:e=>e.footer===null||e.footer===void 0?{}:{"data-footer":e.footer,style:`--footer-words:${f(e.footer)}`}},furniture:{default:null,parseHTML:e=>e.getAttribute("data-furniture"),renderHTML:e=>e.furniture?{"data-furniture":e.furniture}:{}}}},parseHTML:()=>[{tag:'section[data-node="page"]'}],renderHTML:({HTMLAttributes:e})=>["section",n(e,{"data-node":"page",class:"page"}),0]}),H=["top","lead","trail","full"],N=["subtle","muted","accent"],S=t.create({name:"pageAccent",atom:!0,selectable:!1,draggable:!1,isolating:!0,addAttributes(){return{src:{default:null},alt:{default:null},focusX:{default:null},focusY:{default:null},zoom:{default:null}}},parseHTML:()=>[{tag:'div[data-node="pageAccent"]'}],renderHTML({node:e}){const{src:o,alt:d,focusX:a,focusY:r,zoom:l}=e.attrs,u=[a!=null||r!=null?`object-position:${Number(a??50)}% ${Number(r??50)}%`:"",l!=null?`scale:${Number(l)}`:""].filter(Boolean).join(";");return["div",{"data-node":"pageAccent",class:"page-accent",contenteditable:"false"},...o?[["img",{src:o,alt:d??"",...u?{style:u}:{}}]]:[]]}});export{H as ACCENT_POSITIONS,T as ALIGNMENTS,A as DOC_ATTRS,m as Doc,b as FIXED_FORMATS,s as FORMATS,N as PAGE_SURFACES,L as PAPER_FORMATS,M as Page,S as PageAccent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Extension as u}from"@tiptap/core";import{Plugin as f,PluginKey as h}from"@tiptap/pm/state";import{Decoration as c,DecorationSet as d}from"@tiptap/pm/view";import{childTypeFor as y,fieldForSlotNode as b,isEntryArchetype as m}from"./archetype.js";import{byNode as a}from"./blocks.js";const g={pageEyebrow:"Eyebrow",pageTitle:"Page title",pageSubtitle:"Subtitle"};function x(e,t){if(m(e.archetype))return b(y(e.archetype),t);if(e.archetype==="table")return t==="tableHeader"?"headers":"rows";if(e.archetype==="prose")return t==="attribution"?"attribution":"text";if(e.archetype==="chart")return{chartTitle:"title",chartAxisX:"axisX",chartAxisY:"axisY"}[t]}function s(e,t,o){const r=e.resolve(o);for(let n=r.depth;n>0;n--){const l=a(r.node(n).type.name);if(l)return p(l,t.type.name)}const i=a(t.type.name);return i?p(i,t.type.name):g[t.type.name]??""}const E=e=>e.type.spec.group==="slot"&&!e.type.inlineContent&&e.childCount===1&&e.firstChild.type.name==="paragraph"&&e.firstChild.content.size===0,p=(e,t)=>{const o=x(e,t);return o&&e.placeholders[o]||""},F=u.create({name:"placeholders",addProseMirrorPlugins(){const e=this.editor;return[new f({key:new h("placeholders"),props:{decorations(t){if(!e.isEditable)return null;const o=[];return t.doc.descendants((r,i)=>{if(E(r)){const l=s(t.doc,r,i);return l&&o.push(c.node(i,i+r.nodeSize,{"data-placeholder":l})),!1}if(!r.type.isTextblock)return!0;if(r.content.size)return!1;const n=s(t.doc,r,i);return n&&o.push(c.node(i,i+r.nodeSize,{"data-placeholder":n})),!1}),d.create(t.doc,o)}}})]}});export{F as Placeholders,E as isEmptyBlockSlot,s as placeholderFor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const E=2600,o=["ArrowRight","PageDown"," ","Enter","n","j"],t=["ArrowLeft","PageUp","Backspace","p","k"];export{E as PRESENT_IDLE_MS,o as PRESENT_NEXT_KEYS,t as PRESENT_PREV_KEYS};
|
package/dist/prose.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Node as z,mergeAttributes as H}from"@tiptap/core";import K from"@tiptap/extension-heading";import Q from"@tiptap/extension-paragraph";import{HorizontalRule as $}from"@tiptap/extension-horizontal-rule";import{CodeBlock as G}from"@tiptap/extension-code-block";import{BulletList as U,ListItem as V,OrderedList as X,TaskItem as J,TaskList as P}from"@tiptap/extension-list";import{mintId as y}from"./id.js";import{blockAttributes as O}from"./design.js";import{SLOT_MARKS as Y,slotContent as A,slotText as b}from"./text.js";const ht=["text","heading","bullets","numbered","quote","checklist","separator","code"],Z=[1,2,3,4,5,6],I=3,C={text:"paragraph",heading:"heading",bullets:"bulletList",numbered:"orderedList",quote:"quote",checklist:"taskList",separator:"horizontalRule",code:"codeBlock"},gt=Object.fromEntries(Object.entries(C).map(([t,e])=>[e,t])),M=new Set(["bulletList","orderedList","taskList"]),tt={taskList:"taskItem"},et=t=>tt[t]??"listItem",xt=["id","kind","text","attribution","checked","level","language","depth","arrangement"],D=new Set(["horizontalRule"]),T=(t,e)=>({addAttributes(){return{...this.parent?.(),...O(t,e)}}}),mt=Q.extend(T(1,"md")).configure({HTMLAttributes:{class:"blk blk-text","data-node":"paragraph"}}),bt=K.extend({...T(1),addAttributes(){return{...this.parent?.(),...O(1),level:{default:I}}}}).configure({levels:[...Z],HTMLAttributes:{class:"blk blk-heading","data-node":"heading"}}),Lt=$.extend(T(1)).configure({HTMLAttributes:{class:"blk blk-separator","data-node":"horizontalRule"}}),kt=G.extend(T(1)).configure({HTMLAttributes:{class:"blk blk-code","data-node":"codeBlock"}}),Tt=U.extend(T(1)).configure({HTMLAttributes:{class:"blk blk-bullets","data-node":"bulletList"}}),Mt=X.extend(T(1)).configure({HTMLAttributes:{class:"blk blk-numbered","data-node":"orderedList"}}),Et=P.extend(T(1)).configure({HTMLAttributes:{class:"blk blk-checklist","data-node":"taskList"}}),St=J.extend({content:"paragraph taskList?",addAttributes(){const t=this.parent?.()??{};return{...t,checked:{...t.checked,renderHTML:e=>({"data-checked":e.checked?"true":"false"})}}},renderHTML({node:t,HTMLAttributes:e}){return["li",H(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",disabled:"disabled",...t.attrs.checked?{checked:"checked"}:{}}],["span"]],["div",0]]}}).configure({HTMLAttributes:{"data-node":"taskItem"}}),yt=V.extend({content:"paragraph (bulletList | orderedList)?"}).configure({HTMLAttributes:{class:"p-item"}}),At=z.create({name:"quote",group:"block",content:"quoteText attribution?",defining:!0,addAttributes:()=>({...O(1)}),parseHTML:()=>[{tag:'blockquote[data-node="quote"]'}],renderHTML:({HTMLAttributes:t})=>["blockquote",H(t,{"data-node":"quote",class:"blk blk-quote"}),0]}),nt=[],F=(t,e,r)=>(nt.push(t),z.create({name:t,content:"inline*",marks:Y,defining:!0,selectable:!1,parseHTML:()=>[{tag:`${e}[data-slot="${t}"]`}],renderHTML:({HTMLAttributes:n})=>[e,H(n,{"data-slot":t,class:r}),0]})),qt=F("quoteText","p","q-text"),Ht=F("attribution","footer","q-attribution");function rt(t){if(t.type.name==="quote"){const e={text:b(t.child(0))};return t.childCount>1&&(e.attribution=b(t.child(1))),[e]}if(D.has(t.type.name))return[{}];if(!M.has(t.type.name)){const e={text:b(t)},r=t.type.spec.attrs??{};return"level"in r&&(e.level=t.attrs.level),"language"in r&&t.attrs.language&&(e.language=t.attrs.language),t.attrs.arrangement&&(e.arrangement=t.attrs.arrangement),[e]}return _(t,0)}function _(t,e){const r=[];return t.forEach(n=>{const c=n.firstChild;if(!c)return;const a={id:c.attrs.id,text:b(c)};e&&(a.depth=e),"checked"in(n.type.spec.attrs??{})&&(a.checked=!!n.attrs.checked),r.push(a),n.forEach((d,L,m)=>{m>0&&M.has(d.type.name)&&r.push(..._(d,e+1))})}),r}const ot=t=>t.kind??"text";function B(t,e,r){const n=t.nodes[e].spec.attrs??{},c={};if("level"in n){const a=Math.round(r.level??I);c.level=Math.min(6,Math.max(1,Number.isFinite(a)?a:I))}return"language"in n&&(c.language=r.language??null),r.arrangement!==void 0&&"arrangement"in n&&(c.arrangement=r.arrangement),c}const R=(t,e,r,n={})=>t.nodes[e].createChecked({id:y(e),...n},A(t,r??"",e));function Ot(t){const e=[];for(const r of t){const n=ot(r),c=e[e.length-1];c&&c.kind===n&&M.has(C[n])?c.lines.push(r):e.push({kind:n,lines:[r]})}return e}function W(t,e){return"checked"in(t.type.spec.attrs??{})?!!t.attrs.checked==!!e.checked:!0}function v(t,e,r,n,c){const a=et(e),d="checked"in(t.nodes[a].spec.attrs??{})?{checked:!!r.checked}:null,L=r.id?c?.get(r.id):void 0,m=L&&b(L)===(r.text??"")?L:R(t,"paragraph",r.text??"",r.id?{id:r.id}:{});return t.nodes[a].createChecked(d,n?[m,n]:m)}function N(t,e,r,n,c){const a=[...c??[]],d=[];for(const[m,h]of r.entries()){const k=Math.max(0,Math.round(h.depth??0)||0);d.push(m===0?0:Math.min(k,d[m-1]+1))}const L=(m,h)=>{const k=[];let p=m;for(;p<r.length&&d[p]>=h&&!(d[p]>h);){const w=r[p];p+=1;let E;if(p<r.length&&d[p]===h+1){const o=L(p,h+1);E=t.nodes[e].createChecked({id:a.shift()??y(e)},o.items),p=o.next}k.push(v(t,e,w,E,n))}return{items:k,next:p}};return t.nodes[e].createChecked({id:y(e)},L(0,0).items)}function j(t,e,r){if(!M.has(e)){if(r.length!==1)throw new Error(`'${e}' holds exactly one line`);const[n]=r,c={...n.id?{id:n.id}:{},...B(t,e,n)};if(e!=="quote")return R(t,e,n.text??"",c);const a=[t.nodes.quoteText.createChecked(null,A(t,n.text??"","quoteText"))];return n.attribution&&a.push(t.nodes.attribution.createChecked(null,A(t,n.attribution,"attribution"))),t.nodes.quote.createChecked({id:y("quote"),...c},a)}return N(t,e,r)}function It(t,e,r){if(!r.length)return!1;try{return j(t,e,r),!0}catch{return!1}}function _t(t,e,r){const n=t.doc.nodeAt(e);if(!n)return;const c=t.steps.length,a=t.doc.type.schema,d=o=>t.mapping.slice(c).map(o);if(n.type.name==="quote"){const o=r[0]??{},s=rt(n)[0];if((o.text??"")===s.text&&(o.attribution??"")===(s.attribution??""))return;if(!!o.attribution!=!!s.attribution){t.replaceWith(e,e+n.nodeSize,j(a,"quote",[{...o,id:n.attrs.id}]));return}const i=[];let u=e+1;n.forEach(f=>{i.push([f,u]),u+=f.nodeSize});for(let f=i.length-1;f>=0;f--){const[l,x]=i[f],g=(f===0?o.text:o.attribution)??"";if(g===b(l))continue;const q=d(x+1),S=d(x+l.nodeSize-1);g?t.replaceWith(q,S,a.text(g)):t.delete(q,S)}return}if(!M.has(n.type.name)){const o=r[0]??{},s={};if(o.level!==void 0&&Object.assign(s,B(a,n.type.name,o)),o.language!==void 0&&"language"in(n.type.spec.attrs??{})&&(s.language=o.language),o.arrangement!==void 0&&(s.arrangement=o.arrangement),Object.entries(s).some(([x,g])=>n.attrs[x]!==g)&&t.setNodeMarkup(d(e),void 0,{...n.attrs,...s}),D.has(n.type.name))return;const u=o.text??"";if(u===b(n))return;const f=d(e+1),l=d(e+n.nodeSize-1);u?t.replaceWith(f,l,A(a,u,n.type.name)):t.delete(f,l);return}if(_(n,0).some(o=>o.depth)||r.some(o=>o.depth)){const o=new Map,s=[],i=f=>{f.forEach(l=>{const x=l.firstChild;x?.attrs.id&&o.set(x.attrs.id,x),l.forEach((g,q,S)=>{S>0&&M.has(g.type.name)&&(s.push(g.attrs.id),i(g))})})};i(n);const u=N(a,n.type.name,r,o,s);if(u.content.eq(n.content))return;t.replaceWith(e+1,e+n.content.size+1,u.content);return}const h=new Map;let k=e+1;n.forEach((o,s,i)=>{const u=o.firstChild;u?.attrs.id&&h.set(u.attrs.id,{item:o,line:u,pos:k,index:i}),k+=o.nodeSize});const p=r.map(o=>o.id?h.get(o.id)?.index:void 0).filter(o=>o!==void 0);if(!p.every((o,s)=>s===0||o>p[s-1])||p.length===0){const o=r.map(s=>{const i=s.id?h.get(s.id):void 0;return i&&b(i.line)===(s.text??"")&&W(i.item,s)?i.item:v(a,n.type.name,s)});t.replaceWith(e+1,e+n.content.size+1,o);return}const E=new Set(r.map(o=>o.id).filter(Boolean));for(const o of[...h.values()].filter(s=>!E.has(s.line.attrs.id)).sort((s,i)=>i.pos-s.pos))t.delete(d(o.pos),d(o.pos+o.item.nodeSize));for(let o=0;o<r.length;o++){const s=r[o],i=s.id?h.get(s.id):void 0;if(i){W(i.item,s)||t.setNodeMarkup(d(i.pos),void 0,{...i.item.attrs,checked:!!s.checked});const l=s.text??"";if(l===b(i.line))continue;const x=d(i.pos+2),g=d(i.pos+i.item.nodeSize-2);l?t.replaceWith(x,g,a.text(l)):t.delete(x,g);continue}const u=r.slice(o+1).map(l=>l.id?h.get(l.id):void 0).find(Boolean),f=d(u?u.pos:e+n.content.size+1);t.insert(f,v(a,n.type.name,{...s,id:void 0}))}}export{Ht as Attribution,I as DEFAULT_HEADING_LEVEL,Z as HEADING_LEVELS,gt as KIND_OF,ht as LINE_KINDS,M as LIST_NODES,xt as PROSE_FIELDS,Tt as ProseBulletList,kt as ProseCode,bt as ProseHeading,yt as ProseListItem,Mt as ProseOrderedList,mt as ProseParagraph,Lt as ProseSeparator,St as ProseTaskItem,Et as ProseTaskList,nt as QUOTE_SLOTS,At as Quote,qt as QuoteText,D as TEXTLESS_NODES,_t as applyLines,j as blockForLines,Ot as groupLines,et as itemNodeFor,It as linesBuildable,rt as linesOf};
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CATALOGUE as d}from"./blocks.js";import{DEFAULT_THEME as c,THEMES as u}from"./theme/index.js";import{TEMPLATES as f}from"./template/index.js";const T=e=>e.reason==="unreachable"?`${e.kind} '${e.name}' is in a hosted index that could not be reached \u2014 check the network; exported with the default`:e.reason==="newer"?`${e.kind} '${e.name}' was authored at revision ${e.want} and this build has ${e.have} \u2014 update decaframe; exported with the default`:`${e.kind} '${e.name}' did not resolve \u2014 exported with the default`,h="decaframe",i=(e,t,o)=>({name:e,kind:t,revision:o,visibility:"public",publisher:h}),l={registry:h,entries:[...d.map(e=>i(e.type,"block",e.version)),...u.map(e=>i(e.id,"theme",e.revision??1)),...f.map(e=>i(e.id,"template",e.version))]},p=()=>l,m=(e,t)=>p().entries.find(o=>o.kind===e&&o.name===t);function s(e,t,o,n){const r=m(e,t),a=n(t);return!r||a===void 0?{ok:!1,miss:{reason:"unknown",kind:e,name:t}}:o!==void 0&&o>r.revision?{ok:!1,miss:{reason:"newer",kind:e,name:t,want:o,have:r.revision}}:{ok:!0,value:a,entry:r}}const $=(e,t)=>s("block",e,t,o=>d.find(n=>n.type===o)),v=(e,t)=>s("theme",e,t,o=>u.find(n=>n.id===o)),b=(e,t)=>s("template",e,t,o=>f.find(n=>n.id===o));function w(e){if(!e)return{theme:c};const t=v(e);return t.ok?{theme:t.value}:{theme:c,miss:t.miss}}export{l as BUILT_IN,h as PUBLISHER,p as activeRegistry,T as missMessage,$ as resolveBlock,b as resolveTemplate,v as resolveTheme,w as themeOrDefault};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Extension as u}from"@tiptap/core";import{Plugin as c,PluginKey as p}from"@tiptap/pm/state";import{Decoration as m,DecorationSet as f}from"@tiptap/pm/view";import{MIN_WIDTH as w,WIDTH_ATTR as d,WIDTH_FULL as h}from"./design.js";import{findById as r}from"./commands.js";const o=new p("sizePreview"),g=e=>Math.round(Math.min(h,Math.max(w,e))*10)/10,y=(e,t)=>{o.getState(e.state)!==t&&e.view.dispatch(e.state.tr.setMeta(o,t))},z=u.create({name:"sizePreview",addProseMirrorPlugins(){return[new c({key:o,state:{init:()=>null,apply(e,t,n,i){const s=e.getMeta(o);if(s!==void 0)return s;if(t===null||!e.docChanged)return t;const l=r(n.doc,t.id),a=r(i.doc,t.id);return a&&l?.node.attrs[d]===a.node.attrs[d]?t:null}},props:{decorations(e){const t=o.getState(e);if(!t)return null;const n=r(e.doc,t.id);if(!n)return null;const i=g(t.share);return f.create(e.doc,[m.node(n.pos,n.pos+n.node.nodeSize,{"data-width":String(i),style:`width: ${i}%; margin-inline: auto;`})])}}})]}});export{z as SizePreviewExtension,y as setSizePreview,o as sizePreviewKey};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{MarkdownManager as a}from"@tiptap/markdown";import i from"@tiptap/starter-kit";import s from"@tiptap/extension-image";import m from"@tiptap/extension-highlight";const p={inlineImage:"image"},c={image:"inlineImage"},r=t=>{const e=n=>({...n,...n.type&&t[n.type]?{type:t[n.type]}:{},...n.content?{content:n.content.map(e)}:{}});return e},l=r(p),g=r(c),o=(()=>{let t=null;return()=>t??=new a({extensions:[i.configure({trailingNode:!1,listKeymap:!1}),s,m]})})(),w=t=>t.map(e=>o().serialize({type:"doc",content:[l(e)]})).filter(e=>e.trim()).join(`
|
|
2
|
+
|
|
3
|
+
`),S=t=>(o().parse(t).content??[]).map(g);export{S as parseSlot,w as serialiseSlot};
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{mergeAttributes as C}from"@tiptap/core";import{Fragment as R}from"@tiptap/pm/model";import{Table as E,TableCell as F,TableHeader as $,TableRow as B}from"@tiptap/extension-table";import{TableMap as p,removeColumn as D,removeRow as z,rowIsHeader as I}from"@tiptap/pm/tables";import{mintId as _}from"./id.js";import{blockAttributes as U}from"./design.js";import{SLOT_MARKS as W,slotContent as b,slotText as M}from"./text.js";const se=["headers","rows"],T="columns",K=10,P=e=>Math.min(K,100/(e+1)),G=e=>Array.from({length:e},()=>100/e);function V(e,r){if(r<2||e.length!==r||e.some(n=>!Number.isFinite(n)||n<=0))return null;const t=P(r),l=e.reduce((n,s)=>n+s,0),o=e.map(n=>n/l*100);for(;;){const n=o.map((a,u)=>a<t?-1:u).filter(a=>a>=0);if(n.length===o.length||!n.length)break;let s=0;for(let a=0;a<o.length;a++)o[a]<t&&(s+=t-o[a],o[a]=t);const i=n.reduce((a,u)=>a+o[u],0);if(i<=s)break;for(const a of n)o[a]-=s*(o[a]/i)}const h=n=>Math.round(n*10)/10;for(let n=0;n<o.length;n++)o[n]=h(o[n]);const c=h(100-o.reduce((n,s)=>n+s,0));if(c!==0){const n=o.indexOf(Math.max(...o));o[n]=h(o[n]+c)}if(o.some(n=>n<t-.1))return null;const d=100/r;return o.every(n=>Math.abs(n-d)<=1)?null:o}function L(e){const r=e.attrs?.[T];if(!Array.isArray(r))return null;const t=m(e);return t<2||r.length!==t||!r.every(l=>typeof l=="number"&&Number.isFinite(l)&&l>0)?null:r}const le=e=>L(e)??G(Math.max(1,m(e)));function j(e){const r=Array.from(e.children).find(o=>o.tagName==="COLGROUP");if(!r)return null;const t=Array.from(r.children).filter(o=>o.tagName==="COL");if(t.length<2)return null;const l=t.map(o=>parseFloat(o.style?.width||"")||0);return l.some(o=>o<=0)?null:V(l,l.length)}const k=()=>({[T]:{default:null,parseHTML:e=>j(e),renderHTML:()=>({})}}),ae=e=>!!e?.attrs&&T in e.attrs,ie=new Set(["table"]),ce=E.extend({content:"tableRow+",group:"block",tableRole:"table",isolating:!0,addAttributes:()=>({...U(1),...k()}),renderHTML:({node:e,HTMLAttributes:r})=>{const t=C(r,{"data-node":"table",class:"blk blk-table"}),l=L(e);return l?["table",t,["colgroup",{},...l.map(o=>["col",{style:`width:${o}%`}])],["tbody",0]]:["table",t,["tbody",0]]}}).configure({resizable:!1,renderWrapper:!1,View:null}),he=B.extend({parseHTML:()=>[{tag:"tr"}]}).configure({HTMLAttributes:{class:"t-row"}}),H=new Set(["P","DIV","LI","UL","OL","H1","H2","H3","H4","H5","H6","PRE","BLOCKQUOTE","TABLE"]),Q=e=>Array.from(e.children).some(r=>H.has(r.tagName)),q=e=>{const r=[];for(const t of Array.from(e.childNodes)){const l=(t.textContent??"").replace(/\s+/g," ").trim();l&&(t.nodeType===1&&H.has(t.tagName),r.push(l))}return r.join(`
|
|
2
|
+
`)},S=(e,r)=>({content:"inline*",group:"slot",marks:W,isolating:!0,addAttributes:()=>({colspan:{default:1,parseHTML:t=>Number(t.getAttribute("colspan"))||1,renderHTML:t=>Number(t.colspan)>1?{colspan:String(t.colspan)}:{}},rowspan:{default:1,parseHTML:t=>Number(t.getAttribute("rowspan"))||1,renderHTML:t=>Number(t.rowspan)>1?{rowspan:String(t.rowspan)}:{}}}),parseHTML:()=>[{tag:e,getAttrs:t=>Q(t)?{}:!1,getContent:(t,l)=>R.from(b(l,q(t)))},{tag:e}],renderHTML:({HTMLAttributes:t})=>[e,C(t,{class:r}),0]}),de=F.extend(S("td","t-cell")),ue=$.extend(S("th","t-head")),m=e=>e.childCount?p.get(e).width:0;function y(e){if(!e.childCount)return[];const r=p.get(e),t=new Set,l=[];for(let o=0;o<r.height;o++)for(let h=0;h<r.width;h++){const c=r.map[o*r.width+h];if(t.has(c))continue;t.add(c);const d=e.nodeAt(c);d&&l.push({node:d,offset:c,row:o,col:h})}return l}const N=e=>e.childCount>0&&I(p.get(e),e,0);function fe(e){if(!e.childCount)return{headers:[],rows:[]};const r=p.get(e),t=Array.from({length:r.height},()=>Array.from({length:r.width},()=>""));for(const o of y(e))t[o.row][o.col]=M(o.node);const l=N(e);return{headers:l?t[0]:[],rows:l?t.slice(1):t}}const g=e=>{const r=e.headers??[],t=e.rows??[];return{headers:r,rows:t,header:r.length>0,height:(r.length>0?1:0)+t.length,width:Math.max(r.length,...t.map(l=>l.length),0)}},x=(e,r,t)=>{const{headers:l,rows:o,header:h}=g(e);return(h?r===0?l:o[r-1]:o[r])?.[t]??""};function J(e,r){const{headers:t,rows:l,height:o,width:h}=g(e);if(!Array.isArray(e.rows??[]))return"'rows' must be an array of rows, each an array of cell text.";for(const[n,s]of l.entries()){if(!Array.isArray(s))return`row ${n+1} is not an array \u2014 every row is a list of cell text, like ['Starter', '3', 'no'].`;if(s.some(i=>typeof i!="string"))return`row ${n+1} holds something that is not text. Every cell is a string; use '' for a blank cell.`}if(t.some(n=>typeof n!="string"))return"'headers' holds something that is not text. Every heading is a string.";if(o===0)return"a table needs at least one row: send `rows` as a list of rows, or `headers` for a header row, or both.";if(h===0)return"every row is empty \u2014 a table needs at least one column of cell text.";if(!r)return null;const c=new Set(y(r).map(n=>`${n.row}:${n.col}`)),d=r.childCount?p.get(r):null;for(let n=0;d&&n<Math.min(o,d.height);n++)for(let s=0;s<Math.min(h,d.width);s++)if(!c.has(`${n}:${s}`)&&x(e,n,s).trim()!=="")return`row ${n+1}, column ${s+1} is covered by a cell merged across it, so it holds no text of its own. Put the words in the merged cell \u2014 the first row and column it starts at \u2014 and leave this one empty.`;return null}const A=(e,r,t)=>e.nodes[r].createChecked(null,b(e,t,r));function X(e,r,t){const{header:l,height:o,width:h}=g(t),c=[];for(let d=0;d<o;d++){const n=l&&d===0?"tableHeader":"tableCell",s=[];for(let i=0;i<h;i++)s.push(A(e,n,x(t,d,i)));c.push(e.nodes.tableRow.createChecked(null,s))}return e.nodes[r].createChecked({id:_(r)},c)}function pe(e,r,t){if(J(t))return!1;try{return X(e,r,t),!0}catch{return!1}}function me(e,r,t){if(!e.doc.nodeAt(r))return;const l=e.doc.type.schema,o=g(t),h=r+1,c=()=>e.doc.nodeAt(r),d=()=>{const s=c(),i=p.get(s);return{map:i,table:s,tableStart:h,left:0,top:0,right:i.width,bottom:i.height}};for(;c().childCount<o.height;){const s=c(),i=[];for(let a=0;a<Math.max(1,m(s));a++)i.push(A(l,"tableCell",""));e.insert(h+s.content.size,l.nodes.tableRow.createChecked(null,i))}for(;c().childCount>o.height;){const s=d();z(e,s,s.map.height-1)}for(;m(c())<o.width;){const s=[];let i=h;c().forEach(a=>{s.push({at:i+a.nodeSize-1,type:a.lastChild?.type.name??"tableCell"}),i+=a.nodeSize});for(const a of s.reverse())e.insert(a.at,A(l,a.type,""))}for(;m(c())>o.width;){const s=d();D(e,s,s.map.width-1)}if(N(c())!==o.header){const s=o.header?l.nodes.tableHeader:l.nodes.tableCell,i=c().firstChild;if(i){const a=[];let u=h+1;i.forEach(f=>{a.push([f,u]),u+=f.nodeSize});for(const[f,w]of a.reverse())f.type!==s&&e.setNodeMarkup(w,s,f.attrs)}}const n=y(c());for(let s=n.length-1;s>=0;s--){const{node:i,offset:a,row:u,col:f}=n[s],w=x(t,u,f);if(w===M(i))continue;const O=h+a+1,v=h+a+i.nodeSize-1;e.replaceWith(O,v,b(l,w,i.type.name))}}export{T as COLUMNS_ATTR,ce as DecaTable,de as DecaTableCell,ue as DecaTableHeader,he as DecaTableRow,K as MIN_COLUMN,se as TABLE_FIELDS,ie as TABLE_NODES,me as applyTable,X as blockForTable,m as colsOf,P as columnFloor,ae as declaresColumns,V as normaliseWidths,pe as tableBuildable,fe as tableOf,J as tableProblem,le as widthsNow,L as widthsOf};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"id":"cover","name":"Cover","group":"Openers & closers","whenToUse":"THE TITLE PAGE. The occasion or organisation as the eyebrow; the title as the FIRST TEXT BLOCK — this page has no title field, its title is that block, set at display size and centred; one line saying what the document is; and a byline naming who and when. It ships with a `full` accent and no picture, so it is plain paper until set_page is given an accentSrc — one call puts a photograph behind the words under a scrim. It is ALSO the closing page: the ask as the title, how to reach you as the byline. For a section break, use Divider.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":"full","surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageAccent","attrs":{"src":null,"alt":null,"focusX":null,"focusY":null,"zoom":null}},{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"The organisation, or the occasion"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"xl","design":null,"iconPosition":null},"content":[{"type":"text","text":"The title of this document"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"md","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what it is and who it is for."}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"Presented by a name, their role · The date"}]}]}},{"id":"title-and-figures","name":"Title and figures","group":"Openers & closers","whenToUse":"The page after the title, where three facts frame the whole document — a period, a scale, a duration. The figures are a stat-row, so each is a value with a label and a note. If the opener needs a picture down one side, use Title pane; for the title page itself, use Cover.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Section"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"A title for this document"}]},{"type":"pageSubtitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"One line saying what it is and who it is for."}]},{"type":"statRow","attrs":{"v":1,"variant":"side-rule","arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it covers"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"Q3"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"The period in view."}]}]},{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"Parts to it"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"04"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"Sections, in order."}]}]},{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"How long it runs"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"20m"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"Read or presented."}]}]}]}]}},{"id":"title-pane","name":"Title pane","group":"Openers & closers","whenToUse":"An opening page with a picture down one side and three to five lines saying what the document covers. The picture is a PAGE accent, so it divides the page into two panes and content cannot sit on it. If the lines are ordered parts rather than points, use Agenda.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":"lead","surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageAccent","attrs":{"src":null,"alt":null,"focusX":null,"focusY":null,"zoom":null}},{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Section"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"A title beside a picture"}]},{"type":"pageSubtitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"One line saying what it is and who it is for."}]},{"type":"bulletList","attrs":{"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What this document is for, and what it is not"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"Who it is written for, and what they already know"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it asks you to decide by the end"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What happens after that decision is made"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"Where the detail behind it lives"}]}]}]}]}},{"id":"agenda","name":"Agenda","group":"Openers & closers","whenToUse":"The contents page: FOUR OR FIVE parts, in ORDER, each a title and a line saying what that part covers, stacked beside a picture pane. Ordered because the SEQUENCE carries meaning — if it does not, use Title pane and its bullets. For a coloured section break with no list, use Divider.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":"lead","surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageAccent","attrs":{"src":null,"alt":null,"focusX":null,"focusY":null,"zoom":null}},{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Agenda"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What we will cover"}]},{"type":"steps","attrs":{"v":1,"variant":null,"arrangement":"list","design":null,"iconPosition":null,"mark":null,"figure":null,"width":null,"place":null},"content":[{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Where we are"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The position today, and the few numbers that describe it."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What is in the way"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The constraint that matters most, and what it is costing."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What we propose"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The change we want to make, and why this one rather than another."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it costs"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The spend, the time it takes, and who it needs."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What we need"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The decision we are asking for, and by when."}]}]}]}]}]}},{"id":"divider","name":"Divider","group":"Openers & closers","whenToUse":"A section break on a coloured page: the part number as the eyebrow, the section's title as the FIRST TEXT BLOCK (this page has no title field — its title is that block, set at display size and centred), one line saying what changes from here, and a byline naming the pages it covers. Nothing else belongs on it. To list what the section contains, use Agenda; for the title page itself, use Cover.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":"accent","notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Part two"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"xl","design":null,"iconPosition":null},"content":[{"type":"text","text":"What comes next"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"md","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what changes from here, and why the next few pages are read together."}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"Pages four to nine"}]}]}},{"id":"checklist-and-line","name":"Checklist and line","group":"Openers & closers","whenToUse":"The closing page that ends in ACTIONS: three to five things that happen next, as a checklist each a person can tick, and one line underneath saying what is being asked and of whom. For a closer that is only the ask and how to reach you, use Cover; for actions in ORDER with a line each, use Lead and sequence.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"From here"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What happens next"}]},{"type":"taskList","attrs":{"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The first thing that has to happen, and who does it"}]}]},{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The second, which waits on the first and who it is handed to"}]}]},{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The decision this document asks for, and by what date"}]}]},{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What is sent round once that decision is made, and to whom"}]}]},{"type":"taskItem","attrs":{"checked":false},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"When the next of these lands, and what it will carry"}]}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what is being asked of the people reading this, and how to reach whoever is asking."}]}]}},{"id":"claim-and-set","name":"Claim and set","group":"One claim","whenToUse":"One sentence worth a whole page, with three things underneath that hold it up. The claim is a text block at `xl`, the only size at or above the page title. If the three each need a paragraph rather than a sentence, use Set at length; if the support is numbers, use Claim beside figures.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"The point"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"One thing worth saying"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"xl","design":null,"iconPosition":null},"content":[{"type":"text","text":"The sentence the rest of this document is in service of."}]},{"type":"box","attrs":{"v":1,"variant":"soft-fill","arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"item","attrs":{"icon":"target","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The first reason"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it holds."}]}]}]},{"type":"item","attrs":{"icon":"scale","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The second reason"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it holds."}]}]}]},{"type":"item","attrs":{"icon":"shield","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The third reason"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it holds."}]}]}]}]}]}},{"id":"claim-beside-figures","name":"Claim beside figures","group":"One claim","whenToUse":"A claim on one side and the two or three numbers that back it on the other. Reach for this when the numbers ARE the argument and need no explaining; when they do need it, use Figures and reading. The two columns are a layout, so each side holds its own block.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"The case"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Why this is worth doing"}]},{"type":"layout","attrs":{"layout":"two-cols","v":1},"content":[{"type":"layoutRegion","attrs":{"region":"col-1"},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"The claim, said in one sentence that does not need the numbers to stand up — they confirm it rather than carrying it."}]}]},{"type":"layoutRegion","attrs":{"region":"col-2"},"content":[{"type":"statRow","attrs":{"v":1,"variant":"solid-accent","arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"First measure"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"38%"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it counts."}]}]},{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"Second measure"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"2.4x"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it counts."}]}]},{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"Third measure"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"11"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it counts."}]}]}]}]}]}]}},{"id":"quote-and-source","name":"Quote and source","group":"One claim","whenToUse":"One quotation given a whole page, with a portrait pane down one side and the speaker named underneath. ONE quote only — for several voices, use Set at length with each speaker as an entry. The portrait is a page accent, not a block.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":"trail","surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageAccent","attrs":{"src":null,"alt":null,"focusX":null,"focusY":null,"zoom":null}},{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"In their words"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What they say"}]},{"type":"quote","attrs":{"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"quoteText","attrs":{"textAlign":null},"content":[{"type":"text","text":"A sentence somebody else said, that makes the point better than you can, and is worth the room a whole page gives it. Two sentences is the most that reads as a quote rather than as a passage."}]},{"type":"attribution","attrs":{"textAlign":null},"content":[{"type":"text","text":"Their name, their role"}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying who they are and why their saying it matters here."}]}]}},{"id":"lead-and-set","name":"Lead and set","group":"Sets","whenToUse":"Four to six parallel things, each a title and a sentence, under one line saying what they add up to. If three of them each need a paragraph, use Set at length; if each side needs its own BLOCK rather than an entry, use Two sides.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Overview"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What is in the box"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what the six below have in common and why they are on one page."}]},{"type":"box","attrs":{"v":1,"variant":"outlined","arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"item","attrs":{"icon":"database","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The first"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it matters."}]}]}]},{"type":"item","attrs":{"icon":"workflow","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The second"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it matters."}]}]}]},{"type":"item","attrs":{"icon":"shield","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The third"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it matters."}]}]}]},{"type":"item","attrs":{"icon":"zap","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The fourth"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it matters."}]}]}]},{"type":"item","attrs":{"icon":"globe","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The fifth"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it matters."}]}]}]},{"type":"item","attrs":{"icon":"lock","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The sixth"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A sentence saying what it is and why it matters."}]}]}]}]}]}},{"id":"set-at-length","name":"Set at length","group":"Sets","whenToUse":"Three things said at LENGTH — a paragraph each, which a grid cell has no room for. The `list` shape holds about half again what a grid does. For more than four things, or for a sentence each, use Lead and set.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"The argument"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Three propositions"}]},{"type":"box","attrs":{"v":1,"variant":"accent-bar","arrangement":"list","design":null,"iconPosition":null},"content":[{"type":"item","attrs":{"icon":"lightbulb","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The first proposition"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A paragraph, because this shape has room for one and the grid does not. Two or three sentences sit comfortably here, which is what makes it the shape for few things said properly."}]}]}]},{"type":"item","attrs":{"icon":"scale","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The second proposition"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A paragraph, because this shape has room for one and the grid does not. Two or three sentences sit comfortably here, which is what makes it the shape for few things said properly."}]}]}]},{"type":"item","attrs":{"icon":"target","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The third proposition"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A paragraph, because this shape has room for one and the grid does not. Two or three sentences sit comfortably here, which is what makes it the shape for few things said properly."}]}]}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line drawing the three together, or naming what follows from them."}]}]}},{"id":"two-sides","name":"Two sides","group":"Sets","whenToUse":"Two positions of equal weight, each needing its own heading and its own list — before and after, ours and theirs, one option against another. If each side is only a title and a sentence, a box grid at two holds more and reads better, so use Lead and set instead.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Side by side"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Two ways of doing this"}]},{"type":"layout","attrs":{"layout":"two-cols","v":1},"content":[{"type":"layoutRegion","attrs":{"region":"col-1"},"content":[{"type":"heading","attrs":{"textAlign":null,"level":3,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The first way"}]},{"type":"bulletList","attrs":{"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it gets you, said in enough words to be worth reading"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it costs, and who pays that cost"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it rules out later"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it needs before it can start"}]}]}]}]},{"type":"layoutRegion","attrs":{"region":"col-2"},"content":[{"type":"heading","attrs":{"textAlign":null,"level":3,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The other way"}]},{"type":"bulletList","attrs":{"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it gets you, said in enough words to be worth reading"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it costs, and who pays that cost"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it rules out later"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What it needs before it can start"}]}]}]}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying which of the two this document is arguing for, and on what grounds."}]}]}},{"id":"table-and-lead","name":"Table and lead","group":"Sets","whenToUse":"A comparison across three or four criteria, under one line saying what to look for. A table is for values you would otherwise repeat in prose. For three things with a sentence each, use Lead and set; for two things at length, use Two sides.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Compared"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"How the options differ"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying which column matters most, and what a reader should be looking for."}]},{"type":"table","attrs":{"v":1,"variant":"header-band","arrangement":null,"design":null,"iconPosition":null,"columns":null},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"textAlign":null,"colspan":1,"rowspan":1}},{"type":"tableHeader","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Option A"}]},{"type":"tableHeader","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Option B"}]},{"type":"tableHeader","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Option C"}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"First criterion"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Yes"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"No"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Partly"}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Second criterion"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Yes"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Yes"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"No"}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Third criterion"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"No"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Yes"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Yes"}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Fourth criterion"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Partly"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Yes"}]},{"type":"tableCell","attrs":{"textAlign":null,"colspan":1,"rowspan":1},"content":[{"type":"text","text":"Yes"}]}]}]}]}},{"id":"reading-in-columns","name":"Reading in columns","group":"Sets","whenToUse":"A page of PROSE in two columns, the page a report or a hand-out needs: a heading and two short paragraphs on one side, a heading and a numbered list on the other. For two positions argued against each other, use Two sides; for one sentence worth the page, use Claim and set.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"In detail"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The argument, in full"}]},{"type":"layout","attrs":{"layout":"two-cols","v":1},"content":[{"type":"layoutRegion","attrs":{"region":"col-1"},"content":[{"type":"heading","attrs":{"textAlign":null,"level":3,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What we found"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A paragraph setting out the finding: what was looked at, what it showed, and the one thing about it that was not expected. Three sentences is the right length for a column."}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"A second paragraph saying what follows from it, and what it does not settle — the question the numbered list beside it answers."}]}]},{"type":"layoutRegion","attrs":{"region":"col-2"},"content":[{"type":"heading","attrs":{"textAlign":null,"level":3,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What we did about it"}]},{"type":"orderedList","attrs":{"start":1,"type":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The first thing, in the order it was done"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The second, and what it depended on"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The third, which is where the finding changed shape"}]}]},{"type":"listItem","content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"The last, and what it left open"}]}]}]}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what the finding and the response add up to, and what the next page does with it."}]}]}},{"id":"lead-and-sequence","name":"Lead and sequence","group":"Sequences","whenToUse":"Three to five stages in ORDER, each a title and a line, under one sentence framing them. The shape is the block's and it CLAIMS something — a staircase progresses, a funnel narrows, a pyramid rests on what is under it — so change it if another is truer. For dated events, use Timeline and notes.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"How it works"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Four stages, in order"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying where the sequence starts, where it ends, and what moves it along."}]},{"type":"steps","attrs":{"v":1,"variant":"top-rule","arrangement":null,"design":null,"iconPosition":null,"mark":null,"figure":null,"width":null,"place":null},"content":[{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"First"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What happens at this stage, what it needs before it can start, and what it hands on."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Second"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What happens at this stage, what it needs before it can start, and what it hands on."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Third"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What happens at this stage, what it needs before it can start, and what it hands on."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Fourth"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What happens at this stage, what it needs before it can start, and what it hands on."}]}]}]}]}]}},{"id":"timeline-and-notes","name":"Timeline and notes","group":"Sequences","whenToUse":"Four to eight DATED events running down the page — a date, a title and a line each — with a closing note beneath. Reach for this when WHEN matters; when only the order does, use Lead and sequence. The events run top to bottom, so it fills a page on its own.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Roadmap"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Where this goes next"}]},{"type":"timeline","attrs":{"v":1,"variant":"marked","arrangement":null,"design":null,"iconPosition":null,"mark":null},"content":[{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemMeta","attrs":{"textAlign":null},"content":[{"type":"text","text":"Shipped"}]},{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The thing that is done"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"One line of detail."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemMeta","attrs":{"textAlign":null},"content":[{"type":"text","text":"Shipped"}]},{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The second thing done"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"One line of detail."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemMeta","attrs":{"textAlign":null},"content":[{"type":"text","text":"Now"}]},{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The thing in progress"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"One line of detail."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemMeta","attrs":{"textAlign":null},"content":[{"type":"text","text":"Next"}]},{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The thing after that"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"One line of detail."}]}]}]},{"type":"item","attrs":{"icon":null,"emphasis":null},"content":[{"type":"itemMeta","attrs":{"textAlign":null},"content":[{"type":"text","text":"Later"}]},{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The thing after that"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"One line of detail."}]}]}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what the dates depend on, or what would move them."}]}]}},{"id":"figures-and-reading","name":"Figures and reading","group":"Figures","whenToUse":"Three or four numbers with a paragraph saying what they mean TOGETHER. If the numbers speak for themselves, use Claim beside figures; if they are one series over time, use Chart and takeaway.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Traction"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The numbers, and what they mean"}]},{"type":"statRow","attrs":{"v":1,"variant":"banded","arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"First metric"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"000"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it counts."}]}]},{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"Second metric"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"00%"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it counts."}]}]},{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"Third metric"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"0.0M"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it counts."}]}]},{"type":"stat","content":[{"type":"statLabel","attrs":{"textAlign":null},"content":[{"type":"text","text":"Fourth metric"}]},{"type":"statValue","attrs":{"textAlign":null},"content":[{"type":"text","text":"00"}]},{"type":"statNote","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it counts."}]}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"md","design":null,"iconPosition":null},"content":[{"type":"text","text":"A paragraph reading the four numbers as one picture: which of them moved, which did not, and what the combination says that no single one of them does. Two or three sentences is the right length — enough to draw the numbers together, short enough that a reader looks back up at them."}]}]}},{"id":"chart-and-takeaway","name":"Chart and takeaway","group":"Figures","whenToUse":"One chart with the sentence a reader should leave with. ALWAYS write the takeaway — a chart without one asks the reader to find the point themselves. For three or four standalone numbers, use Figures and reading; for what connects to what, use Diagram and legend.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"The trend"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What the numbers did"}]},{"type":"chart","attrs":{"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null,"width":null,"place":null,"stack":null,"categories":["Q1","Q2","Q3","Q4"],"series":[{"name":"Revenue","values":[3200,4100,5400,8500]}]},"content":[{"type":"chartTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Revenue by quarter"}]},{"type":"chartAxisY","attrs":{"textAlign":null},"content":[{"type":"text","text":"Revenue"}]},{"type":"chartAxisX","attrs":{"textAlign":null},"content":[{"type":"text","text":"Quarter"}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"One sentence naming what the chart shows and what follows from it."}]}]}},{"id":"diagram-and-legend","name":"Diagram and legend","group":"Figures","whenToUse":"A diagram whose parts need naming underneath — a flow, an architecture, a state machine. The payload is mermaid text and the layout engine places every box. For a handful of steps with real prose in them, Lead and sequence reads better on a slide than a flowchart of the same three boxes.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"How it fits together"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What connects to what"}]},{"type":"diagram","attrs":{"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null,"width":null,"place":null,"source":"flowchart LR\n A[Draft] --> B{Review}\n B -->|approved| C[Publish]\n B -->|changes| A","zoom":null}},{"type":"box","attrs":{"v":1,"variant":"side-rule","arrangement":"list","design":null,"iconPosition":null},"content":[{"type":"item","attrs":{"icon":"clipboard","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Draft"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What this box in the picture stands for, and who does it."}]}]}]},{"type":"item","attrs":{"icon":"eye","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Review"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What this box in the picture stands for, and who does it."}]}]}]},{"type":"item","attrs":{"icon":"rocket","emphasis":null},"content":[{"type":"itemTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Publish"}]},{"type":"itemBody","attrs":{"textAlign":null},"content":[{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"What this box in the picture stands for, and who does it."}]}]}]}]}]}},{"id":"code-and-reading","name":"Code and reading","group":"Figures","whenToUse":"A block of CODE with a short paragraph under it saying what to look at — a query, a config, a call. Six to ten lines is what a page holds with the reading; nothing colours it, so the words under it are what carry the point. For a word of code inside a sentence, use the inline mark in any text block; for what connects to what, use Diagram and legend.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"In code"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What it looks like in practice"}]},{"type":"codeBlock","attrs":{"language":"sql","v":1,"variant":null,"arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"text","text":"select account, sum(amount) as total\nfrom payments\nwhere paid_at >= date '2026-01-01'\n and status = 'settled'\ngroup by account\nhaving sum(amount) > 10000\norder by total desc\nlimit 20;"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"md","design":null,"iconPosition":null},"content":[{"type":"text","text":"Two or three sentences saying what the code does, which line carries the idea, and what a reader should try changing first. The code is the picture; this is its caption."}]}]}},{"id":"picture-band-and-captions","name":"Picture band and captions","group":"Pictures & people","whenToUse":"Three or four pictures shown as a SET, under one line saying what they have in common. Pictures arrive with no address and render an \"Add picture\" frame, which is the affordance that fixes them. For ONE picture with words beside it, use Picture and words.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"A set"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"Four pictures"}]},{"type":"imageGrid","attrs":{"v":1,"variant":"raised-card","arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"mediaItem","attrs":{"src":null,"alt":"The first","focusX":null,"focusY":null,"zoom":null}},{"type":"mediaItem","attrs":{"src":null,"alt":"The second","focusX":null,"focusY":null,"zoom":null}},{"type":"mediaItem","attrs":{"src":null,"alt":"The third","focusX":null,"focusY":null,"zoom":null}},{"type":"mediaItem","attrs":{"src":null,"alt":"The fourth","focusX":null,"focusY":null,"zoom":null}}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what the four have in common, or what order to read them in."}]}]}},{"id":"people-and-roles","name":"People and roles","group":"Pictures & people","whenToUse":"Three to six people, each a portrait, a name, a role and a line, under one sentence framing the group. For ONE person quoted rather than introduced, use Quote and source.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Who we are"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The people behind it"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"lg","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what the group has in common and why these four are on this page."}]},{"type":"people","attrs":{"v":1,"variant":"soft-fill","arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"mediaItem","attrs":{"src":null,"alt":null,"focusX":null,"focusY":null,"zoom":null},"content":[{"type":"mediaCaption","attrs":{"textAlign":null},"content":[{"type":"text","text":"One line about them."}]},{"type":"mediaTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"A name"}]},{"type":"mediaBody","attrs":{"textAlign":null},"content":[{"type":"text","text":"Their role"}]}]},{"type":"mediaItem","attrs":{"src":null,"alt":null,"focusX":null,"focusY":null,"zoom":null},"content":[{"type":"mediaCaption","attrs":{"textAlign":null},"content":[{"type":"text","text":"One line about them."}]},{"type":"mediaTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"A name"}]},{"type":"mediaBody","attrs":{"textAlign":null},"content":[{"type":"text","text":"Their role"}]}]},{"type":"mediaItem","attrs":{"src":null,"alt":null,"focusX":null,"focusY":null,"zoom":null},"content":[{"type":"mediaCaption","attrs":{"textAlign":null},"content":[{"type":"text","text":"One line about them."}]},{"type":"mediaTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"A name"}]},{"type":"mediaBody","attrs":{"textAlign":null},"content":[{"type":"text","text":"Their role"}]}]},{"type":"mediaItem","attrs":{"src":null,"alt":null,"focusX":null,"focusY":null,"zoom":null},"content":[{"type":"mediaCaption","attrs":{"textAlign":null},"content":[{"type":"text","text":"One line about them."}]},{"type":"mediaTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"A name"}]},{"type":"mediaBody","attrs":{"textAlign":null},"content":[{"type":"text","text":"Their role"}]}]}]}]}},{"id":"picture-and-words","name":"Picture and words","group":"Pictures & people","whenToUse":"ONE picture with two or three sentences beside it — a screenshot and what to look at, a photograph and what it shows. For several pictures as a set, use Picture band and captions; for a picture that should fill one side of the whole page, use Title pane.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"A closer look"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The picture, and the words about it"}]},{"type":"imageText","attrs":{"v":1,"variant":"outlined","arrangement":null,"design":null,"iconPosition":null},"content":[{"type":"mediaItem","attrs":{"src":null,"alt":"A picture","focusX":null,"focusY":null,"zoom":null},"content":[{"type":"mediaTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"What this shows"}]},{"type":"mediaBody","attrs":{"textAlign":null},"content":[{"type":"text","text":"Two or three sentences beside the picture, saying what it is, what to look at first, and why it is here rather than on a page of its own."}]}]}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line naming what a reader should take from it."}]}]}},{"id":"picture-and-line","name":"Picture and line","group":"Pictures & people","whenToUse":"ONE picture that IS the page, with a line above saying why it is here and a caption under it saying what to look at. The picture arrives with no address and renders an \"Add picture\" frame. For a picture with real sentences beside it, use Picture and words; for a picture that should sit behind a title, use Cover.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"A closer look"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"The picture that makes the point"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what the picture shows and what to look for in it."}]},{"type":"imageBlock","attrs":{"v":1,"variant":"raised-card","arrangement":null,"design":null,"iconPosition":null,"width":80,"place":"centre"},"content":[{"type":"mediaItem","attrs":{"src":null,"alt":"A picture","focusX":null,"focusY":null,"zoom":null},"content":[{"type":"mediaCaption","attrs":{"textAlign":null},"content":[{"type":"text","text":"Where it was taken, and when."}]}]}]}]}},{"id":"video-and-framing","name":"Video and framing","group":"Pictures & people","whenToUse":"One video, with a line above saying what it shows and why to watch it. A video keeps its 16:9 shape, so it takes most of a page and nothing else fits beside it. For a still picture with words, use Picture and words.","kind":"page","version":1,"content":{"type":"page","attrs":{"mode":null,"accent":null,"surface":null,"notes":null,"footer":null,"furniture":null},"content":[{"type":"pageEyebrow","attrs":{"textAlign":null},"content":[{"type":"text","text":"Watch"}]},{"type":"pageTitle","attrs":{"textAlign":null},"content":[{"type":"text","text":"See it working"}]},{"type":"paragraph","attrs":{"textAlign":null,"v":1,"variant":null,"arrangement":"sm","design":null,"iconPosition":null},"content":[{"type":"text","text":"One line saying what the video shows and what to watch for."}]},{"type":"videoBlock","attrs":{"v":1,"variant":"raised-card","arrangement":null,"design":null,"iconPosition":null,"width":null,"place":null},"content":[{"type":"mediaItem","attrs":{"src":null,"alt":"A video","focusX":null,"focusY":null,"zoom":null}}]}]}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ID_TYPES as r,mintId as i}from"../id.js";import c from"./catalogue.json"with{type:"json"};const f=["Openers & closers","One claim","Sets","Sequences","Figures","Pictures & people"],p=new Set(r);function n(e){const t={...e};if(t.attrs&&"id"in t.attrs){const{id:d,...s}=t.attrs;t.attrs=s}return t.content&&(t.content=t.content.map(n)),t}function o(e){const t={...e};return t.type&&p.has(t.type)&&(t.attrs={...t.attrs,id:i(t.type)}),t.content&&(t.content=t.content.map(o)),t}const E=e=>o(n(e)),a=c,I=e=>a.find(t=>t.id===e);export{a as TEMPLATES,f as TEMPLATE_SHELVES,E as instantiate,o as stampIds,n as stripIds,I as templateById};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DEFAULT_VARIANT as u}from"../theme/emit.js";import{byNode as f}from"../blocks.js";const p=new Set(["item","stat","mediaItem"]);function m(e){const o=f(e.type??"")?.type;if(!o)return null;const t=e.attrs??{},n=[o],s=t.figure??t.arrangement;s&&n.push(String(s)),t.variant&&t.variant!==u&&n.push(String(t.variant));const r=(e.content??[]).filter(c=>p.has(c.type??""));r.some(c=>c.attrs?.icon)&&n.push("icons"),t.mark&&n.push(`mark ${t.mark}`);const i=n.join("\xB7");return r.length>1?`${i} \xD7${r.length}`:i}function a(e){const o=[];for(const t of e){if(t.type==="layout"){const s=(t.content??[]).map(r=>a(r.content??[]).join(", ")||"\u2014");o.push(`${t.attrs?.layout??"layout"}[ ${s.join(" | ")} ]`);continue}const n=m(t);n&&o.push(n)}return o}function g(e){const o=e.content,t=o.attrs??{},n=[];t.accent&&n.push(`accent ${t.accent}`),t.surface&&n.push(`surface ${t.surface}`),t.mode&&n.push(String(t.mode));const s=a(o.content??[]).join(", ");return n.length?`${n.join(", ")} \xB7 ${s}`:s}export{g as describeLook};
|
package/dist/text.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{Extension as b,Node as B,isMacOS as M,isiOS as A,mergeAttributes as w}from"@tiptap/core";import{Fragment as C,Slice as O}from"@tiptap/pm/model";import{Plugin as E,PluginKey as I}from"@tiptap/pm/state";import{parseSlot as L,serialiseSlot as P}from"./slotMarkdown.js";const $=new Set(["codeBlock"]),N=/!\[([^\]]*)\]\(([^)\s]+)\)/g,_=t=>`})`,h=t=>!t.isLeaf&&!t.inlineContent;function Y(t){return h(t.type)?D(t):t.textBetween(0,t.content.size,"",e=>e.type.name==="hardBreak"?`
|
|
2
|
+
`:e.type.name==="inlineImage"?_(e):"")}const D=t=>P(t.toJSON().content??[]).replace(R,`
|
|
3
|
+
`),R=/ {2}\n/g,x=t=>{const e=t.content??[],o=[];for(const n of e){if(n.type!=="text"||!n.text?.includes(`
|
|
4
|
+
`)){o.push(x(n));continue}n.text.split(`
|
|
5
|
+
`).forEach((r,s)=>{s&&o.push({type:"hardBreak"}),r&&o.push({...n,text:r})})}return e.length?{...t,content:o}:t};function m(t,e,o){const n=o?t.nodes[o]:void 0;if(n&&h(n))return V(t,n,e);if(!e)return[];if(o&&$.has(o))return[t.text(e)];const r=[];return e.split(`
|
|
6
|
+
`).forEach((s,c)=>{c&&r.push(t.nodes.hardBreak.create()),s&&r.push(...v(t,s))}),r}function V(t,e,o){const n=()=>t.nodes.paragraph.create();if(!o)return[n()];const r=[];for(const s of L(o)){const d=(s.type?t.nodes[s.type]:void 0)?t.nodeFromJSON(x(s)):null;if(d&&e.contentMatch.matchType(d.type)){r.push(d);continue}const l=d?d.textContent:g(s);r.push(l?t.nodes.paragraph.create(null,m(t,l)):n())}return r.length?r:[n()]}const g=t=>t.text??(t.content??[]).map(e=>g(e)).join("");function v(t,e){const o=t.nodes.inlineImage;if(!o||!e.includes("!["))return[t.text(e)];const n=[];let r=0;for(const s of e.matchAll(N))s.index>r&&n.push(t.text(e.slice(r,s.index))),n.push(o.create({alt:s[1]||null,src:s[2]})),r=s.index+s[0].length;return r<e.length&&n.push(t.text(e.slice(r))),n.length?n:[t.text(e)]}const z=[],F="bold italic underline strike code link textStyle highlight";function a(t,e,o,n="inline*"){return z.push(t),B.create({name:t,content:n,group:"slot",marks:F,defining:!0,selectable:!1,isolating:!0,parseHTML:()=>[{tag:`${e}[data-slot="${t}"]`}],renderHTML:({HTMLAttributes:r})=>[e,w(r,{"data-slot":t,class:o}),0]})}const G=a("itemMeta","div","i-meta"),U=a("itemTitle","h3","i-title"),q=a("itemBody","div","i-body","(paragraph | bulletList | orderedList)+"),Q=a("statLabel","div","s-label"),W=a("statValue","div","s-value"),Z=a("statNote","p","s-note"),j=a("chartTitle","div","c-title"),tt=a("chartAxisY","div","c-axis-y"),et=a("chartAxisX","div","c-axis-x"),nt=a("mediaCaption","figcaption","m-caption"),ot=a("mediaTitle","h3","m-title"),rt=a("mediaBody","p","m-body"),st=a("pageEyebrow","p","page-eyebrow"),it=a("pageTitle","h2","page-title"),at=a("pageSubtitle","p","page-subtitle"),y=t=>{const e=[];return t.doc.descendants((o,n)=>o.isTextblock?(e.push({from:n+1,to:n+1+o.content.size}),!1):!0),e},S=(t,e)=>{let o=-1;for(let n=0;n<t.length;n+=1)t[n].from<=e&&(o=n);return o},k=t=>{for(let e=t.depth;e>0;e--){const o=t.node(e).type.name;if(o==="listItem"||o==="taskItem"||o==="tableCell"||o==="tableHeader")return!0}return!1};function T(t,e){const{state:o}=t,{$from:n}=o.selection;if(k(n))return!1;const r=y(o),s=r[S(r,n.pos)+(e?-1:1)];return s===void 0?!0:t.chain().setTextSelection(s.from).scrollIntoView().run()}function u(t,e){const{state:o}=t,{$from:n,empty:r}=o.selection;if(!r||k(n))return!1;let s=-1;for(let l=n.depth;l>0;l--)if(n.node(l).type.spec.group==="slot"){s=l;break}if(s<0)return!1;for(let l=n.depth;l>s;l--){const i=n.index(l-1),p=n.node(l-1).childCount-1;if(e?i!==0:i!==p)return!1}if(e?n.parentOffset!==0:n.parentOffset!==n.parent.content.size)return!1;const c=y(o),d=c[S(c,n.pos)+(e?-1:1)];return d===void 0?!0:t.chain().setTextSelection(e?d.to:d.from).scrollIntoView().run()}const lt=b.create({name:"slotEditing",addKeyboardShortcuts(){return{"Mod-a":()=>{const{state:t}=this.editor,{$from:e,from:o,to:n}=t.selection;let r=null,s=null;for(let i=e.depth;i>0;i--){const p=e.node(i);!r&&(p.type.spec.group==="slot"||p.isTextblock)&&(r=[e.start(i),e.end(i)]);const f=e.node(i-1).type.name;!s&&(f==="page"||f==="layoutRegion")&&(s=[e.start(i),e.end(i)])}if(!r)return!1;const c=i=>!!i&&o===i[0]&&n===i[1];if(c(s)||c(r)&&(!s||s[0]===r[0]&&s[1]===r[1]))return!1;const[d,l]=c(r)?s:r;return this.editor.commands.setTextSelection({from:d,to:l})},Tab:()=>T(this.editor,!1),"Shift-Tab":()=>T(this.editor,!0),Backspace:()=>u(this.editor,!0),"Mod-Backspace":()=>u(this.editor,!0),"Shift-Backspace":()=>u(this.editor,!0),Delete:()=>u(this.editor,!1),"Mod-Delete":()=>u(this.editor,!1),...M()||A()?{"Ctrl-h":()=>u(this.editor,!0),"Alt-Backspace":()=>u(this.editor,!0),"Ctrl-Alt-Backspace":()=>u(this.editor,!1),"Ctrl-d":()=>u(this.editor,!1),"Alt-Delete":()=>u(this.editor,!1),"Alt-d":()=>u(this.editor,!1)}:{},Enter:()=>{const{selection:t,storedMarks:e}=this.editor.state,{$from:o,$to:n}=t;if(o.parent.type.spec.group!=="slot")return!1;const r=e??(n.parentOffset?o.marks():null);return this.editor.chain().insertContent({type:"hardBreak"}).command(({tr:s,dispatch:c})=>(c&&r?.length&&s.ensureMarks(r),!0)).scrollIntoView().run()}}},addProseMirrorPlugins(){return[new E({key:new I("slotPaste"),props:{handlePaste(t,e,o){const{$from:n}=t.state.selection;if(n.parent.type.spec.group!=="slot")return!1;const r=o.content.textBetween(0,o.content.size,`
|
|
7
|
+
`,c=>c.type.name==="hardBreak"?`
|
|
8
|
+
`:"");if(!r)return!1;const s=m(t.state.schema,r);return t.dispatch(t.state.tr.replaceSelection(new O(C.from(s),0,0)).scrollIntoView()),!0}}})]}});export{et as ChartAxisX,tt as ChartAxisY,j as ChartTitle,q as ItemBody,G as ItemMeta,U as ItemTitle,$ as LITERAL_TEXT_NODES,rt as MediaBody,nt as MediaCaption,ot as MediaTitle,st as PageEyebrow,at as PageSubtitle,it as PageTitle,F as SLOT_MARKS,z as SLOT_NODES,lt as SlotEditing,Q as StatLabel,Z as StatNote,W as StatValue,m as slotContent,Y as slotText};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"atelier","name":"Atelier","dictionary":7,"fonts":["dm-mono","fraunces","manrope"],"tokens":{"font-sans":"'Manrope', ui-sans-serif, system-ui, sans-serif","font-mono":"'DM Mono', ui-monospace, monospace","font-display":"'Fraunces', ui-serif, Georgia, serif","weight-display":500,"track-tight":0.7,"text-base":16,"display-scale":1.2,"display-case":"none","bullet-glyph":"'\\2013'","check-corner":999,"frame-pad-x":84,"frame-pad-t":68,"frame-pad-b":72,"corner-sm":0,"corner-md":2,"corner-lg":20,"border-sm":1,"border-md":2,"border-lg":4,"title-rule-weight":2,"title-rule-length":0.07},"variants":{"plain":{"divider":"rule","border-weight":"border-sm","title-rule":"accent","footer":"accent"},"plain:stat-row":{"row-rule":"rule"},"accent-bar":{"border-lead":"accent","border-weight":"border-lg"},"soft-fill":{"fill":"bg-subtle"},"outlined":{"border-top":"rule-strong","border-lead":"rule-strong","border-trail":"rule-strong","border-bottom":"rule-strong","border-weight":"border-sm"},"top-rule":{"border-top":"accent","border-weight":"border-md"},"side-rule":{"fill":"bg-subtle","border-top":"rule","border-trail":"rule","border-bottom":"rule","border-lead":"accent","border-weight":"border-md"},"raised-card":{"fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md","elevation":"shadow-box"},"gradient-card":{"fill":"bg-muted","corner":"corner-md","elevation":"shadow-box"},"solid-accent":{"fill":"accent","on-fill":"bg"},"leaf-corner":{"fill":"bg-subtle","corner":"corner-lg"},"banded":{"band-fill":"bg-subtle","divider":"rule"},"header-band":{"head-fill":"bg-muted","divider":"rule"},"accent-header":{"head-fill":"accent","on-head-fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md"},"marked":{"marker":"bg","marker-fill":"accent","divider":"rule"}},"palettes":{"light":{"bg":"#f8f4ec","bg-subtle":"oklch(0.936 0.016 83)","bg-muted":"oklch(0.903 0.024 80)","fg":"#241d15","fg-muted":"#6e6152","fg-faint":"#96784e","rule":"#e3d7c7","rule-strong":"#c3ad92","accent":"#8e6536","bg-accent":"#36281d","on-bg-accent":"#f8f4ec","accent-fill":"radial-gradient(120% 80% at 30% 0%, color-mix(in oklab, var(--on-bg-accent) 12%, transparent), transparent 68%), repeating-linear-gradient(90deg, color-mix(in oklab, var(--accent) 26%, transparent) 0 calc(1px * var(--s)), transparent calc(1px * var(--s)) calc(6px * var(--s))), repeating-linear-gradient(0deg, color-mix(in oklab, var(--on-bg-accent) 5%, transparent) 0 calc(1px * var(--s)), transparent calc(1px * var(--s)) calc(19px * var(--s))), var(--bg-accent)","shadow":"0 1px 2px rgba(36, 29, 21, 0.05), 0 14px 36px -10px rgba(36, 29, 21, 0.13)","shadow-box":"0 1px 2px oklch(0.24 0.02 70 / 0.05), 0 8px 22px -9px oklch(0.24 0.02 70 / 0.14)","c-grey":"#67635c","c-red":"#aa3527","c-orange":"#944e12","c-yellow":"#7d5e07","c-green":"#466f41","c-teal":"#17726d","c-blue":"#37649e","c-purple":"#765092","c-pink":"#9a3e67","chart-series-1":"oklch(0.539 0.082 68)","chart-series-2":"oklch(0.398 0.060 345)","chart-series-3":"oklch(0.638 0.046 168)","chart-series-4":"oklch(0.492 0.068 38)","chart-series-5":"oklch(0.782 0.038 92)","chart-series-6":"oklch(0.432 0.010 62)"},"dark":{"bg":"#17120d","bg-subtle":"#251f1a","bg-muted":"#352d26","fg":"#e9e3d8","fg-muted":"#a79d91","fg-faint":"#9d805c","rule":"#362d25","rule-strong":"#665541","accent":"#c59d62","bg-accent":"#503e30","on-bg-accent":"#ede7dc","accent-fill":"radial-gradient(120% 80% at 30% 0%, color-mix(in oklab, var(--on-bg-accent) 12%, transparent), transparent 68%), repeating-linear-gradient(90deg, color-mix(in oklab, var(--accent) 26%, transparent) 0 calc(1px * var(--s)), transparent calc(1px * var(--s)) calc(6px * var(--s))), repeating-linear-gradient(0deg, color-mix(in oklab, var(--on-bg-accent) 5%, transparent) 0 calc(1px * var(--s)), transparent calc(1px * var(--s)) calc(19px * var(--s))), var(--bg-accent)","shadow":"0 1px 2px rgba(0, 0, 0, 0.5), 0 14px 36px -10px rgba(0, 0, 0, 0.65)","shadow-box":"0 1px 2px oklch(0 0 0 / 0.55), 0 9px 24px -9px oklch(0 0 0 / 0.7)","c-grey":"#bbb7af","c-red":"#f89b8b","c-orange":"#eea471","c-yellow":"#d5b36a","c-green":"#97c691","c-teal":"#72c9c3","c-blue":"#90baf1","c-purple":"#caa7e5","c-pink":"#ed9bbb","chart-series-1":"oklch(0.680 0.078 68)","chart-series-2":"oklch(0.560 0.058 345)","chart-series-3":"oklch(0.740 0.042 168)","chart-series-4":"oklch(0.640 0.064 38)","chart-series-5":"oklch(0.858 0.034 92)","chart-series-6":"oklch(0.605 0.010 62)"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"aurora","name":"Aurora","dictionary":7,"fonts":["dm-mono","inter","sora"],"tokens":{"font-sans":"'Inter', ui-sans-serif, system-ui, sans-serif","font-mono":"'DM Mono', ui-monospace, monospace","font-display":"'Sora', ui-sans-serif, system-ui, sans-serif","weight-display":700,"track-tight":1.3,"text-base":16,"display-scale":1.1,"display-case":"none","bullet-glyph":"'\\2023'","check-corner":6,"frame-pad-x":64,"frame-pad-t":52,"frame-pad-b":60,"corner-sm":4,"corner-md":10,"corner-lg":18,"border-sm":1,"border-md":2,"border-lg":3,"title-rule-weight":4,"title-rule-length":0.14},"variants":{"plain":{"divider":"rule","divider-col":"rule","border-weight":"border-sm","title-rule":"accent","footer":"fg-muted"},"plain:stat-row":{"row-rule":"accent"},"accent-bar":{"border-lead":"accent","border-weight":"border-lg"},"soft-fill":{"fill":"bg-subtle","corner":"corner-md"},"outlined":{"border-top":"rule-strong","border-lead":"rule-strong","border-trail":"rule-strong","border-bottom":"rule-strong","border-weight":"border-sm","corner":"corner-md"},"top-rule":{"border-top":"accent","border-weight":"border-md"},"side-rule":{"fill":"bg-subtle","border-top":"rule","border-trail":"rule","border-bottom":"rule","border-lead":"accent","border-weight":"border-md","corner":"corner-md"},"raised-card":{"fill":"bg-subtle","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md","elevation":"shadow-box"},"gradient-card":{"fill":"bg-muted","corner":"corner-md","elevation":"shadow-box"},"solid-accent":{"fill":"accent","on-fill":"bg","corner":"corner-md"},"leaf-corner":{"fill":"bg-subtle","corner":"corner-lg"},"banded":{"band-fill":"bg-subtle","divider":"rule"},"header-band":{"head-fill":"bg-muted","divider":"rule","divider-col":"rule"},"accent-header":{"head-fill":"accent","on-head-fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md"},"marked":{"marker":"bg","marker-fill":"accent","divider":"rule"}},"palettes":{"light":{"bg":"#f6f6fd","bg-subtle":"oklch(0.943 0.015 282)","bg-muted":"linear-gradient(152deg, oklch(0.910 0.026 286), oklch(0.935 0.013 267) 70%)","fg":"#1c1d2e","fg-muted":"#606378","fg-faint":"#85879b","rule":"#dcdde9","rule-strong":"#b6b9cd","accent":"#4a3d9d","bg-accent":"linear-gradient(146deg, #39226f, #003443)","on-bg-accent":"#ebebfb","accent-fill":"radial-gradient(120% 130% at 2% 0%, var(--accent), transparent 54%), radial-gradient(118% 128% at 100% 2%, color-mix(in oklab, var(--chart-series-3) 92%, transparent), transparent 52%), radial-gradient(150% 140% at 86% 106%, color-mix(in oklab, var(--chart-series-4) 82%, transparent), transparent 58%), radial-gradient(130% 130% at 10% 100%, color-mix(in oklab, var(--chart-series-2) 72%, transparent), transparent 56%), var(--bg-accent)","shadow":"0 1px 2px oklch(0.24 0.03 282 / 0.07), 0 14px 36px -10px oklch(0.24 0.03 282 / 0.18)","shadow-box":"0 1px 2px oklch(0.24 0.03 282 / 0.06), 0 10px 26px -9px oklch(0.43 0.15 284 / 0.26)","c-grey":"#606378","c-red":"#b12b35","c-orange":"#a55a0d","c-yellow":"#8a6b0c","c-green":"#2d7b44","c-teal":"#25767a","c-blue":"#365db8","c-purple":"#6940b0","c-pink":"#a73077","chart-series-1":"oklch(0.430 0.150 284)","chart-series-2":"oklch(0.498 0.110 246)","chart-series-3":"oklch(0.566 0.092 210)","chart-series-4":"oklch(0.634 0.104 176)","chart-series-5":"oklch(0.702 0.140 138)","chart-series-6":"oklch(0.770 0.155 118)"},"dark":{"bg":"#0c0e1a","bg-subtle":"#1b1d2b","bg-muted":"linear-gradient(152deg, oklch(0.317 0.048 288), oklch(0.252 0.030 265) 70%)","fg":"#eceef6","fg-muted":"#9aa0b8","fg-faint":"#5f647e","rule":"#232741","rule-strong":"#3a3d5c","accent":"#7c6cf6","bg-accent":"linear-gradient(146deg, #4b3586, #004655)","on-bg-accent":"#ebebfb","accent-fill":"radial-gradient(120% 130% at 2% 0%, var(--accent), transparent 54%), radial-gradient(118% 128% at 100% 2%, color-mix(in oklab, var(--chart-series-3) 92%, transparent), transparent 52%), radial-gradient(150% 140% at 86% 106%, color-mix(in oklab, var(--chart-series-4) 82%, transparent), transparent 58%), radial-gradient(130% 130% at 10% 100%, color-mix(in oklab, var(--chart-series-2) 72%, transparent), transparent 56%), var(--bg-accent)","shadow":"0 1px 2px oklch(0 0 0 / 0.52), 0 16px 40px -10px oklch(0 0 0 / 0.7)","shadow-box":"0 1px 2px oklch(0 0 0 / 0.55), 0 12px 30px -10px oklch(0.618 0.199 284 / 0.4)","c-grey":"#9aa0b8","c-red":"#f98e8b","c-orange":"#fba35d","c-yellow":"#e7c869","c-green":"#74db93","c-teal":"#5cd9da","c-blue":"#8db0f9","c-purple":"#b39df9","c-pink":"#f187c0","chart-series-1":"oklch(0.618 0.199 284)","chart-series-2":"oklch(0.670 0.135 246)","chart-series-3":"oklch(0.722 0.100 210)","chart-series-4":"oklch(0.774 0.112 176)","chart-series-5":"oklch(0.826 0.155 138)","chart-series-6":"oklch(0.878 0.175 118)"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"boardroom","name":"Boardroom","dictionary":7,"fonts":["ibm-plex-sans","ibm-plex-mono"],"tokens":{"font-sans":"'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif","font-mono":"'IBM Plex Mono', ui-monospace, monospace","font-display":"'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif","weight-display":600,"track-tight":0.4,"text-base":17,"display-scale":1,"display-case":"none","bullet-glyph":"'\\25AA'","check-corner":2,"frame-pad-x":84,"frame-pad-t":58,"frame-pad-b":62,"corner-sm":0,"corner-md":2,"corner-lg":6,"border-sm":1,"border-md":2,"border-lg":4,"title-rule-weight":4,"title-rule-length":0.06},"variants":{"plain":{"divider":"rule","divider-col":"rule","border-weight":"border-sm","title-rule":"accent","footer":"fg-muted"},"plain:stat-row":{"row-rule":"rule-strong","row-mark":"accent"},"plain:table":{"table-mark":"accent"},"accent-bar":{"border-lead":"accent","border-weight":"border-lg"},"soft-fill":{"fill":"bg-subtle"},"outlined":{"border-top":"rule-strong","border-lead":"rule-strong","border-trail":"rule-strong","border-bottom":"rule-strong","border-weight":"border-sm"},"top-rule":{"border-top":"rule-strong","border-weight":"border-lg"},"side-rule":{"fill":"bg-subtle","border-top":"rule","border-trail":"rule","border-bottom":"rule","border-lead":"accent","border-weight":"border-md"},"raised-card":{"fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md","elevation":"shadow-box"},"gradient-card":{"fill":"bg-muted","corner":"corner-md","elevation":"shadow-box"},"solid-accent":{"fill":"accent","on-fill":"bg"},"leaf-corner":{"fill":"bg-subtle","corner":"corner-lg"},"banded":{"band-fill":"bg-subtle","divider":"rule","divider-col":"rule"},"header-band":{"head-fill":"bg-muted","divider":"rule","divider-col":"rule"},"accent-header":{"head-fill":"accent","on-head-fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md"},"marked":{"marker":"bg","marker-fill":"accent","divider":"rule"}},"palettes":{"light":{"bg":"#f7f8fa","bg-subtle":"oklch(0.947 0.006 255)","bg-muted":"linear-gradient(150deg, oklch(0.914 0.018 252), oklch(0.939 0.006 256) 68%)","fg":"#16243d","fg-muted":"#51617c","fg-faint":"#838fa4","rule":"#d5dae2","rule-strong":"#9aa6b6","accent":"#8a6d33","bg-accent":"#1f3a63","on-bg-accent":"#f7f8fa","accent-fill":"linear-gradient(180deg, var(--bg-accent) 0 18%, transparent 56%), repeating-linear-gradient(90deg, color-mix(in oklab, var(--on-bg-accent) 15%, transparent) 0 1px, transparent 1px calc(46px * var(--s))), linear-gradient(165deg, var(--bg-accent), color-mix(in oklab, var(--bg-accent) 88%, var(--on-bg-accent)))","shadow":"0 1px 2px rgba(22, 36, 61, 0.06), 0 12px 32px -8px rgba(22, 36, 61, 0.15)","shadow-box":"0 1px 2px oklch(0.26 0.05 261 / 0.07), 0 7px 18px -7px oklch(0.26 0.05 261 / 0.16)","c-grey":"#5c6675","c-red":"#b3352f","c-orange":"#a95a1c","c-yellow":"#8a681c","c-green":"#2b6b4a","c-teal":"#1d6b6b","c-blue":"#2b5f9e","c-purple":"#5a4a8c","c-pink":"#8f3357","chart-series-1":"oklch(0.395 0.088 258)","chart-series-2":"oklch(0.665 0.105 78)","chart-series-3":"oklch(0.585 0.062 245)","chart-series-4":"oklch(0.455 0.078 355)","chart-series-5":"oklch(0.565 0.048 155)","chart-series-6":"oklch(0.615 0.016 250)"},"dark":{"bg":"#0f1723","bg-subtle":"oklch(0.250 0.017 252)","bg-muted":"linear-gradient(150deg, oklch(0.300 0.030 254), oklch(0.258 0.018 252) 68%)","fg":"#e6ebf2","fg-muted":"#a7b3c4","fg-faint":"#6d7b8f","rule":"#2b3646","rule-strong":"#5b6a80","accent":"#d3ab5c","bg-accent":"#24436f","on-bg-accent":"#eef3f9","accent-fill":"linear-gradient(180deg, var(--bg-accent) 0 18%, transparent 56%), repeating-linear-gradient(90deg, color-mix(in oklab, var(--on-bg-accent) 15%, transparent) 0 1px, transparent 1px calc(46px * var(--s))), linear-gradient(165deg, var(--bg-accent), color-mix(in oklab, var(--bg-accent) 88%, var(--on-bg-accent)))","shadow":"0 1px 2px rgba(0, 0, 0, 0.45), 0 12px 32px -8px rgba(0, 0, 0, 0.6)","shadow-box":"0 1px 2px oklch(0 0 0 / 0.5), 0 8px 20px -7px oklch(0 0 0 / 0.68)","c-grey":"#a9b3c1","c-red":"#ff9b93","c-orange":"#f0a35f","c-yellow":"#dcb54c","c-green":"#6fca9a","c-teal":"#4fc9c0","c-blue":"#8bb8f0","c-purple":"#b3a3ee","c-pink":"#ef92b4","chart-series-1":"oklch(0.655 0.095 258)","chart-series-2":"oklch(0.775 0.105 78)","chart-series-3":"oklch(0.715 0.058 245)","chart-series-4":"oklch(0.655 0.082 355)","chart-series-5":"oklch(0.695 0.050 155)","chart-series-6":"oklch(0.735 0.016 250)"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"decaframe","name":"Deca","dictionary":7,"fonts":["geist","geist-mono"],"tokens":{"font-sans":"'Geist', ui-sans-serif, system-ui, sans-serif","font-mono":"'Geist Mono', ui-monospace, monospace","font-display":"'Geist', ui-sans-serif, system-ui, sans-serif","weight-display":700,"track-tight":1.15,"text-base":16,"display-scale":1.15,"display-case":"none","bullet-glyph":"'\\2014'","check-corner":2,"frame-pad-x":68,"frame-pad-t":50,"frame-pad-b":54,"corner-sm":2,"corner-md":4,"corner-lg":10,"border-sm":1,"border-md":2,"border-lg":3,"title-rule-weight":3,"title-rule-length":1},"variants":{"plain":{"divider":"rule","border-weight":"border-sm","divider-col":"rule","title-rule":"accent","footer":"fg-muted"},"accent-bar":{"border-lead":"accent","border-weight":"border-md"},"soft-fill":{"fill":"bg-subtle"},"outlined":{"border-top":"rule-strong","border-lead":"rule-strong","border-trail":"rule-strong","border-bottom":"rule-strong","border-weight":"border-sm"},"top-rule":{"border-top":"accent","border-weight":"border-md"},"side-rule":{"fill":"bg-subtle","border-top":"rule","border-trail":"rule","border-bottom":"rule","border-lead":"accent","border-weight":"border-md"},"raised-card":{"fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md","elevation":"shadow-box"},"gradient-card":{"fill":"bg-muted","corner":"corner-md","elevation":"shadow-box"},"solid-accent":{"fill":"accent","on-fill":"bg"},"leaf-corner":{"fill":"bg-subtle","corner":"corner-lg"},"banded":{"band-fill":"bg-subtle","divider":"rule"},"header-band":{"head-fill":"bg-muted","divider":"rule"},"accent-header":{"head-fill":"accent","on-head-fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md"},"marked":{"marker":"bg","marker-fill":"accent","divider":"rule"}},"palettes":{"light":{"bg":{"srgb":"#fcfcfd","p3":"color(display-p3 0.988 0.988 0.992)","from":"slate-1"},"bg-subtle":"oklch(0.959 0.004 264)","bg-muted":"linear-gradient(150deg, oklch(0.926 0.010 258), oklch(0.951 0.004 264) 68%)","fg":{"srgb":"#1c2024","p3":"color(display-p3 0.113 0.125 0.14)","from":"slate-12"},"fg-muted":{"srgb":"#60646c","p3":"color(display-p3 0.379 0.392 0.421)","from":"slate-11"},"fg-faint":{"srgb":"#8b8d98","p3":"color(display-p3 0.547 0.553 0.592)","from":"slate-9"},"rule":{"srgb":"#d9d9e0","p3":"color(display-p3 0.85 0.852 0.876)","from":"slate-6"},"rule-strong":{"srgb":"#b9bbc6","p3":"color(display-p3 0.727 0.733 0.773)","from":"slate-8"},"accent":{"srgb":"#000000","p3":"color(display-p3 0 0 0)"},"bg-accent":{"srgb":"#000000","p3":"color(display-p3 0 0 0)"},"on-bg-accent":{"srgb":"#fcfcfd","p3":"color(display-p3 0.988 0.988 0.992)"},"accent-fill":"radial-gradient(120% 110% at 0% 0%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 60%), radial-gradient(115% 95% at 100% 100%, transparent 0 18%, color-mix(in oklab, var(--fg) 4%, var(--bg)) 66%), repeating-linear-gradient(90deg, color-mix(in oklab, var(--fg) 16%, transparent) 0 1px, transparent 1px calc(26px * var(--s))), repeating-linear-gradient(0deg, color-mix(in oklab, var(--fg) 16%, transparent) 0 1px, transparent 1px calc(26px * var(--s))), color-mix(in oklab, var(--fg) 4%, var(--bg))","shadow":"0 1px 2px rgba(28, 32, 36, 0.05), 0 12px 32px -8px rgba(28, 32, 36, 0.13)","shadow-box":"0 1px 2px oklch(0.28 0.02 264 / 0.06), 0 7px 18px -7px oklch(0.28 0.02 264 / 0.16)","c-grey":{"srgb":"#60646c","p3":"color(display-p3 0.379 0.392 0.421)","from":"slate-11"},"c-red":{"srgb":"#ce2c31","p3":"color(display-p3 0.744 0.234 0.222)","from":"red-11"},"c-orange":{"srgb":"#cc4e00","p3":"color(display-p3 0.76 0.34 0)","from":"orange-11"},"c-yellow":{"srgb":"#ab6400","p3":"color(display-p3 0.64 0.4 0)","from":"amber-11"},"c-green":{"srgb":"#218358","p3":"color(display-p3 0.19 0.5 0.32)","from":"green-11"},"c-teal":{"srgb":"#008573","p3":"color(display-p3 0.08 0.5 0.43)","from":"teal-11"},"c-blue":{"srgb":"#0d74ce","p3":"color(display-p3 0.15 0.44 0.84)","from":"blue-11"},"c-purple":{"srgb":"#6550b9","p3":"color(display-p3 0.383 0.317 0.702)","from":"violet-11"},"c-pink":{"srgb":"#c2298a","p3":"color(display-p3 0.698 0.219 0.528)","from":"pink-11"},"chart-series-1":"oklch(0.30 0.006 264)","chart-series-2":"oklch(0.42 0.006 264)","chart-series-3":"oklch(0.54 0.006 264)","chart-series-4":"oklch(0.66 0.006 264)","chart-series-5":"oklch(0.77 0.006 264)","chart-series-6":"oklch(0.87 0.006 264)"},"dark":{"bg":{"srgb":"#18191b","p3":"color(display-p3 0.095 0.098 0.105)","from":"slate-2"},"bg-subtle":"oklch(0.260 0.006 264)","bg-muted":"linear-gradient(150deg, oklch(0.318 0.011 258), oklch(0.268 0.006 264) 68%)","fg":{"srgb":"#edeef0","p3":"color(display-p3 0.93 0.933 0.94)","from":"slate-12"},"fg-muted":{"srgb":"#b0b4ba","p3":"color(display-p3 0.692 0.704 0.728)","from":"slate-11"},"fg-faint":{"srgb":"#696e77","p3":"color(display-p3 0.415 0.431 0.463)","from":"slate-9"},"rule":{"srgb":"#363a3f","p3":"color(display-p3 0.215 0.226 0.244)","from":"slate-6"},"rule-strong":{"srgb":"#5a6169","p3":"color(display-p3 0.357 0.381 0.409)","from":"slate-8"},"accent":{"srgb":"#ffffff","p3":"color(display-p3 1 1 1)"},"bg-accent":{"srgb":"#ffffff","p3":"color(display-p3 1 1 1)"},"on-bg-accent":{"srgb":"#18191b","p3":"color(display-p3 0.095 0.098 0.105)"},"accent-fill":"radial-gradient(120% 110% at 0% 0%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 60%), radial-gradient(115% 95% at 100% 100%, transparent 0 18%, color-mix(in oklab, var(--fg) 4%, var(--bg)) 66%), repeating-linear-gradient(90deg, color-mix(in oklab, var(--fg) 16%, transparent) 0 1px, transparent 1px calc(26px * var(--s))), repeating-linear-gradient(0deg, color-mix(in oklab, var(--fg) 16%, transparent) 0 1px, transparent 1px calc(26px * var(--s))), color-mix(in oklab, var(--fg) 4%, var(--bg))","shadow":"0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -8px rgba(0, 0, 0, 0.55)","shadow-box":"0 1px 2px oklch(0 0 0 / 0.5), 0 8px 20px -7px oklch(0 0 0 / 0.66)","c-grey":{"srgb":"#b0b4ba","p3":"color(display-p3 0.692 0.704 0.728)","from":"slate-11"},"c-red":{"srgb":"#ff9592","p3":"color(display-p3 1 0.57 0.55)","from":"red-11"},"c-orange":{"srgb":"#ffa057","p3":"color(display-p3 1 0.63 0.38)","from":"orange-11"},"c-yellow":{"srgb":"#ffca16","p3":"color(display-p3 1 0.8 0.29)","from":"amber-11"},"c-green":{"srgb":"#3dd68c","p3":"color(display-p3 0.434 0.828 0.573)","from":"green-11"},"c-teal":{"srgb":"#0bd8b6","p3":"color(display-p3 0.388 0.835 0.719)","from":"teal-11"},"c-blue":{"srgb":"#70b8ff","p3":"color(display-p3 0.49 0.72 1)","from":"blue-11"},"c-purple":{"srgb":"#baa7ff","p3":"color(display-p3 0.72 0.65 1)","from":"violet-11"},"c-pink":{"srgb":"#ff8dcc","p3":"color(display-p3 1 0.535 0.78)","from":"pink-11"},"chart-series-1":"oklch(0.85 0.006 264)","chart-series-2":"oklch(0.74 0.006 264)","chart-series-3":"oklch(0.63 0.006 264)","chart-series-4":"oklch(0.53 0.006 264)","chart-series-5":"oklch(0.43 0.006 264)","chart-series-6":"oklch(0.34 0.006 264)"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"editorial","name":"Editorial","dictionary":7,"fonts":["newsreader","source-serif-4","jetbrains-mono"],"tokens":{"font-sans":"'Source Serif 4', ui-serif, Georgia, serif","font-mono":"'JetBrains Mono', ui-monospace, monospace","font-display":"'Newsreader', ui-serif, Georgia, serif","weight-display":400,"track-tight":0.15,"text-base":17,"display-scale":1,"display-case":"none","bullet-glyph":"'\\2022'","check-corner":999,"frame-pad-x":84,"frame-pad-t":56,"frame-pad-b":60,"corner-sm":3,"corner-md":6,"corner-lg":16,"border-sm":1,"border-md":2,"border-lg":3,"title-rule-weight":3,"title-rule-length":0.09},"variants":{"plain":{"divider":"rule","border-weight":"border-sm","title-rule":"accent","footer":"accent"},"plain:stat-row":{"row-rule":"rule-strong"},"accent-bar":{"border-lead":"accent","border-weight":"border-md"},"soft-fill":{"fill":"bg-subtle"},"outlined":{"border-top":"rule-strong","border-lead":"rule-strong","border-trail":"rule-strong","border-bottom":"rule-strong","border-weight":"border-sm"},"top-rule":{"border-top":"accent","border-weight":"border-md"},"side-rule":{"fill":"bg-subtle","border-top":"rule","border-trail":"rule","border-bottom":"rule","border-lead":"accent","border-weight":"border-md"},"raised-card":{"fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md","elevation":"shadow-box"},"gradient-card":{"fill":"bg-muted","corner":"corner-md","elevation":"shadow-box"},"solid-accent":{"fill":"accent","on-fill":"bg"},"leaf-corner":{"fill":"bg-subtle","corner":"corner-lg"},"banded":{"band-fill":"bg-subtle","divider":"rule"},"header-band":{"head-fill":"bg-muted","divider":"rule"},"accent-header":{"head-fill":"accent","on-head-fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md"},"marked":{"marker":"bg","marker-fill":"accent","divider":"rule"},"quiet-rule":{"border-lead":"rule-strong","border-weight":"border-md"}},"palettes":{"light":{"bg":"#fbfaf7","bg-subtle":"oklch(0.953 0.010 84)","bg-muted":"linear-gradient(150deg, oklch(0.920 0.021 78), oklch(0.945 0.008 86) 68%)","fg":"#1f1b16","fg-muted":"#5c5349","fg-faint":"#8f8578","rule":"#e3ded4","rule-strong":"#c4bcae","accent":"#8a5a2b","bg-accent":"#8a5a2b","on-bg-accent":"#fbfaf7","accent-fill":"radial-gradient(140% 80% at 50% 100%, color-mix(in oklab, var(--accent) 30%, transparent), transparent 70%), linear-gradient(180deg, transparent 0 30%, color-mix(in oklab, var(--accent) 10%, var(--bg-subtle)) 78%), repeating-linear-gradient(0deg, color-mix(in oklab, var(--accent) 30%, transparent) 0 1px, transparent 1px calc(14px * var(--s))), color-mix(in oklab, var(--accent) 10%, var(--bg-subtle))","shadow":"0 1px 2px rgba(46, 38, 28, 0.05), 0 12px 32px -8px rgba(46, 38, 28, 0.14)","shadow-box":"0 1px 2px oklch(0.30 0.03 60 / 0.07), 0 7px 18px -7px oklch(0.30 0.03 60 / 0.17)","c-grey":"#63635e","c-red":"#d13415","c-orange":"#cc4e00","c-yellow":"#ab6400","c-green":"#2a7e3b","c-teal":"#208368","c-blue":"#0d74ce","c-purple":"#953ea3","c-pink":"#c2298a","chart-series-1":"oklch(0.425 0.095 252)","chart-series-2":"oklch(0.545 0.135 42)","chart-series-3":"oklch(0.495 0.075 145)","chart-series-4":"oklch(0.445 0.095 348)","chart-series-5":"oklch(0.655 0.115 80)","chart-series-6":"oklch(0.535 0.062 214)"},"dark":{"bg":"#1a1713","bg-subtle":"oklch(0.252 0.012 70)","bg-muted":"linear-gradient(150deg, oklch(0.322 0.024 66), oklch(0.260 0.012 70) 68%)","fg":"#f2ede4","fg-muted":"#b8ad9d","fg-faint":"#7d7264","rule":"#3a342b","rule-strong":"#5c5346","accent":"#d9a066","bg-accent":"#d9a066","on-bg-accent":"#1a1713","accent-fill":"radial-gradient(140% 80% at 50% 100%, color-mix(in oklab, var(--accent) 30%, transparent), transparent 70%), linear-gradient(180deg, transparent 0 30%, color-mix(in oklab, var(--accent) 10%, var(--bg-subtle)) 78%), repeating-linear-gradient(0deg, color-mix(in oklab, var(--accent) 30%, transparent) 0 1px, transparent 1px calc(14px * var(--s))), color-mix(in oklab, var(--accent) 10%, var(--bg-subtle))","shadow":"0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -8px rgba(0, 0, 0, 0.55)","shadow-box":"0 1px 2px oklch(0 0 0 / 0.5), 0 8px 20px -7px oklch(0 0 0 / 0.68)","c-grey":"#b5b3ad","c-red":"#ff977d","c-orange":"#ffa057","c-yellow":"#ffca16","c-green":"#71d083","c-teal":"#1fd8a4","c-blue":"#70b8ff","c-purple":"#e796f3","c-pink":"#ff8dcc","chart-series-1":"oklch(0.635 0.100 252)","chart-series-2":"oklch(0.695 0.130 42)","chart-series-3":"oklch(0.675 0.085 145)","chart-series-4":"oklch(0.615 0.088 345)","chart-series-5":"oklch(0.775 0.115 80)","chart-series-6":"oklch(0.675 0.065 214)"}}}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import k from"./tokens.json"with{type:"json"};const L={scale:.9,frameWidth:1280,fallbackMode:"light"},p=k.tokens,v=Object.keys(p),O=v.filter(t=>p[t].scope==="theme"),R=t=>p[t].type==="length"&&p[t].group==="frame",_=O.filter(t=>p[t].type==="length"&&!R(t)),E=v.filter(t=>p[t].scope==="palette"),$=k.variants,Y=Object.keys($.slots),B=$.slots,j=Object.keys($.core),m=$.default,H=t=>$.core[t]?.label??t,q=t=>$.core[t]?.gloss??"",F=(t,e)=>Object.keys(t?.variants?.[e]??{}),y=t=>t.startsWith(`${m}:`),A={"title-rule":[".page-title",".page-subtitle"],footer:[".page"]};function z(t,e,s={}){return(s.core?j:[...j,...Object.keys(e?.variants??{}).filter(n=>!j.includes(n)&&!y(n))]).filter(n=>n===m||F(e,n).every(r=>t.includes(r)))}const I=[[/[{}]/,"a brace"],[/;/,"a semicolon"],[/\/\*|\*\//,"a CSS comment"],[/@/,"an at-rule"],[/[<>]/,"an angle bracket"],[/\burl\s*\(/i,"url()"],[/\bimage-set\s*\(/i,"image-set()"],[/\belement\s*\(/i,"element()"],[/\bexpression\s*\(/i,"expression()"]],M="glyph";function w(t,e){const s=p[t]?.type,o=typeof e=="object"?[e.srgb,e.p3??""]:[String(e)],n=[];for(const r of o){for(const[c,f]of I)c.test(r)&&n.push(`"${t}" contains ${f}, which no theme value may`);s!==M&&r.includes("\\")&&n.push(`"${t}" contains a backslash, which only a glyph may`)}return n}const C={light:{subtle:.03,muted:.06},dark:{subtle:.045,muted:.09}},U=t=>{const e=a=>(a/=255,a<=.04045?a/12.92:((a+.055)/1.055)**2.4),[s,o,n]=[0,2,4].map(a=>e(parseInt(t.slice(a,a+2),16))),r=Math.cbrt(.4122214708*s+.5363325363*o+.0514459929*n),c=Math.cbrt(.2119034982*s+.6806995451*o+.1073969566*n),f=Math.cbrt(.0883024619*s+.2817188376*o+.6299787005*n);return .2104542553*r+.793617785*c-.0040720468*f};function V(t){if(typeof t=="number")return[];const e=typeof t=="object"?t.srgb:t,s=[];for(const o of e.matchAll(/oklch\(\s*([\d.]+)(%?)/g))s.push(o[2]?Number(o[1])/100:Number(o[1]));for(const o of e.matchAll(/#([0-9a-f]{6})\b/gi))s.push(U(o[1]));return s}function D(t,e){const s=C[t];if(!s)return[];const o=[],n=i=>{if(e[i]===void 0)return null;const d=V(e[i]);return d.length||o.push(`"${i}" is a surface the floor cannot read (palette "${t}") \u2014 write it as hex or oklch()`),d.length?d:null},r=n("bg"),c=n("bg-subtle"),f=n("bg-muted");if(!r||!c||!f)return o;const a=i=>(t==="light"?1:-1)*(r[0]-i),l=a(c[0]);l<s.subtle&&o.push(`"bg-subtle" sits ${l.toFixed(3)} off the paper (palette "${t}"); the surface floor is ${s.subtle}`);const u=Math.max(...f.map(a)),h=Math.min(...f.map(a));return u<s.muted&&o.push(`"bg-muted" reaches only ${u.toFixed(3)} off the paper (palette "${t}"); the surface floor is ${s.muted}`),h<l&&o.push(`"bg-muted" comes closer to the paper than subtle at one end (${h.toFixed(3)} against ${l.toFixed(3)}, palette "${t}"); the surface floor keeps paper, subtle and muted in order at every pixel`),o}function G(t){const e=[];t.dictionary!==k.version&&e.push(`theme "${t.id}" was written against dictionary ${t.dictionary}, not ${k.version}`);for(const s of Object.keys(t.tokens))if(!p[s])e.push(`unknown token "${s}"`);else if(p[s].scope!=="theme")e.push(`"${s}" is a palette token, not a theme token`);else{e.push(...w(s,t.tokens[s]));const o=p[s].accepts;o&&!o.includes(String(t.tokens[s]))&&e.push(`"${s}" is "${t.tokens[s]}", which is not one of ${o.join(", ")}`);const{min:n,max:r}=p[s],c=t.tokens[s];typeof c=="number"&&(n!==void 0||r!==void 0)&&(n!==void 0&&c<n||r!==void 0&&c>r)&&e.push(`"${s}" is ${c}, outside the dictionary's ${n} to ${r}`)}for(const[s,o]of Object.entries(t.palettes)){for(const n of Object.keys(o))p[n]?p[n].scope!=="palette"?e.push(`"${n}" is a theme token, not a palette token`):e.push(...w(n,o[n]).map(r=>`${r} (palette "${s}")`)):e.push(`unknown token "${n}" in palette "${s}"`);for(const n of E)n in o||e.push(`palette "${s}" is missing "${n}"`);e.push(...D(s,o))}for(const s of O)s in t.tokens||e.push(`theme "${t.id}" is missing "${s}"`);for(const[s,o]of Object.entries(t.variants??{}))for(const[n,r]of Object.entries(o)){const c=$.slots[n];c?c.accepts.includes(r)||e.push(`variant "${s}" sets "${n}" to "${r}", which is not one of ${c.accepts.join(", ")}`):e.push(`variant "${s}" names unknown slot "${n}"`)}return e}function x(t,e,s){return typeof e=="object"?s==="p3"?e.p3?` --${t}: ${e.p3};`:null:` --${t}: ${e.srgb};`:s==="p3"?null:typeof e=="number"?p[t]?.type==="length"?` --${t}: calc(${e}px * var(--s));`:` --${t}: ${e};`:` --${t}: ${e};`}function g(t,e){const s=e.filter(o=>o!==null);return s.length?`${t} {
|
|
2
|
+
${s.join(`
|
|
3
|
+
`)}
|
|
4
|
+
}`:""}function P(t,e){return`[data-theme='${t}'][data-mode='${e}'],
|
|
5
|
+
[data-theme='${t}'] [data-mode='${e}']`}const S=t=>Object.entries(t).flatMap(([e,s])=>[` --${e}: var(--${s});`,` --${e}-on: 1;`]);function K(t){const e=[],s=Object.entries(t.variants??{}),o=[...s.filter(([n])=>!y(n)),...s.filter(([n])=>y(n))];for(const[n,r]of o){if(y(n)){const l=n.slice(`${m}:`.length),u=S(r);u.length&&e.push(g(`[data-theme='${t.id}'] .blk-${l}:not([data-variant])`,u));continue}const c=Object.entries(r).filter(([l])=>!A[l]),f=Object.entries(r).filter(([l])=>A[l]),a=S(Object.fromEntries(c));if(a.length&&e.push(g(n===m?`[data-theme='${t.id}'] .blk:not([data-variant])`:`[data-theme='${t.id}'] [data-variant='${n}']`,a)),n===m)for(const[l,u]of f){const h=A[l].map(i=>`[data-theme='${t.id}'] ${i}`).join(`,
|
|
6
|
+
`);e.push(g(h,S({[l]:u})))}}return e}function J(t,e={}){const s=G(t);if(s.length)throw new Error(`theme "${t.id}" is not emittable:
|
|
7
|
+
${s.join(`
|
|
8
|
+
`)}`);const{scale:o,frameWidth:n,fallbackMode:r}={...L,...e},c=`[data-theme='${t.id}']`,f=t.palettes[r]??Object.values(t.palettes)[0],a=i=>{const d=[];d.push(g(c,[...i==="srgb"?[` --doc-s: ${o};`," --s: var(--doc-s);",` --frame-w: calc(${n}px * var(--doc-s));`]:[],...O.map(b=>i==="srgb"?x(b,t.tokens[b],i):null),...i==="srgb"?[" --doc-text-base: var(--text-base);"]:[],...E.map(b=>x(b,f[b],i))])),i==="srgb"&&d.push(g(`${c} .page`,[" --s: calc(var(--doc-s) * var(--fit, 1));",..._.map(b=>x(b,t.tokens[b],i))]));for(const[b,N]of Object.entries(t.palettes))d.push(g(P(t.id,b),E.map(T=>x(T,N[T],i))));return i==="srgb"&&d.push(...K(t)),d.filter(Boolean).join(`
|
|
9
|
+
|
|
10
|
+
`)},l=a("srgb"),u=a("p3"),h=u.trim()?`
|
|
11
|
+
|
|
12
|
+
@supports (color: color(display-p3 1 1 1)) {
|
|
13
|
+
@media (color-gamut: p3) {
|
|
14
|
+
`+u.split(`
|
|
15
|
+
`).map(i=>i&&` ${i}`).join(`
|
|
16
|
+
`)+`
|
|
17
|
+
}
|
|
18
|
+
}`:"";return`${l}${h}
|
|
19
|
+
`}export{j as CORE_VARIANTS,m as DEFAULT_VARIANT,_ as PAGE_SCALED_TOKENS,E as PALETTE_TOKENS,C as SURFACE_FLOOR,O as THEME_TOKENS,v as TOKEN_NAMES,Y as VARIANT_SLOTS,B as VARIANT_SLOT_SPECS,J as emitTheme,V as surfaceLightness,G as validateTheme,q as variantGloss,H as variantLabel,z as variantsFor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const f={inter:{family:"Inter",weights:[400,500,600]},"jetbrains-mono":{family:"JetBrains Mono",weights:[400,500]},newsreader:{family:"Newsreader",weights:[400,500]},"inter-tight":{family:"Inter Tight",weights:[500,600,700]},"source-serif-4":{family:"Source Serif 4",weights:[400,500,600]},geist:{family:"Geist",weights:[400,500,600,700]},"geist-mono":{family:"Geist Mono",weights:[400,500]},"ibm-plex-sans":{family:"IBM Plex Sans",weights:[400,500,600]},"ibm-plex-mono":{family:"IBM Plex Mono",weights:[400,500]},archivo:{family:"Archivo",weights:[400,500,600,900]},fraunces:{family:"Fraunces",weights:[400,500],italics:[400,500]},manrope:{family:"Manrope",weights:[400,500,600]},"dm-mono":{family:"DM Mono",weights:[400,500]},"plus-jakarta-sans":{family:"Plus Jakarta Sans",weights:[400,500,600,800]},sono:{family:"Sono",weights:[400,500]},sora:{family:"Sora",weights:[400,700]}};function l(n){const e=new Set;for(const o of n)for(const t of o.fonts??[])e.add(t);const s=[];for(const o of[...e].sort()){const t=f[o];if(!t)throw new Error(`theme names font "${o}", which is not in the export font registry`);for(const i of[...t.weights].sort((r,a)=>r-a))s.push({family:t.family,weight:i,style:"normal"});for(const i of[...t.italics??[]].sort((r,a)=>r-a))s.push({family:t.family,weight:i,style:"italic"})}return s}const m="https://fonts.googleapis.com/css2",c="swap",h=(n,e)=>{const s=n.replace(/ /g,"+");if(e.every(t=>t.style==="normal"))return`family=${s}:wght@${e.map(t=>t.weight).join(";")}`;const o=e.map(t=>[t.style==="italic"?1:0,t.weight]).sort((t,i)=>t[0]-i[0]||t[1]-i[1]);return`family=${s}:ital,wght@${o.map(([t,i])=>`${t},${i}`).join(";")}`};function y(n){const e=new Map;for(const o of l(n)){const t=e.get(o.family);t?t.push(o):e.set(o.family,[o])}if(e.size===0)return null;const s=[...e].map(([o,t])=>h(o,t));return`${m}?${s.join("&")}&display=${c}`}function g(n){const e=y(n);return e?[{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:e}]:[]}export{f as FONTS,y as fontHref,g as fontLinks,l as fontsFor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"foundry","name":"Foundry","dictionary":7,"fonts":["archivo","jetbrains-mono"],"tokens":{"font-sans":"'Archivo', ui-sans-serif, system-ui, sans-serif","font-mono":"'JetBrains Mono', ui-monospace, monospace","font-display":"'Archivo', ui-sans-serif, system-ui, sans-serif","weight-display":900,"track-tight":1.2,"text-base":16,"display-scale":1.05,"display-case":"uppercase","bullet-glyph":"'\\25AA'","check-corner":0,"frame-pad-x":64,"frame-pad-t":44,"frame-pad-b":64,"corner-sm":0,"corner-md":0,"corner-lg":0,"border-sm":1,"border-md":3,"border-lg":6,"title-rule-weight":6,"title-rule-length":1},"variants":{"plain":{"divider":"rule","divider-col":"rule","border-weight":"border-md","title-rule":"accent","footer":"fg"},"plain:stat-row":{"row-rule":"rule-strong","row-mark":"accent"},"plain:table":{"table-mark":"accent"},"accent-bar":{"border-lead":"accent","border-weight":"border-lg"},"soft-fill":{"fill":"bg-subtle"},"outlined":{"border-top":"rule-strong","border-lead":"rule-strong","border-trail":"rule-strong","border-bottom":"rule-strong","border-weight":"border-md"},"top-rule":{"border-top":"accent","border-weight":"border-lg"},"side-rule":{"fill":"bg-subtle","border-top":"rule","border-trail":"rule","border-bottom":"rule","border-lead":"accent","border-weight":"border-md"},"raised-card":{"fill":"bg","border-top":"rule-strong","border-lead":"rule-strong","border-trail":"rule-strong","border-bottom":"rule-strong","border-weight":"border-sm","corner":"corner-md","elevation":"shadow-box"},"gradient-card":{"fill":"bg-muted","corner":"corner-md","elevation":"shadow-box"},"solid-accent":{"fill":"accent","on-fill":"bg"},"leaf-corner":{"fill":"bg-subtle","corner":"corner-lg"},"banded":{"band-fill":"bg-subtle","divider":"rule"},"header-band":{"head-fill":"bg-muted","divider":"rule"},"accent-header":{"head-fill":"accent","on-head-fill":"bg","border-top":"rule","border-lead":"rule","border-trail":"rule","border-bottom":"rule","border-weight":"border-sm","corner":"corner-md"},"marked":{"marker":"bg","marker-fill":"accent","divider":"rule"}},"palettes":{"light":{"bg":"#ffffff","bg-subtle":"oklch(0.962 0.002 30)","bg-muted":"oklch(0.918 0.003 30)","fg":"#0d0d0d","fg-muted":"#55565a","fg-faint":"#8c8c90","rule":"#d2d2d3","rule-strong":"#0d0d0d","accent":"#d92d24","bg-accent":"#d92d24","on-bg-accent":"#ffffff","accent-fill":"radial-gradient(circle at 50% 46%, transparent 0 20%, color-mix(in oklab, var(--bg-accent) 74%, transparent) 49%, var(--bg-accent) 78%), radial-gradient(circle at center, var(--fg) 0 36%, transparent 37%) 0 0 / calc(13px * var(--s)) calc(13px * var(--s)), linear-gradient(color-mix(in oklab, var(--fg) 12%, transparent), color-mix(in oklab, var(--fg) 12%, transparent)), var(--bg-accent)","shadow":"0 1px 0 rgba(13, 13, 13, 0.14), 0 16px 34px -14px rgba(13, 13, 13, 0.30)","shadow-box":"5px 5px 0 rgba(13, 13, 13, 0.16)","c-grey":"#55565a","c-red":"#d92d24","c-orange":"#b5510a","c-yellow":"#8f6a00","c-green":"#1c7a4b","c-teal":"#0d7a6e","c-blue":"#1f4fb8","c-purple":"#5b3fb5","c-pink":"#b32a7a","chart-series-1":"oklch(0.578 0.207 29)","chart-series-2":"oklch(0.235 0.028 29)","chart-series-3":"oklch(0.450 0.155 277)","chart-series-4":"oklch(0.755 0.145 78)","chart-series-5":"oklch(0.555 0.009 30)","chart-series-6":"oklch(0.775 0.008 30)"},"dark":{"bg":"#0d0d0d","bg-subtle":"#1a1a1a","bg-muted":"#262626","fg":"#f4f4f3","fg-muted":"#a6a6a8","fg-faint":"#6f6f72","rule":"#333334","rule-strong":"#f4f4f3","accent":"#ff4b3b","bg-accent":"#ff4b3b","on-bg-accent":"#0d0d0d","accent-fill":"radial-gradient(circle at 50% 46%, transparent 0 20%, color-mix(in oklab, color-mix(in oklab, var(--fg) 8%, var(--bg)) 74%, transparent) 49%, color-mix(in oklab, var(--fg) 8%, var(--bg)) 78%), radial-gradient(circle at center, var(--accent) 0 36%, transparent 37%) 0 0 / calc(13px * var(--s)) calc(13px * var(--s)), linear-gradient(color-mix(in oklab, var(--accent) 12%, transparent), color-mix(in oklab, var(--accent) 12%, transparent)), color-mix(in oklab, var(--fg) 8%, var(--bg))","shadow":"0 1px 0 rgba(0, 0, 0, 0.6), 0 16px 34px -14px rgba(0, 0, 0, 0.75)","shadow-box":"5px 5px 0 rgba(244, 244, 243, 0.14)","c-grey":"#a6a6a8","c-red":"#ff8a80","c-orange":"#ffa057","c-yellow":"#e8bc3c","c-green":"#5cd69a","c-teal":"#2fd3bd","c-blue":"#8fb0ff","c-purple":"#b9a3ff","c-pink":"#ff8ec4","chart-series-1":"oklch(0.665 0.195 29)","chart-series-2":"oklch(0.925 0.012 29)","chart-series-3":"oklch(0.635 0.145 277)","chart-series-4":"oklch(0.800 0.135 78)","chart-series-5":"oklch(0.575 0.009 30)","chart-series-6":"oklch(0.735 0.008 30)"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{emitTheme as x,validateTheme as L,TOKEN_NAMES as R,THEME_TOKENS as c,PALETTE_TOKENS as F,VARIANT_SLOTS as H,VARIANT_SLOT_SPECS as M,CORE_VARIANTS as u,DEFAULT_VARIANT as v,variantGloss as D,variantLabel as K,variantsFor as V}from"./emit.js";import{FONTS as b,fontHref as P,fontLinks as U,fontsFor as g}from"./fonts.js";import{default as B}from"./tokens.json"with{type:"json"};import r from"./decaframe.json"with{type:"json"};import m from"./editorial.json"with{type:"json"};import T from"./boardroom.json"with{type:"json"};import i from"./foundry.json"with{type:"json"};import p from"./signal.json"with{type:"json"};import n from"./atelier.json"with{type:"json"};import a from"./meadow.json"with{type:"json"};import h from"./aurora.json"with{type:"json"};const o=r,s=m,I=()=>o.id,f=[o,s,T,i,p,n,a,h],O=e=>f.find(t=>t.id===e);export{u as CORE_VARIANTS,o as DEFAULT_THEME,v as DEFAULT_VARIANT,s as EDITORIAL_THEME,b as FONTS,F as PALETTE_TOKENS,f as THEMES,c as THEME_TOKENS,B as TOKEN_DICTIONARY,R as TOKEN_NAMES,H as VARIANT_SLOTS,M as VARIANT_SLOT_SPECS,I as defaultThemeId,x as emitTheme,P as fontHref,U as fontLinks,g as fontsFor,O as themeById,L as validateTheme,D as variantGloss,K as variantLabel,V as variantsFor};
|