@ryanyahya/opendoc 0.4.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/.agents/skills/opendoc-apply-comments/SKILL.md +30 -0
- package/.agents/skills/opendoc-apply-comments/agents/openai.yaml +4 -0
- package/.agents/skills/opendoc-create/SKILL.md +63 -0
- package/.agents/skills/opendoc-create/agents/openai.yaml +6 -0
- package/.agents/skills/opendoc-create-template/SKILL.md +50 -0
- package/.agents/skills/opendoc-create-template/agents/openai.yaml +4 -0
- package/.agents/skills/opendoc-create-template/references/structured-reports.md +11 -0
- package/.agents/skills/opendoc-create-theme/SKILL.md +40 -0
- package/.agents/skills/opendoc-create-theme/agents/openai.yaml +4 -0
- package/.agents/skills/opendoc-current-document/SKILL.md +32 -0
- package/.agents/skills/opendoc-current-document/agents/openai.yaml +4 -0
- package/.agents/skills/opendoc-current-document/references/context-fields.md +20 -0
- package/.agents/skills/opendoc-review-document/SKILL.md +60 -0
- package/.agents/skills/opendoc-review-document/agents/openai.yaml +4 -0
- package/AGENTS.md +69 -0
- package/CONTRIBUTING.md +38 -0
- package/LICENSE +21 -0
- package/README.md +179 -0
- package/SECURITY.md +9 -0
- package/THIRD_PARTY.md +49 -0
- package/VALIDATION.md +99 -0
- package/bin/opendoc.mjs +6 -0
- package/dist/assets/Markdown-sNZyjJi7.js +29 -0
- package/dist/assets/OpenDocSerif-Regular-D3OXs9A9.ttf +0 -0
- package/dist/assets/OpenDocSerif-Semibold-CjL9oDRo.ttf +0 -0
- package/dist/assets/geist-latin-ext-wght-italic-XgKbg5n7.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-italic-dTnRTFFJ.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/index-DdrZ6ozO.css +1 -0
- package/dist/assets/index-DgNBz7mL.js +39 -0
- package/dist/assets/pdf-B7Emtyld.js +54 -0
- package/dist/assets/pdf.worker.min-Dswkl-cV.mjs +29 -0
- package/dist/assets/wordmark-DsqLlZpb.png +0 -0
- package/dist/index.html +17 -0
- package/docs/APPEARANCE.md +21 -0
- package/docs/ASSETS.md +176 -0
- package/docs/AUTHORING.md +178 -0
- package/docs/HEADLESS.md +120 -0
- package/docs/MEDIA.md +112 -0
- package/docs/PROJECTS.md +55 -0
- package/docs/PROSE.md +15 -0
- package/docs/SELECTION.md +59 -0
- package/docs/TEMPLATES.md +55 -0
- package/docs/THEMES.md +106 -0
- package/node_modules/@formepdf/core/LICENSE +21 -0
- package/node_modules/@formepdf/core/README.md +53 -0
- package/node_modules/@formepdf/core/dist/attachments.d.ts +55 -0
- package/node_modules/@formepdf/core/dist/attachments.js +59 -0
- package/node_modules/@formepdf/core/dist/extract.d.ts +8 -0
- package/node_modules/@formepdf/core/dist/extract.js +56 -0
- package/node_modules/@formepdf/core/dist/index.d.ts +311 -0
- package/node_modules/@formepdf/core/dist/index.js +167 -0
- package/node_modules/@formepdf/core/dist/layout.d.ts +132 -0
- package/node_modules/@formepdf/core/dist/layout.js +240 -0
- package/node_modules/@formepdf/core/dist/shared/browserHelpers.d.ts +19 -0
- package/node_modules/@formepdf/core/dist/shared/browserHelpers.js +128 -0
- package/node_modules/@formepdf/core/package.json +35 -0
- package/node_modules/@formepdf/core/pkg-node/LICENSE +21 -0
- package/node_modules/@formepdf/core/pkg-node/README.md +84 -0
- package/node_modules/@formepdf/core/pkg-node/forme.d.ts +39 -0
- package/node_modules/@formepdf/core/pkg-node/forme.js +394 -0
- package/node_modules/@formepdf/core/pkg-node/forme_bg.wasm +0 -0
- package/node_modules/@formepdf/core/pkg-node/forme_bg.wasm.d.ts +21 -0
- package/node_modules/@formepdf/core/pkg-node/package.json +25 -0
- package/node_modules/@formepdf/react/README.md +70 -0
- package/node_modules/@formepdf/react/dist/charts.d.ts +72 -0
- package/node_modules/@formepdf/react/dist/charts.js +338 -0
- package/node_modules/@formepdf/react/dist/components.d.ts +533 -0
- package/node_modules/@formepdf/react/dist/components.js +608 -0
- package/node_modules/@formepdf/react/dist/expr.d.ts +20 -0
- package/node_modules/@formepdf/react/dist/expr.js +39 -0
- package/node_modules/@formepdf/react/dist/font.d.ts +2 -0
- package/node_modules/@formepdf/react/dist/font.js +1 -0
- package/node_modules/@formepdf/react/dist/index.d.ts +11 -0
- package/node_modules/@formepdf/react/dist/index.js +15 -0
- package/node_modules/@formepdf/react/dist/render.d.ts +12 -0
- package/node_modules/@formepdf/react/dist/render.js +15 -0
- package/node_modules/@formepdf/react/dist/serialize.d.ts +12 -0
- package/node_modules/@formepdf/react/dist/serialize.js +1470 -0
- package/node_modules/@formepdf/react/dist/stylesheet.d.ts +4 -0
- package/node_modules/@formepdf/react/dist/stylesheet.js +5 -0
- package/node_modules/@formepdf/react/dist/template-proxy.d.ts +38 -0
- package/node_modules/@formepdf/react/dist/template-proxy.js +100 -0
- package/node_modules/@formepdf/react/dist/types.d.ts +287 -0
- package/node_modules/@formepdf/react/dist/types.js +1 -0
- package/node_modules/@formepdf/react/package.json +41 -0
- package/node_modules/@formepdf/shared/README.md +7 -0
- package/node_modules/@formepdf/shared/dist/canvas.d.ts +6 -0
- package/node_modules/@formepdf/shared/dist/canvas.js +43 -0
- package/node_modules/@formepdf/shared/dist/charts.d.ts +100 -0
- package/node_modules/@formepdf/shared/dist/charts.js +98 -0
- package/node_modules/@formepdf/shared/dist/encode.d.ts +27 -0
- package/node_modules/@formepdf/shared/dist/encode.js +93 -0
- package/node_modules/@formepdf/shared/dist/font.d.ts +13 -0
- package/node_modules/@formepdf/shared/dist/font.js +52 -0
- package/node_modules/@formepdf/shared/dist/index.d.ts +10 -0
- package/node_modules/@formepdf/shared/dist/index.js +15 -0
- package/node_modules/@formepdf/shared/dist/parser.d.ts +30 -0
- package/node_modules/@formepdf/shared/dist/parser.js +756 -0
- package/node_modules/@formepdf/shared/dist/semantics.d.ts +15 -0
- package/node_modules/@formepdf/shared/dist/semantics.js +44 -0
- package/node_modules/@formepdf/shared/dist/style.d.ts +7 -0
- package/node_modules/@formepdf/shared/dist/style.js +1024 -0
- package/node_modules/@formepdf/shared/dist/types.d.ts +743 -0
- package/node_modules/@formepdf/shared/dist/types.js +2 -0
- package/node_modules/@formepdf/shared/package.json +35 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +111 -0
- package/node_modules/@types/node/assert.d.ts +1078 -0
- package/node_modules/@types/node/async_hooks.d.ts +603 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/node_modules/@types/node/buffer.d.ts +1934 -0
- package/node_modules/@types/node/child_process.d.ts +1476 -0
- package/node_modules/@types/node/cluster.d.ts +578 -0
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/node_modules/@types/node/console.d.ts +452 -0
- package/node_modules/@types/node/constants.d.ts +21 -0
- package/node_modules/@types/node/crypto.d.ts +4545 -0
- package/node_modules/@types/node/dgram.d.ts +600 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- package/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/node_modules/@types/node/dns.d.ts +923 -0
- package/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@types/node/events.d.ts +976 -0
- package/node_modules/@types/node/fs/promises.d.ts +1306 -0
- package/node_modules/@types/node/fs.d.ts +4463 -0
- package/node_modules/@types/node/globals.d.ts +172 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/node_modules/@types/node/http.d.ts +2097 -0
- package/node_modules/@types/node/http2.d.ts +2843 -0
- package/node_modules/@types/node/https.d.ts +579 -0
- package/node_modules/@types/node/index.d.ts +98 -0
- package/node_modules/@types/node/inspector.d.ts +253 -0
- package/node_modules/@types/node/inspector.generated.d.ts +4052 -0
- package/node_modules/@types/node/module.d.ts +891 -0
- package/node_modules/@types/node/net.d.ts +1076 -0
- package/node_modules/@types/node/os.d.ts +506 -0
- package/node_modules/@types/node/package.json +145 -0
- package/node_modules/@types/node/path.d.ts +200 -0
- package/node_modules/@types/node/perf_hooks.d.ts +968 -0
- package/node_modules/@types/node/process.d.ts +2084 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +152 -0
- package/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/node_modules/@types/node/readline.d.ts +594 -0
- package/node_modules/@types/node/repl.d.ts +428 -0
- package/node_modules/@types/node/sea.d.ts +162 -0
- package/node_modules/@types/node/sqlite.d.ts +722 -0
- package/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/node_modules/@types/node/stream/web.d.ts +573 -0
- package/node_modules/@types/node/stream.d.ts +1694 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/test.d.ts +2265 -0
- package/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/node_modules/@types/node/timers.d.ts +287 -0
- package/node_modules/@types/node/tls.d.ts +1319 -0
- package/node_modules/@types/node/trace_events.d.ts +197 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +98 -0
- package/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@types/node/url.d.ts +984 -0
- package/node_modules/@types/node/util.d.ts +2606 -0
- package/node_modules/@types/node/v8.d.ts +920 -0
- package/node_modules/@types/node/vm.d.ts +1053 -0
- package/node_modules/@types/node/wasi.d.ts +181 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +819 -0
- package/node_modules/@types/node/zlib.d.ts +747 -0
- package/node_modules/@types/react/LICENSE +21 -0
- package/node_modules/@types/react/README.md +15 -0
- package/node_modules/@types/react/canary.d.ts +129 -0
- package/node_modules/@types/react/compiler-runtime.d.ts +4 -0
- package/node_modules/@types/react/experimental.d.ts +184 -0
- package/node_modules/@types/react/global.d.ts +166 -0
- package/node_modules/@types/react/index.d.ts +4378 -0
- package/node_modules/@types/react/jsx-dev-runtime.d.ts +33 -0
- package/node_modules/@types/react/jsx-runtime.d.ts +24 -0
- package/node_modules/@types/react/package.json +210 -0
- package/node_modules/@types/react/ts5.0/canary.d.ts +129 -0
- package/node_modules/@types/react/ts5.0/experimental.d.ts +184 -0
- package/node_modules/@types/react/ts5.0/global.d.ts +166 -0
- package/node_modules/@types/react/ts5.0/index.d.ts +4365 -0
- package/node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts +33 -0
- package/node_modules/@types/react/ts5.0/jsx-runtime.d.ts +24 -0
- package/node_modules/csstype/LICENSE +19 -0
- package/node_modules/csstype/README.md +291 -0
- package/node_modules/csstype/index.d.ts +22569 -0
- package/node_modules/csstype/index.js.flow +6863 -0
- package/node_modules/csstype/package.json +70 -0
- package/node_modules/entities/LICENSE +11 -0
- package/node_modules/entities/decode.d.ts +1 -0
- package/node_modules/entities/decode.js +3 -0
- package/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +19 -0
- package/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +1 -0
- package/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
- package/node_modules/entities/dist/commonjs/decode.d.ts +209 -0
- package/node_modules/entities/dist/commonjs/decode.d.ts.map +1 -0
- package/node_modules/entities/dist/commonjs/decode.js +511 -0
- package/node_modules/entities/dist/commonjs/decode.js.map +1 -0
- package/node_modules/entities/dist/commonjs/encode.d.ts +22 -0
- package/node_modules/entities/dist/commonjs/encode.d.ts.map +1 -0
- package/node_modules/entities/dist/commonjs/encode.js +73 -0
- package/node_modules/entities/dist/commonjs/encode.js.map +1 -0
- package/node_modules/entities/dist/commonjs/escape.d.ts +43 -0
- package/node_modules/entities/dist/commonjs/escape.d.ts.map +1 -0
- package/node_modules/entities/dist/commonjs/escape.js +121 -0
- package/node_modules/entities/dist/commonjs/escape.js.map +1 -0
- package/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +2 -0
- package/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/dist/commonjs/generated/decode-data-html.js +10 -0
- package/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +2 -0
- package/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +10 -0
- package/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/dist/commonjs/generated/encode-html.js +13 -0
- package/node_modules/entities/dist/commonjs/generated/encode-html.js.map +1 -0
- package/node_modules/entities/dist/commonjs/index.d.ts +96 -0
- package/node_modules/entities/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/entities/dist/commonjs/index.js +131 -0
- package/node_modules/entities/dist/commonjs/index.js.map +1 -0
- package/node_modules/entities/dist/commonjs/package.json +3 -0
- package/node_modules/entities/dist/esm/decode-codepoint.d.ts +19 -0
- package/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +1 -0
- package/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
- package/node_modules/entities/dist/esm/decode-codepoint.js.map +1 -0
- package/node_modules/entities/dist/esm/decode.d.ts +209 -0
- package/node_modules/entities/dist/esm/decode.d.ts.map +1 -0
- package/node_modules/entities/dist/esm/decode.js +497 -0
- package/node_modules/entities/dist/esm/decode.js.map +1 -0
- package/node_modules/entities/dist/esm/encode.d.ts +22 -0
- package/node_modules/entities/dist/esm/encode.d.ts.map +1 -0
- package/node_modules/entities/dist/esm/encode.js +69 -0
- package/node_modules/entities/dist/esm/encode.js.map +1 -0
- package/node_modules/entities/dist/esm/escape.d.ts +43 -0
- package/node_modules/entities/dist/esm/escape.d.ts.map +1 -0
- package/node_modules/entities/dist/esm/escape.js +117 -0
- package/node_modules/entities/dist/esm/escape.js.map +1 -0
- package/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +2 -0
- package/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
- package/node_modules/entities/dist/esm/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +2 -0
- package/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/dist/esm/generated/decode-data-xml.js +7 -0
- package/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/dist/esm/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/dist/esm/generated/encode-html.js +10 -0
- package/node_modules/entities/dist/esm/generated/encode-html.js.map +1 -0
- package/node_modules/entities/dist/esm/index.d.ts +96 -0
- package/node_modules/entities/dist/esm/index.d.ts.map +1 -0
- package/node_modules/entities/dist/esm/index.js +107 -0
- package/node_modules/entities/dist/esm/index.js.map +1 -0
- package/node_modules/entities/dist/esm/package.json +3 -0
- package/node_modules/entities/escape.d.ts +1 -0
- package/node_modules/entities/escape.js +3 -0
- package/node_modules/entities/package.json +118 -0
- package/node_modules/entities/readme.md +122 -0
- package/node_modules/entities/src/decode-codepoint.ts +81 -0
- package/node_modules/entities/src/decode.spec.ts +320 -0
- package/node_modules/entities/src/decode.ts +620 -0
- package/node_modules/entities/src/encode.spec.ts +78 -0
- package/node_modules/entities/src/encode.ts +77 -0
- package/node_modules/entities/src/escape.spec.ts +14 -0
- package/node_modules/entities/src/escape.ts +148 -0
- package/node_modules/entities/src/generated/.eslintrc.json +10 -0
- package/node_modules/entities/src/generated/decode-data-html.ts +8 -0
- package/node_modules/entities/src/generated/decode-data-xml.ts +8 -0
- package/node_modules/entities/src/generated/encode-html.ts +17 -0
- package/node_modules/entities/src/index.spec.ts +125 -0
- package/node_modules/entities/src/index.ts +188 -0
- package/node_modules/parse5/LICENSE +19 -0
- package/node_modules/parse5/README.md +38 -0
- package/node_modules/parse5/dist/cjs/common/doctype.d.ts +4 -0
- package/node_modules/parse5/dist/cjs/common/doctype.js +118 -0
- package/node_modules/parse5/dist/cjs/common/error-codes.d.ts +67 -0
- package/node_modules/parse5/dist/cjs/common/error-codes.js +66 -0
- package/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +9 -0
- package/node_modules/parse5/dist/cjs/common/foreign-content.js +237 -0
- package/node_modules/parse5/dist/cjs/common/html.d.ts +289 -0
- package/node_modules/parse5/dist/cjs/common/html.js +528 -0
- package/node_modules/parse5/dist/cjs/common/token.d.ts +84 -0
- package/node_modules/parse5/dist/cjs/common/token.js +24 -0
- package/node_modules/parse5/dist/cjs/common/unicode.d.ts +42 -0
- package/node_modules/parse5/dist/cjs/common/unicode.js +70 -0
- package/node_modules/parse5/dist/cjs/index.d.ts +71 -0
- package/node_modules/parse5/dist/cjs/index.js +54 -0
- package/node_modules/parse5/dist/cjs/package.json +1 -0
- package/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +36 -0
- package/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +114 -0
- package/node_modules/parse5/dist/cjs/parser/index.d.ts +221 -0
- package/node_modules/parse5/dist/cjs/parser/index.js +3240 -0
- package/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +53 -0
- package/node_modules/parse5/dist/cjs/parser/open-element-stack.js +328 -0
- package/node_modules/parse5/dist/cjs/serializer/index.d.ts +60 -0
- package/node_modules/parse5/dist/cjs/serializer/index.js +172 -0
- package/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +247 -0
- package/node_modules/parse5/dist/cjs/tokenizer/index.js +2714 -0
- package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +36 -0
- package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +200 -0
- package/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +84 -0
- package/node_modules/parse5/dist/cjs/tree-adapters/default.js +176 -0
- package/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +255 -0
- package/node_modules/parse5/dist/cjs/tree-adapters/interface.js +2 -0
- package/node_modules/parse5/dist/common/doctype.d.ts +4 -0
- package/node_modules/parse5/dist/common/doctype.js +114 -0
- package/node_modules/parse5/dist/common/error-codes.d.ts +67 -0
- package/node_modules/parse5/dist/common/error-codes.js +63 -0
- package/node_modules/parse5/dist/common/foreign-content.d.ts +9 -0
- package/node_modules/parse5/dist/common/foreign-content.js +228 -0
- package/node_modules/parse5/dist/common/html.d.ts +289 -0
- package/node_modules/parse5/dist/common/html.js +523 -0
- package/node_modules/parse5/dist/common/token.d.ts +84 -0
- package/node_modules/parse5/dist/common/token.js +20 -0
- package/node_modules/parse5/dist/common/unicode.d.ts +42 -0
- package/node_modules/parse5/dist/common/unicode.js +62 -0
- package/node_modules/parse5/dist/index.d.ts +71 -0
- package/node_modules/parse5/dist/index.js +42 -0
- package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +36 -0
- package/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
- package/node_modules/parse5/dist/parser/index.d.ts +221 -0
- package/node_modules/parse5/dist/parser/index.js +3245 -0
- package/node_modules/parse5/dist/parser/open-element-stack.d.ts +53 -0
- package/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
- package/node_modules/parse5/dist/serializer/index.d.ts +60 -0
- package/node_modules/parse5/dist/serializer/index.js +168 -0
- package/node_modules/parse5/dist/tokenizer/index.d.ts +247 -0
- package/node_modules/parse5/dist/tokenizer/index.js +2710 -0
- package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +36 -0
- package/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
- package/node_modules/parse5/dist/tree-adapters/default.d.ts +84 -0
- package/node_modules/parse5/dist/tree-adapters/default.js +173 -0
- package/node_modules/parse5/dist/tree-adapters/interface.d.ts +255 -0
- package/node_modules/parse5/dist/tree-adapters/interface.js +1 -0
- package/node_modules/parse5/package.json +50 -0
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +108 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/node_modules/undici-types/errors.d.ts +149 -0
- package/node_modules/undici-types/eventsource.d.ts +61 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +15 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +71 -0
- package/node_modules/undici-types/interceptors.d.ts +17 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +33 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +39 -0
- package/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/node_modules/undici-types/readable.d.ts +65 -0
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/webidl.d.ts +228 -0
- package/node_modules/undici-types/websocket.d.ts +150 -0
- package/package.json +80 -0
- package/scripts/rebuild-forme.mjs +61 -0
- package/src/app/AppearanceControl.tsx +44 -0
- package/src/app/AssetThemeDefaults.tsx +87 -0
- package/src/app/AssetsBrowser.tsx +273 -0
- package/src/app/CommentDock.tsx +108 -0
- package/src/app/CreateDocumentDialog.tsx +51 -0
- package/src/app/DocumentActions.tsx +69 -0
- package/src/app/DocumentCard.tsx +50 -0
- package/src/app/DocumentViewControl.tsx +31 -0
- package/src/app/DocumentsBrowser.tsx +70 -0
- package/src/app/ExportHistoryDialog.tsx +86 -0
- package/src/app/ExportMenu.tsx +127 -0
- package/src/app/GuideDialog.tsx +80 -0
- package/src/app/InspectionLayer.tsx +77 -0
- package/src/app/LogoUploadDialog.tsx +92 -0
- package/src/app/Markdown.tsx +34 -0
- package/src/app/MaterialsBrowser.tsx +149 -0
- package/src/app/PageNumberInput.tsx +56 -0
- package/src/app/Pdf.tsx +561 -0
- package/src/app/ProjectDialogs.tsx +100 -0
- package/src/app/Reader.tsx +769 -0
- package/src/app/SearchField.tsx +13 -0
- package/src/app/Sidebar.tsx +86 -0
- package/src/app/SkillIndex.tsx +30 -0
- package/src/app/TemplatesBrowser.tsx +149 -0
- package/src/app/ThemesBrowser.tsx +159 -0
- package/src/app/api.ts +47 -0
- package/src/app/appearance.ts +35 -0
- package/src/app/assets.css +139 -0
- package/src/app/catalogPreview.ts +20 -0
- package/src/app/colors.css +167 -0
- package/src/app/comment-dock.css +53 -0
- package/src/app/commentDrafts.ts +67 -0
- package/src/app/componentCorrection.ts +17 -0
- package/src/app/edit-workbench.css +87 -0
- package/src/app/editSession.ts +238 -0
- package/src/app/editorRecovery.ts +25 -0
- package/src/app/export-history.css +31 -0
- package/src/app/export.css +17 -0
- package/src/app/guideLinks.ts +21 -0
- package/src/app/guides.css +40 -0
- package/src/app/main.tsx +221 -0
- package/src/app/materials.css +53 -0
- package/src/app/pdfLoading.ts +12 -0
- package/src/app/pdfSelection.ts +112 -0
- package/src/app/projects.css +63 -0
- package/src/app/reader-toolbar.css +65 -0
- package/src/app/selection.css +150 -0
- package/src/app/sidebar.css +60 -0
- package/src/app/skills.css +7 -0
- package/src/app/style.css +1061 -0
- package/src/app/templates.css +49 -0
- package/src/app/themes.css +80 -0
- package/src/app/ui/Icon.tsx +92 -0
- package/src/app/ui/README.md +27 -0
- package/src/app/ui/fonts.css +36 -0
- package/src/app/ui/index.tsx +223 -0
- package/src/app/ui/ui.css +388 -0
- package/src/app/useReaderPreview.ts +19 -0
- package/src/app/useTextEditing.ts +155 -0
- package/src/assets/adapter.ts +122 -0
- package/src/assets/files.ts +378 -0
- package/src/assets/import-worker.ts +294 -0
- package/src/assets/imports.ts +124 -0
- package/src/assets/index.ts +60 -0
- package/src/assets/store.ts +798 -0
- package/src/assets/usage.ts +118 -0
- package/src/cli/check.ts +25 -0
- package/src/cli/init.ts +119 -0
- package/src/cli/lock.ts +34 -0
- package/src/cli/main.ts +118 -0
- package/src/cli/process.ts +19 -0
- package/src/cli/start.ts +96 -0
- package/src/cli/update.ts +348 -0
- package/src/cli/workspace.ts +94 -0
- package/src/document/index.tsx +641 -0
- package/src/document/page.tsx +53 -0
- package/src/document/text-targets.tsx +162 -0
- package/src/media/files.ts +124 -0
- package/src/media/render.ts +63 -0
- package/src/rendering/resolve-sources.ts +84 -0
- package/src/runtime/jsx-dev-runtime.ts +2 -0
- package/src/runtime/jsx-runtime.ts +2 -0
- package/src/runtime/paths.ts +12 -0
- package/src/server/assets-cli.ts +162 -0
- package/src/server/assets-http.ts +100 -0
- package/src/server/client.ts +50 -0
- package/src/server/clipboard.ts +22 -0
- package/src/server/comments-cli.ts +64 -0
- package/src/server/comments.ts +130 -0
- package/src/server/create-cli.ts +33 -0
- package/src/server/create.ts +228 -0
- package/src/server/dependencies.ts +91 -0
- package/src/server/documents.ts +143 -0
- package/src/server/edits.ts +249 -0
- package/src/server/export-batch.ts +105 -0
- package/src/server/export-errors.ts +2 -0
- package/src/server/export-file.ts +57 -0
- package/src/server/export-inputs.ts +66 -0
- package/src/server/export-preview.ts +69 -0
- package/src/server/export.ts +32 -0
- package/src/server/exports.ts +283 -0
- package/src/server/files.ts +21 -0
- package/src/server/guides.ts +71 -0
- package/src/server/index.ts +432 -0
- package/src/server/materials.ts +39 -0
- package/src/server/media-cli.ts +73 -0
- package/src/server/media-mutations.ts +168 -0
- package/src/server/pptx.ts +160 -0
- package/src/server/preflight.ts +129 -0
- package/src/server/projects-cli.ts +29 -0
- package/src/server/projects.ts +187 -0
- package/src/server/render-error.ts +9 -0
- package/src/server/render-source.ts +24 -0
- package/src/server/render.ts +48 -0
- package/src/server/review-cli.ts +40 -0
- package/src/server/review.ts +161 -0
- package/src/server/selection.ts +23 -0
- package/src/server/source-overrides.ts +97 -0
- package/src/server/templates-cli.ts +51 -0
- package/src/server/templates.ts +186 -0
- package/src/server/text-layout.ts +41 -0
- package/src/server/text-source.ts +307 -0
- package/src/server/themes-cli.ts +59 -0
- package/src/server/themes.ts +215 -0
- package/src/server/ttf2eot.d.ts +3 -0
- package/src/server/worker.ts +166 -0
- package/src/server/workspace.ts +242 -0
- package/src/shared/anchors.ts +69 -0
- package/src/shared/assets.ts +154 -0
- package/src/shared/export.ts +34 -0
- package/src/shared/media.ts +33 -0
- package/src/shared/projects.ts +19 -0
- package/src/shared/selection.ts +94 -0
- package/src/shared/skill-index.ts +14 -0
- package/src/shared/starters.ts +19 -0
- package/src/shared/templates.ts +18 -0
- package/src/shared/themes.ts +24 -0
- package/src/shared/types.ts +39 -0
- package/src/template/index.ts +27 -0
- package/src/themes/index.ts +3 -0
- package/src/themes/neutral.ts +20 -0
- package/src/themes/types.ts +110 -0
- package/starter/assets/brand/wordmark.png +0 -0
- package/starter/assets/fonts/InterUI-LICENSE.txt +93 -0
- package/starter/assets/fonts/InterUI-Medium.ttf +0 -0
- package/starter/assets/fonts/InterUI-Regular.ttf +0 -0
- package/starter/assets/fonts/InterUI-source.json +19 -0
- package/starter/assets/fonts/OpenDocMono-Regular.ttf +0 -0
- package/starter/assets/fonts/OpenDocSans-Italic.ttf +0 -0
- package/starter/assets/fonts/OpenDocSans-Regular.ttf +0 -0
- package/starter/assets/fonts/OpenDocSans-Semibold.ttf +0 -0
- package/starter/assets/fonts/OpenDocSans-SemiboldItalic.ttf +0 -0
- package/starter/assets/fonts/OpenDocSerif-Italic.ttf +0 -0
- package/starter/assets/fonts/OpenDocSerif-Regular.ttf +0 -0
- package/starter/assets/fonts/OpenDocSerif-Semibold.ttf +0 -0
- package/starter/assets/fonts/OpenDocSerif-SemiboldItalic.ttf +0 -0
- package/starter/assets/fonts/SourceCode-LICENSE.md +93 -0
- package/starter/assets/fonts/SourceSans-LICENSE.md +93 -0
- package/starter/assets/fonts/SourceSerif-LICENSE.md +93 -0
- package/starter/assets/fonts/geist/OFL.txt +93 -0
- package/starter/assets/fonts/geist/asset.json +7 -0
- package/starter/assets/fonts/geist/files/1a9874b3be0fc168692a3d2327bccb4d28835653d3b91537a755296a467a83e3.ttf +0 -0
- package/starter/assets/fonts/geist/files/a8eefb873ba9c9020665f8a98302697ce1f3b79ab2deef6ee508c0ca6a82e876.ttf +0 -0
- package/starter/assets/fonts/geist/files/ccce59465ae5c61930ada5453834f60500fbd95084d85db63e0e65fad0125455.ttf +0 -0
- package/starter/assets/fonts/geist/files/f5e95110d70593672515080bee9148463ada0a7f77b89ed65a3d43cb2b0ff83a.pdf +0 -0
- package/starter/assets/fonts/geist/revisions/9a2bc12fb2f23cb27bc227087e63e1407bb804ee0586480bd6b7966ec69fb474.json +60 -0
- package/starter/assets/fonts/inter/OFL.txt +93 -0
- package/starter/assets/fonts/inter/asset.json +7 -0
- package/starter/assets/fonts/inter/files/1b08e7fc267a5c7e1d614100f604b83e7e8a0be241f0f288faa2b3ac93a683ba.ttf +0 -0
- package/starter/assets/fonts/inter/files/5b6f0c6f26e5c554a64cdcc3a9b5d802b7f9aec6206f1dbcfcdcad7b5860a2a9.ttf +0 -0
- package/starter/assets/fonts/inter/files/957db8560d510a198a7d0333fae7b6b444b00c20801581126273978d778eb3c3.pdf +0 -0
- package/starter/assets/fonts/inter/files/b37284b5701b6b168dfc770aa1a4ac492106422fd3ba76bc7641e37434e8019c.ttf +0 -0
- package/starter/assets/fonts/inter/files/c1811d32ac0f6eed1bbf57529f2ecdfc6c717d48a969dd864942436315a1b198.ttf +0 -0
- package/starter/assets/fonts/inter/files/e7a1aaf7eda9f2fad4131725fa556265ec75ca7b2d756260173a040363e8d4f7.ttf +0 -0
- package/starter/assets/fonts/inter/files/ef8f755d933b9310804cc9152f1f18cb2ac460d6b05054ec913d889c9f11f79e.ttf +0 -0
- package/starter/assets/fonts/inter/revisions/600391517c413963b71e278a57c26c40366c81fa3939a6b9755f446206766d12.json +99 -0
- package/starter/assets/fonts/inter/source.json +57 -0
- package/starter/assets/fonts/lato/OFL.txt +93 -0
- package/starter/assets/fonts/lato/asset.json +7 -0
- package/starter/assets/fonts/lato/files/4a6b566dbb28adb473a8789ce5169306f42f0c8a070ac92bae93636f36348b0d.pdf +0 -0
- package/starter/assets/fonts/lato/files/5adeb6b334d8fb99ef053bc052b952773d544315e0e1d668a12c0ce8bd51375c.ttf +0 -0
- package/starter/assets/fonts/lato/files/62c1b7f0d2e74b45960154c3520efc337b553db0961bfdc950d5618334596cc8.ttf +0 -0
- package/starter/assets/fonts/lato/files/71b8b7decbe75a881ed267be539d402bd1e9420b799658aada4e0d1bd5af803c.ttf +0 -0
- package/starter/assets/fonts/lato/files/8a0aace75d33794eece4b28187bfc1df0bbd2888b5d8a56e01788c8d65d16be1.ttf +0 -0
- package/starter/assets/fonts/lato/files/d636e4683231f931eda222d588e944d082bfd3bdba02f928bee461c0f185b251.ttf +0 -0
- package/starter/assets/fonts/lato/files/e399c44efe1387100531d26c7e4800c5d12251b890d6654a3098c7c679cb1786.ttf +0 -0
- package/starter/assets/fonts/lato/revisions/49ccb93400a9d466fab7d9843b1ecf8916ec6d47a475dd79a597a22eb39616bc.json +99 -0
- package/starter/assets/fonts/lato/source.json +57 -0
- package/starter/assets/fonts/merriweather/OFL.txt +93 -0
- package/starter/assets/fonts/merriweather/asset.json +7 -0
- package/starter/assets/fonts/merriweather/files/1c54f91b910454251c4c2b7bd4e472e1abf265fba7ca3c0ef2eee2f41324099e.ttf +0 -0
- package/starter/assets/fonts/merriweather/files/8bde8da2bb7f0265e27ba0481f70bb48d0f98a976c145f2f239c648ddd6532e0.pdf +0 -0
- package/starter/assets/fonts/merriweather/files/90b7db4460fcd1a5ca49575c2668a793f3cd6447664d312a068d690e1c01e6bc.ttf +0 -0
- package/starter/assets/fonts/merriweather/files/afff81272b7653417bb6f8bef57add055b1f9fda36f27eba5f32b40752bd08da.ttf +0 -0
- package/starter/assets/fonts/merriweather/files/e029d3b71e5bae3877c73f4f2b15af28db16593d49b0aed2a328d37ff7075846.ttf +0 -0
- package/starter/assets/fonts/merriweather/files/e9864a6790bf712a04e20f3662b206a1535186ed3e877fd859dd5fb9682335df.ttf +0 -0
- package/starter/assets/fonts/merriweather/files/fa71baebdd20a7d0de2e5e445a5922530fe9e1d740efbe791f113b682d3cb093.ttf +0 -0
- package/starter/assets/fonts/merriweather/revisions/1888e390b3e4f38a3d7cd2dc1bb805aeb6ce13f986a97656f0265fd436bc91d2.json +99 -0
- package/starter/assets/fonts/merriweather/source.json +57 -0
- package/starter/assets/fonts/open-sans/OFL.txt +92 -0
- package/starter/assets/fonts/open-sans/asset.json +7 -0
- package/starter/assets/fonts/open-sans/files/1bc0594a83762b2c25d38915a34464b7fec6088298ca22d151757bf98d6700ec.ttf +0 -0
- package/starter/assets/fonts/open-sans/files/47ed1cfaa7ffca04a04ab850b2938fd52c09d1b44cfa3e2980878e166b0cbd87.ttf +0 -0
- package/starter/assets/fonts/open-sans/files/574939af301f07df8e21cfff279465c5981dd9d9cf62086f7515897df951c6f5.pdf +0 -0
- package/starter/assets/fonts/open-sans/files/6d3884d0d57c1b67e9c50c54eca7b69c535c114e76bd7a9cfda0258588185553.ttf +0 -0
- package/starter/assets/fonts/open-sans/files/733eb93b167e6d45de09aa768f6c0355647c2c26f5416dbc7407a08ed41e81c6.ttf +0 -0
- package/starter/assets/fonts/open-sans/files/75367e6da7d914eaed87883ba51b2a2b5816b5cdbb39f96ec5c81a5b032bfd5a.ttf +0 -0
- package/starter/assets/fonts/open-sans/files/ff4fdc11204e0edd14e9a0bb6c374b847a9093b0ec2c16702e03afca79ac4ef7.ttf +0 -0
- package/starter/assets/fonts/open-sans/revisions/bbbe3a4915b9bccbc883c0decb4097511c43b6bd09ae22a1516aff128c219bc5.json +99 -0
- package/starter/assets/fonts/open-sans/source.json +57 -0
- package/starter/assets/fonts/roboto/OFL.txt +93 -0
- package/starter/assets/fonts/roboto/asset.json +7 -0
- package/starter/assets/fonts/roboto/files/22d45d989248a624252b8382067ac56550212fa675dcdbaf12f03d297dd87a58.pdf +0 -0
- package/starter/assets/fonts/roboto/files/35757eaa996b3359022f47f164a67ee9eac04971af24c5b8fbd4b89e844ff190.ttf +0 -0
- package/starter/assets/fonts/roboto/files/4d3035883c531846bd1ce2dc89f36d932e72dc114f56062c7e3a9cdd74f3d3ea.ttf +0 -0
- package/starter/assets/fonts/roboto/files/be7639306a4fc4a02ce2ae2ff59eb1335e4db4a7379dd0a384ed7cc053817789.ttf +0 -0
- package/starter/assets/fonts/roboto/files/d2920cbb1b60a3fd11fbf22049286e43a6baf522d37fdf1e7c89562319bcfea5.ttf +0 -0
- package/starter/assets/fonts/roboto/files/dece7c71bbe61710787f0839c722c65e87355dd2eb4a823e6b5488121ff81e4b.ttf +0 -0
- package/starter/assets/fonts/roboto/files/f478ba88b0292e685e487901dfbb1401457d32d6ebee4030cdfd5698235bffa8.ttf +0 -0
- package/starter/assets/fonts/roboto/revisions/bda5e2d84c17313373dd2dbf3e64fe0dd450c7e1b59e6929e69557e122fe976e.json +99 -0
- package/starter/assets/fonts/roboto/source.json +57 -0
- package/starter/assets/logos/opendoc/asset.json +6 -0
- package/starter/assets/logos/opendoc/files/831d5ccd9eb6709cc8439ea257c03d81452e81a28a3d1eedbd6a3b7daff687b6.png +0 -0
- package/starter/assets/logos/opendoc/revisions/834dde8926ddb81de687254195a168bb13bfb77803307f1257de1f2228be63b2.json +33 -0
- package/starter/assets/ui-fonts/geist/OFL.txt +93 -0
- package/starter/assets/ui-fonts/geist/geist-latin-ext-wght-italic.woff2 +0 -0
- package/starter/assets/ui-fonts/geist/geist-latin-ext-wght-normal.woff2 +0 -0
- package/starter/assets/ui-fonts/geist/geist-latin-wght-italic.woff2 +0 -0
- package/starter/assets/ui-fonts/geist/geist-latin-wght-normal.woff2 +0 -0
- package/starter/assets/ui-fonts/geist/source.json +26 -0
- package/starter/documents/welcome/assets.json +7 -0
- package/starter/documents/welcome/index.tsx +160 -0
- package/starter/documents/welcome/media/.gitkeep +0 -0
- package/starter/documents/welcome/media/paper-architecture/image.png +0 -0
- package/starter/documents/welcome/media/paper-architecture/meta.json +9 -0
- package/starter/documents/welcome/media/paper-architecture/prompt.txt +1 -0
- package/starter/documents/welcome/media/studio-rhythm/chart.svg +2343 -0
- package/starter/documents/welcome/media/studio-rhythm/data.json +234 -0
- package/starter/documents/welcome/media/studio-rhythm/generation.json +9 -0
- package/starter/documents/welcome/media/studio-rhythm/image.png +0 -0
- package/starter/documents/welcome/media/studio-rhythm/meta.json +11 -0
- package/starter/documents/welcome/media/studio-rhythm/recipe.py +79 -0
- package/starter/documents/welcome/theme.tsx +5 -0
- package/starter/documents/welcome-presentation/assets.json +7 -0
- package/starter/documents/welcome-presentation/index.tsx +166 -0
- package/starter/documents/welcome-presentation/media/.gitkeep +0 -0
- package/starter/documents/welcome-presentation/media/paper-architecture/image.png +0 -0
- package/starter/documents/welcome-presentation/media/paper-architecture/meta.json +9 -0
- package/starter/documents/welcome-presentation/media/paper-architecture/prompt.txt +1 -0
- package/starter/documents/welcome-presentation/media/studio-rhythm/chart.svg +1336 -0
- package/starter/documents/welcome-presentation/media/studio-rhythm/data.json +234 -0
- package/starter/documents/welcome-presentation/media/studio-rhythm/generation.json +9 -0
- package/starter/documents/welcome-presentation/media/studio-rhythm/image.png +0 -0
- package/starter/documents/welcome-presentation/media/studio-rhythm/meta.json +13 -0
- package/starter/documents/welcome-presentation/media/studio-rhythm/recipe.py +49 -0
- package/starter/documents/welcome-presentation/theme.tsx +5 -0
- package/starter/projects.json +17 -0
- package/starter/templates/AGENTS.md +9 -0
- package/starter/templates/_shared/BusinessLogo.tsx +14 -0
- package/starter/templates/_shared/Pricing.tsx +40 -0
- package/starter/templates/_shared/commerce.ts +93 -0
- package/starter/templates/brand-guidelines/AGENTS.md +32 -0
- package/starter/templates/brand-guidelines/index.tsx +62 -0
- package/starter/templates/brand-guidelines/preview.tsx +181 -0
- package/starter/templates/brand-guidelines/starter.tsx +179 -0
- package/starter/templates/brand-guidelines/template.json +15 -0
- package/starter/templates/business-proposal/AGENTS.md +13 -0
- package/starter/templates/business-proposal/README.md +36 -0
- package/starter/templates/business-proposal/data.json +37 -0
- package/starter/templates/business-proposal/examples/long.json +142 -0
- package/starter/templates/business-proposal/examples/sparse.json +17 -0
- package/starter/templates/business-proposal/examples/typical.json +37 -0
- package/starter/templates/business-proposal/index.tsx +59 -0
- package/starter/templates/business-proposal/preview.tsx +47 -0
- package/starter/templates/business-proposal/schema.ts +14 -0
- package/starter/templates/business-proposal/starter.tsx +18 -0
- package/starter/templates/business-proposal/template.json +11 -0
- package/starter/templates/company-profile/AGENTS.md +48 -0
- package/starter/templates/company-profile/index.tsx +69 -0
- package/starter/templates/company-profile/preview.tsx +185 -0
- package/starter/templates/company-profile/starter.tsx +186 -0
- package/starter/templates/company-profile/template.json +15 -0
- package/starter/templates/consulting-report/AGENTS.md +11 -0
- package/starter/templates/consulting-report/README.md +13 -0
- package/starter/templates/consulting-report/RESEARCH.md +10 -0
- package/starter/templates/consulting-report/index.tsx +44 -0
- package/starter/templates/consulting-report/preview.tsx +39 -0
- package/starter/templates/consulting-report/starter.tsx +15 -0
- package/starter/templates/consulting-report/template.json +11 -0
- package/starter/templates/editorial-essay/AGENTS.md +11 -0
- package/starter/templates/editorial-essay/README.md +11 -0
- package/starter/templates/editorial-essay/index.tsx +30 -0
- package/starter/templates/editorial-essay/preview.tsx +26 -0
- package/starter/templates/editorial-essay/starter.tsx +15 -0
- package/starter/templates/editorial-essay/template.json +11 -0
- package/starter/templates/executive-brief/AGENTS.md +9 -0
- package/starter/templates/executive-brief/README.md +11 -0
- package/starter/templates/executive-brief/index.tsx +33 -0
- package/starter/templates/executive-brief/preview.tsx +37 -0
- package/starter/templates/executive-brief/starter.tsx +11 -0
- package/starter/templates/executive-brief/template.json +11 -0
- package/starter/templates/image-story/AGENTS.md +37 -0
- package/starter/templates/image-story/index.tsx +106 -0
- package/starter/templates/image-story/preview.tsx +33 -0
- package/starter/templates/image-story/starter.tsx +24 -0
- package/starter/templates/image-story/template.json +13 -0
- package/starter/templates/invoice/AGENTS.md +13 -0
- package/starter/templates/invoice/README.md +40 -0
- package/starter/templates/invoice/data.json +61 -0
- package/starter/templates/invoice/examples/long.json +241 -0
- package/starter/templates/invoice/examples/sparse.json +33 -0
- package/starter/templates/invoice/examples/typical.json +61 -0
- package/starter/templates/invoice/index.tsx +57 -0
- package/starter/templates/invoice/preview.tsx +12 -0
- package/starter/templates/invoice/schema.ts +45 -0
- package/starter/templates/invoice/starter.tsx +12 -0
- package/starter/templates/invoice/template.json +11 -0
- package/starter/templates/literary-text/AGENTS.md +9 -0
- package/starter/templates/literary-text/README.md +11 -0
- package/starter/templates/literary-text/index.tsx +31 -0
- package/starter/templates/literary-text/preview.tsx +20 -0
- package/starter/templates/literary-text/starter.tsx +11 -0
- package/starter/templates/literary-text/template.json +11 -0
- package/starter/templates/magazine-feature/AGENTS.md +11 -0
- package/starter/templates/magazine-feature/README.md +13 -0
- package/starter/templates/magazine-feature/index.tsx +41 -0
- package/starter/templates/magazine-feature/preview.tsx +34 -0
- package/starter/templates/magazine-feature/starter.tsx +15 -0
- package/starter/templates/magazine-feature/template.json +11 -0
- package/starter/templates/monthly-report/AGENTS.md +11 -0
- package/starter/templates/monthly-report/README.md +24 -0
- package/starter/templates/monthly-report/data.json +131 -0
- package/starter/templates/monthly-report/examples/long.json +519 -0
- package/starter/templates/monthly-report/examples/sparse.json +20 -0
- package/starter/templates/monthly-report/examples/typical.json +37 -0
- package/starter/templates/monthly-report/index.tsx +92 -0
- package/starter/templates/monthly-report/preview.tsx +14 -0
- package/starter/templates/monthly-report/schema.ts +127 -0
- package/starter/templates/monthly-report/starter.tsx +13 -0
- package/starter/templates/monthly-report/template.json +11 -0
- package/starter/templates/pitch-deck/AGENTS.md +32 -0
- package/starter/templates/pitch-deck/index.tsx +46 -0
- package/starter/templates/pitch-deck/preview.tsx +142 -0
- package/starter/templates/pitch-deck/starter.tsx +140 -0
- package/starter/templates/pitch-deck/template.json +15 -0
- package/starter/templates/proposal-deck/AGENTS.md +25 -0
- package/starter/templates/proposal-deck/index.tsx +52 -0
- package/starter/templates/proposal-deck/preview.tsx +172 -0
- package/starter/templates/proposal-deck/starter.tsx +168 -0
- package/starter/templates/proposal-deck/template.json +7 -0
- package/starter/templates/quotation/AGENTS.md +13 -0
- package/starter/templates/quotation/README.md +42 -0
- package/starter/templates/quotation/data.json +64 -0
- package/starter/templates/quotation/examples/long.json +272 -0
- package/starter/templates/quotation/examples/sparse.json +31 -0
- package/starter/templates/quotation/examples/typical.json +64 -0
- package/starter/templates/quotation/index.tsx +51 -0
- package/starter/templates/quotation/preview.tsx +12 -0
- package/starter/templates/quotation/schema.ts +27 -0
- package/starter/templates/quotation/starter.tsx +12 -0
- package/starter/templates/quotation/template.json +11 -0
- package/starter/templates/scientific-paper/AGENTS.md +11 -0
- package/starter/templates/scientific-paper/README.md +13 -0
- package/starter/templates/scientific-paper/index.tsx +47 -0
- package/starter/templates/scientific-paper/preview.tsx +43 -0
- package/starter/templates/scientific-paper/starter.tsx +15 -0
- package/starter/templates/scientific-paper/template.json +11 -0
- package/starter/themes/Specimen.tsx +54 -0
- package/starter/themes/civic-spectrum/components.tsx +92 -0
- package/starter/themes/civic-spectrum/design.md +70 -0
- package/starter/themes/civic-spectrum/index.ts +57 -0
- package/starter/themes/civic-spectrum/preview.tsx +66 -0
- package/starter/themes/field-manual/components.tsx +106 -0
- package/starter/themes/field-manual/design.md +72 -0
- package/starter/themes/field-manual/index.ts +57 -0
- package/starter/themes/field-manual/preview.tsx +82 -0
- package/starter/themes/index.ts +3 -0
- package/starter/themes/mckinsey-consulting/components.tsx +69 -0
- package/starter/themes/mckinsey-consulting/design.md +68 -0
- package/starter/themes/mckinsey-consulting/index.ts +60 -0
- package/starter/themes/mckinsey-consulting/preview.tsx +53 -0
- package/starter/themes/neutral/design.md +35 -0
- package/starter/themes/neutral/index.ts +21 -0
- package/starter/themes/neutral/preview.tsx +4 -0
- package/starter/themes/opendoc-neutral/components.tsx +77 -0
- package/starter/themes/opendoc-neutral/design.md +70 -0
- package/starter/themes/opendoc-neutral/index.ts +54 -0
- package/starter/themes/opendoc-neutral/preview.tsx +43 -0
- package/starter/themes/types.ts +3 -0
- package/tsconfig.workspace.json +24 -0
- package/vendor/formepdf/LICENSE +21 -0
- package/vendor/formepdf/README.md +97 -0
- package/vendor/formepdf/font-subset.patch +228 -0
- package/vendor/formepdf/text-writer.patch +507 -0
package/docs/MEDIA.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Document media
|
|
2
|
+
|
|
3
|
+
Each document owns its prepared media. OpenDoc embeds and previews those visuals; the project and coding agent manage original reference material. There is no source library or required source-folder layout. Reusable logos and fonts belong in the shared **Logos** and **Fonts** tabs of **Media & Assets**; see [Assets](ASSETS.md). Do not copy those families into each document's media folder.
|
|
4
|
+
|
|
5
|
+
Run commands from the workspace root. The paths below refer to that workspace, not the installed package containing this guide.
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
documents/cooling-curves/
|
|
9
|
+
index.tsx
|
|
10
|
+
media/
|
|
11
|
+
cooling-curves/
|
|
12
|
+
meta.json title, description, file and relationships
|
|
13
|
+
image.png the embedding image
|
|
14
|
+
data.json rows prepared for this chart
|
|
15
|
+
recipe.py optional reproducible preparation
|
|
16
|
+
generation.json recorded image and input hashes
|
|
17
|
+
temperature-drop/
|
|
18
|
+
... another view of the same source
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Original datasets, supplied PDFs, previous drafts, and reference documents stay wherever the surrounding project manages them. Do not copy or move originals just to satisfy OpenDoc. Several documents may use the same original. Prepared selections, calculations, chart specifications, and editable diagram files belong beside the image that uses them. The coding agent interprets the originals, prepares visuals, and checks evidence and attribution.
|
|
22
|
+
|
|
23
|
+
## Describe a visual
|
|
24
|
+
|
|
25
|
+
Every `media/<id>/meta.json` requires `title`, `description`, `file`, and `kind`. IDs use lowercase words separated by single hyphens. `kind` is `photo`, `illustration`, `chart`, `diagram`, or `image`.
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"title": "Temperature over time",
|
|
30
|
+
"description": "Two illustrative cooling curves from one synthetic dataset.",
|
|
31
|
+
"file": "image.png",
|
|
32
|
+
"kind": "chart",
|
|
33
|
+
"alt": "Cup A falls from 80 to 53 degrees Celsius; Cup B falls to 62.",
|
|
34
|
+
"sources": ["Project teaching dataset; synthetic, not measured"],
|
|
35
|
+
"data": "data.json",
|
|
36
|
+
"recipe": "recipe.py",
|
|
37
|
+
"attribution": "Synthetic teaching example; no experiment was conducted."
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`alt`, `sources`, `data`, `recipe`, and `attribution` are optional. `sources` contains descriptive provenance notes or locations for the author: OpenDoc displays the text but never resolves, downloads, hashes, or requires those files. Existing source-path notes remain valid. `file`, `data`, and `recipe` identify owned files relative to the media item; parent traversal, hidden paths, and symlinks are rejected for these files. Unknown fields are rejected. Titles are limited to 200 characters; descriptions and each source note to 4,000.
|
|
42
|
+
|
|
43
|
+
PNG and JPEG are the supported media embedding formats, up to 50 MB and 100 megapixels. Preserve an SVG or other editable original alongside a PNG export; arbitrary SVG text rendering is not reliable in the current PDF engine. Shared logos have their own SVG/PNG import path with automatic PNG preparation; use [Assets](ASSETS.md) for those. Use an image large enough for its printed size—about 300 pixels per inch for charts—and inspect labels at actual reading size. Keep important chart values in a selectable table as well: raster chart labels are image pixels in the PDF.
|
|
44
|
+
|
|
45
|
+
## Add, generate, and review
|
|
46
|
+
|
|
47
|
+
Use the existing image tool or a suitable chart/diagram tool to produce the visual. The media contract does not choose a generator, run recipes automatically, or install their dependencies. Choose tools already available for the task. Keep any recipe reproducible and resolve its files from its own location. Sample documents are not a required dependency.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npx opendoc media import my-report overview --file /path/to/image.png --title "Overview" --description "The main stages." --kind diagram
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Media imports copy an image and refuse to overwrite an existing media folder. Media is added by the agent from chat attachments, generated visuals, or downloaded images. The app browses these document-owned folders and edits their details; it has no media upload form. An ordinary photograph can consist of only an image and metadata. For generated work, add the prepared data and recipe before recording it. Add provenance notes when useful. Editing a title, description, or other metadata in the app never records a generated visual as reviewed.
|
|
54
|
+
|
|
55
|
+
After generating, review the actual image for values, labels, scales, units, and provenance. Then record the reviewed inputs:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
npx opendoc media record my-report overview
|
|
59
|
+
npx opendoc media check my-report overview
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`record` snapshots file hashes; it does not generate or validate a chart. Never use it just to silence a stale warning. Changing prepared data, a recipe, or a recorded image marks the item as needing regeneration. Regenerate and review the affected images, then record their new versions. Original-source changes are the author’s responsibility; OpenDoc does not infer whether they require a new chart or a revised argument. Images with inputs but no generation record also require review and recording.
|
|
63
|
+
|
|
64
|
+
## Place it in the PDF
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
<Figure id="overview-figure" caption="The main stages." sourceNote="Based on the supplied reference.">
|
|
68
|
+
<Media item="overview" width={460} />
|
|
69
|
+
</Figure>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Import `Media` from `opendoc` with the other document primitives. Width is a positive value in PDF points. An optional positive `height` sets a maximum bound; the image keeps its aspect ratio. Alternative text defaults to metadata, or can be supplied as `alt`. Preserve the enclosing Figure ID when replacing an image so feedback stays attached.
|
|
73
|
+
|
|
74
|
+
The document cannot export a stale or unrecorded derived image. Its previous successful preview remains visible, with the current error. After recording, export and review the actual PDF, including caption placement and adjacent page breaks. Raw `Image` and vector `Svg` primitives remain available, but only managed media items appear in the Media browser and receive these provenance checks. For pictures inside SVG layouts, use the frame support below.
|
|
75
|
+
|
|
76
|
+
## Image frames and full-page artwork
|
|
77
|
+
|
|
78
|
+
Use `Media` when an image should keep its natural proportions inside a maximum bound. Use `MediaFrame` when the layout needs an **exact rectangle**. It supports `cover` (default: proportional crop) or `contain` (whole image, transparent unused space), normalized `position` (`0` left/top, `0.5` center, `1` right/bottom), and an optional `radius` in PDF points. Width and height are required. Dimensions in `style` do not override them.
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
import { Block, Figure, MediaFrame, Page, Heading, Paragraph } from 'opendoc';
|
|
82
|
+
|
|
83
|
+
<Figure id="opening-scene" caption="A supplied photograph of the site.">
|
|
84
|
+
<MediaFrame item="site" width={490} height={240}
|
|
85
|
+
fit="cover" position={{x:0.65,y:0.5}} />
|
|
86
|
+
</Figure>
|
|
87
|
+
|
|
88
|
+
// A circular crop. Use containment for diagrams and images whose labels must stay visible.
|
|
89
|
+
<Block id="portrait"><MediaFrame item="portrait" width={160} height={160} radius={80}/></Block>
|
|
90
|
+
|
|
91
|
+
// Artwork reaches the page edges; the margin only reserves room for the native text.
|
|
92
|
+
<Page size="A4" margin={48} backgroundMedia="cover-art" backgroundSize="cover">
|
|
93
|
+
<Heading id="cover-title" level={1} style={{color:'#ffffff',fontSize:54}}>A short title</Heading>
|
|
94
|
+
<Paragraph id="cover-subtitle" style={{color:'#ffffff'}}>Choose quiet image space for the words.</Paragraph>
|
|
95
|
+
</Page>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Frames and `backgroundMedia` use the same document-owned media IDs, freshness checks, and usage records as `Media`. Frames inherit their enclosing `Block` or `Figure` for feedback; a page background records page-level usage without a block selection. Missing named images fail rendering. You cannot combine `backgroundMedia` and `backgroundImage` on one page. For an unmanaged local PNG/JPEG, `backgroundImage="./image.png"` resolves relative to the authored document; it does not add managed provenance. Managed backgrounds default to centered `cover`; `backgroundSize="contain"` preserves the whole picture, and `backgroundPosition` accepts `center` or a corner such as `top-left`. OpenDoc prepares these proportional local-image backgrounds before sending them to the native page layer, which otherwise stretches images. Explicit `fill` retains stretching; remote URLs retain the native renderer's behavior.
|
|
99
|
+
|
|
100
|
+
The installed renderer prepares cropped/rounded frames as bounded PNGs, leaving the originals intact and surrounding text selectable. It uses up to 216 dpi with a 4096-pixel edge limit; this does not add detail to a low-resolution source. You do not need to read files, encode base64, import a native addon, or clip an oversized `Image` yourself. Native SVG `<image>` content can disappear without an export error, so use `MediaFrame` for image composition instead. Do not rasterize an entire text page to work around image placement.
|
|
101
|
+
|
|
102
|
+
For starting compositions, read workspace-root `templates/image-story/AGENTS.md` and view its real PDF in **Templates**. It demonstrates full bleed, vertical/horizontal halves, panoramas with insets, diptychs, collage, and floating text panels. You can use the primitives without using that template. Generate or choose images for their intended aspect ratio and quiet text areas; never crop away a face, important object, label, or evidence merely to match a frame. Always inspect the rendered PDF for image visibility, crop, contrast, caption placement, and text extraction. A successful export is not a visual review.
|
|
103
|
+
|
|
104
|
+
## Browse and continue with Codex
|
|
105
|
+
|
|
106
|
+
The **Media** tab in **Media & Assets** lists visuals across documents, searchable by title, description, kind, and document. Existing Media links keep working. Byte-identical images share one browser card; ownership, metadata, and source relationships stay separate. A filename match alone never merges images. The detail view shows their document, current PDF usage, prepared files, and optional source notes.
|
|
107
|
+
|
|
108
|
+
File downloads are limited to document-owned media files. Original references are shown only as source notes. Selecting a media item updates `.opendoc/current.json` with its folder, metadata, and input status so Codex can work on the right item. Selection remains observed context, never an instruction to change the document. Metadata is editable in the app or through ordinary local files and the coding agent; prepared data, recipes, and regeneration remain agent work.
|
|
109
|
+
|
|
110
|
+
## Existing projects
|
|
111
|
+
|
|
112
|
+
Existing original files and media folders remain in place. Older generation records may contain original-source hashes; those remain historical information and no longer participate in media checks. Current checks cover only the image and its own prepared data and recipe. Normal document imports still participate in dependency tracking and rerendering. Citations, references, and source notes in PDFs continue to work independently of file organization.
|
package/docs/PROJECTS.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Projects
|
|
2
|
+
|
|
3
|
+
A workspace contains projects, and every newly created document must have a project. A new workspace starts with **Getting started** and the **Welcome to OpenDoc** document and welcome presentation. Paths in this guide refer to the workspace root; the installed guide itself lives in `node_modules/opendoc/docs`.
|
|
4
|
+
|
|
5
|
+
## In the app
|
|
6
|
+
|
|
7
|
+
Use the **+ beside Projects in the sidebar** to create a project. A name is required; a default theme is optional. Choose a project in the sidebar to create and find its documents. **Documents** shows all documents across the workspace, with project links beneath their previews. There is no separate projects overview page. On narrow screens, **Open sidebar** reveals the full project list and creation button. **Project settings** changes its name or default theme. **Move to project** changes an existing document’s membership. A project can be deleted only when it has no documents.
|
|
8
|
+
|
|
9
|
+
**Create document** and **Create presentation** provide agent prompts carrying the current project, without a title, purpose, or theme form. **Use this template** and theme-based creation carry the selected layout or theme in the prompt. The agent follows [opendoc-create](../.agents/skills/opendoc-create/SKILL.md), resolves any missing project from the brief or current context, and asks when a meaningful design preference is unclear. Naming the skill is optional. Creation requires project membership; the CLI uses an explicit theme override, then the project default, then Neutral. Those fallbacks apply after the agent resolves the user's direction. Explicitly requested starter examples retain their own fallback themes. Changing a project default applies to future work. Moving a document or presentation keeps its existing theme.
|
|
10
|
+
|
|
11
|
+
Switch between **Gallery** and **List** beside the document count in Documents or any project. List shows a compact first-page PDF thumbnail, name, document details, and a project link in Documents. The browser remembers one shared view preference. Switching views preserves the current search.
|
|
12
|
+
|
|
13
|
+
The **…** menu on every card or list row offers **Rename**, **Duplicate**, **Move to project…**, and **Delete**. These actions also appear in the reader’s **Document options** menu. Rename changes the library name; the PDF title stays authored in source. Duplicate copies saved source, local media, and feedback into the same project, rebinding supplied template instance IDs and local data paths. It does not include unsaved browser drafts. Delete asks for confirmation and shows an **Undo** notification. Its saved folder and receipt remain recoverable in `.opendoc/trash/<restore-id>/`; existing PDF exports remain in `output/`. Restore refuses to overwrite a reused ID and requires the original project to exist.
|
|
14
|
+
|
|
15
|
+
Opening a document hides the workspace sidebar and gives the reader the full window. The header’s back arrow returns to the project, Documents, or other workspace view you opened from and restores navigation. A directly opened document returns to its project, or Documents if it has no project. The same pattern applies on mobile.
|
|
16
|
+
|
|
17
|
+
If files from an older workspace have no assignment, **Documents** keeps them accessible and offers **Choose a project** beneath each unassigned document. OpenDoc does not invent a replacement project or silently discard these files.
|
|
18
|
+
|
|
19
|
+
## Local files
|
|
20
|
+
|
|
21
|
+
`projects.json` owns project names, optional default themes, document assignments, and optional library names:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"version": 1,
|
|
26
|
+
"projects": [
|
|
27
|
+
{ "id": "getting-started", "name": "Getting started", "defaultTheme": "neutral" }
|
|
28
|
+
],
|
|
29
|
+
"assignments": { "welcome": "getting-started" },
|
|
30
|
+
"names": { "welcome": "Workspace guide" }
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Documents remain at `documents/<id>/index.tsx`. Grouping is separate from physical folders. Renaming projects or documents and moving documents do not move files or rewrite imports, media, comments, or PDF contents. Document IDs are unique across the workspace. Templates and themes remain shared resources.
|
|
35
|
+
|
|
36
|
+
The creation service records membership before exposing a new document entry. Browser and command-line changes serialize through a local lock and atomically replace the manifest. Invalid registries are reported without being overwritten. If a process terminates while holding the project lock, the next operation recovers it only after confirming the owner is no longer running. An active or unrecognized lock remains protected; retry after the other operation finishes rather than deleting its lock blindly.
|
|
37
|
+
|
|
38
|
+
The optional `names` map is keyed by stable document ID. Without an override, the app uses the PDF metadata title. The generated `.opendoc/current.json` distinguishes the library `name` from the authored `title` and includes the active project and its default theme alongside the document or selection. Do not edit this generated context by hand.
|
|
39
|
+
|
|
40
|
+
## Commands
|
|
41
|
+
|
|
42
|
+
Run from the workspace root, or add `--workspace <path>`. Use `npx opendoc --help` for the command list and `--json` for machine-readable output.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npx opendoc projects list
|
|
46
|
+
npx opendoc projects create client-work --name "Client work" --theme neutral
|
|
47
|
+
npx opendoc projects update client-work --name "Client publications" --theme civic-spectrum
|
|
48
|
+
npx opendoc projects update client-work --theme none
|
|
49
|
+
npx opendoc create proposal --project client-work --title "A proposal"
|
|
50
|
+
npx opendoc create brief --project client-work --title "A technical brief" --theme field-manual
|
|
51
|
+
npx opendoc projects assign proposal client-work
|
|
52
|
+
npx opendoc projects delete empty-project
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
A missing or unknown project prevents creation before any document folder is written. Use the normal creation command for bespoke documents too, then replace its editable source. If importing existing document folders, assign each one using the project command. Preserve unrelated assignments and stable document IDs.
|
package/docs/PROSE.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Continuous prose
|
|
2
|
+
|
|
3
|
+
`Prose` is an optional OpenDoc region for continuous reading text. The Editorial essay template uses it for its body. Existing documents retain their paragraph behavior unless they explicitly use this region.
|
|
4
|
+
|
|
5
|
+
It leaves the first paragraph flush left and indents subsequent paragraphs by 1½ em. Paragraph gaps default to zero; set `paragraphGap` to a non-negative number of points for extra spacing. Editorial essay uses `<Prose paragraphGap={6}>`. Headings, section starts, figures, tables, callouts, lists, and explicit breaks restart the reading sequence. Section lead paragraphs stay flush; their following paragraphs indent. Captions, tables, and reference entries do not receive body formatting. Pure author components and fragments expand before formatting, so their paragraph IDs and source locations remain available for comments.
|
|
6
|
+
|
|
7
|
+
## Forme compatibility
|
|
8
|
+
|
|
9
|
+
Forme 0.20.1 has no native first-line-indent style. OpenDoc uses an isolated inline U+2003 em-space run, sized to the requested indent. Its measured advance is fixed; an ordinary leading whitespace string is stretchable glue in this engine and does not reliably preserve its width. This is a compatibility shim, not a native Forme feature. No word joiner, tabs, manual line splitting, dependency patch, or full-paragraph padding is involved.
|
|
10
|
+
|
|
11
|
+
The body uses greedy line breaking by default to keep measured text within the column in this renderer. An explicit paragraph `lineBreaking` choice takes precedence. The spacer appears only at the paragraph's beginning; Forme handles all subsequent lines and page fragments. It leaves the body line height unchanged. Searchable and copied text retain the authored words; layout-oriented extraction may include normal indentation spaces.
|
|
12
|
+
|
|
13
|
+
This helper deliberately supports one measured 1½-em indent. Do not generalize it to arbitrary spacing without new PDF coordinate checks: Forme can merge a spacer run that has the same font size as the body and treat it as stretchable whitespace. Do not nest `Prose` regions; sibling regions start separate paragraph sequences. Keep regions within a single document's body. Use a separate region or a structural break to begin a new passage, not blank paragraphs.
|
|
14
|
+
|
|
15
|
+
Regression checks read actual PDF coordinates with the bundled Sans and Serif fonts, check continuation lines across pages, verify heading/figure/section resets, and preserve mixed inline formatting, citations, source locations, and existing non-Prose paragraphs. Recheck the spacer advance and extraction before using a new font or upgrading Forme. Replace this shim with native first-line indentation when the engine supports it and those checks pass.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Selection and quick corrections
|
|
2
|
+
|
|
3
|
+
OpenDoc uses stable component selection for text editing and feedback. A fixed-width bottom bar offers Edit and Comment for the selection; both use the same panel above it. Saved comments have their own bottom-right dock. Hover outlines identify components before clicking. Text selection and copying stay inside the editor; the PDF itself supports component selection, links, navigation, and reading.
|
|
4
|
+
|
|
5
|
+
## Correcting text
|
|
6
|
+
|
|
7
|
+
Click a component to select it without opening a panel. Choose the Edit icon to edit its full text value, or the Comment icon to write feedback. The bar keeps the same dimensions when either panel opens or closes. Valid changes enter a browser draft and update a separately rendered PDF preview. Moving to another component, clicking outside, **Done**, Cmd/Ctrl+Enter, and Escape keep those changes without writing source. A change that crosses source values or generated content must be corrected or reset before leaving the editor. Formatting and structural changes remain agent work.
|
|
8
|
+
|
|
9
|
+
The floating bar keeps the pending count, Undo, Redo, Discard, and Save all together. Consecutive typing in one source value coalesces into history steps; native textarea undo remains available, while Cmd/Ctrl+Z and Shift+Cmd/Ctrl+Z operate on draft history outside text fields. Save all or Cmd/Ctrl+S validates the combined candidate and writes the group. Save errors retain the draft. A successful source save then updates the canonical PDF; only a ready result displays the saved confirmation. Export stays paused while text changes remain unsaved.
|
|
10
|
+
|
|
11
|
+
Drafts and their bounded history survive document navigation and reloads in the same browser tab. If source changes elsewhere, Refresh draft carries forward only edits whose original values and identities still match. Conflicts keep the draft for review. Storage failures retain the in-memory draft and warn before a reload can lose it. The latest saved group has one guarded, server-session-local Undo; later source changes invalidate it instead of overwriting newer work.
|
|
12
|
+
|
|
13
|
+
Open editors remember the source version they came from. Untouched text follows source updates; modified text from an older or unknown version stays available for review without silently becoming a new draft change.
|
|
14
|
+
|
|
15
|
+
A correction replaces text within one proven writable source value and preserves surrounding structure and formatting. Shared local constants update every occurrence, and the draft count counts that shared value once. Mixed formatting stays intact: individual changes must stay inside one existing source value. Imported, computed, and unsupported expressions are available for feedback rather than guessed from their displayed wording.
|
|
16
|
+
|
|
17
|
+
The renderer issues writable targets. Requests do not choose arbitrary files or source spans. The server checks the baseline document revision, PDF hash, source digests, and source ownership; validates all candidate files; and renders a real draft PDF through isolated source overrides. Previewing never changes document source or canonical artifacts. Save stages the validated replacements and uses guarded rollback on a write failure, preserving intervening external changes. These safeguards do not imply a filesystem-wide atomic rename across independent files.
|
|
18
|
+
|
|
19
|
+
## Binding reusable content
|
|
20
|
+
|
|
21
|
+
Native OpenDoc blocks provide content slots. Shared components can declare a caller-owned prop with the transparent `TextSlot` helper:
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Paragraph, TextSlot } from 'opendoc';
|
|
25
|
+
|
|
26
|
+
export function Byline({ author }: { author: string }) {
|
|
27
|
+
return <Paragraph id="byline">
|
|
28
|
+
<TextSlot slot="author" from="author">{author}</TextSlot>
|
|
29
|
+
</Paragraph>;
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
For a validated data template, bind a string in the instance's `provenance.dataFile`:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<TextSlot slot="client-name" field={['client', 'name']}>
|
|
37
|
+
{data.client.name}
|
|
38
|
+
</TextSlot>
|
|
39
|
+
|
|
40
|
+
{data.terms.map(term => <Paragraph id={`term-${term.id}`} key={term.id}>
|
|
41
|
+
<TextSlot slot="text" field={['terms', { id: term.id }, 'text']}>
|
|
42
|
+
{term.text}
|
|
43
|
+
</TextSlot>
|
|
44
|
+
</Paragraph>)}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Slots and record IDs must remain stable through edits and reordering. TextSlot adds no PDF node, style, or text. Bind the original string, not a formatted or computed representation. Data corrections run the existing template parser before saving; import `bindTemplate` from `opendoc/template` for template instances, or `validateTemplateInput` from the same module to wrap an existing parser for optional data components.
|
|
48
|
+
|
|
49
|
+
DataTable accepts transparent TextSlot content within cells. Supply `rowIds` for stable row identities when data can reorder. Cell values without a proven binding remain readable and commentable. Never bind a calculated total to an unrelated raw field merely to enable editing.
|
|
50
|
+
|
|
51
|
+
## Comments and agent context
|
|
52
|
+
|
|
53
|
+
Select any component and choose the Comment icon in the bottom bar to leave feedback. Switching between Edit and Comment keeps their drafts; an unfinished component comment also survives text-preview updates. Submitting closes the composer and leaves a marker. The bottom-right button opens all document comments; markers open comments for a component. Pencil and trash icons edit or delete feedback, and a comment row navigates to its selected component. Clicking outside closes the dock. Edits and deletion check versions; deleted feedback retains its history. Comments persist independently and are anchored against the saved document, even while a text draft is being previewed. New text comments attach to the whole text component; earlier phrase comments retain their anchors.
|
|
54
|
+
|
|
55
|
+
Phrase feedback records the stable block and text slot, original quote, and nearby text. Reflow changes geometry rather than identity. Wording changes relocate a quote only when it remains unambiguous in that same target; otherwise the original feedback stays visible with a changed-text indication. Anonymous multi-field compositions and duplicate slots retain the selected quote as block-level feedback, because their positional identities cannot safely follow reordering. Give reusable fields unique TextSlot names for durable phrase feedback. Existing whole-block comments keep working, and editing never resolves feedback automatically.
|
|
56
|
+
|
|
57
|
+
Read `.opendoc/current.json` immediately before working from a selection. `selection` contains its exact quote and logical range; `selectionCurrent` says whether it matches the current ready revision. `selectedText` identifies its slot and writable source when known. `manualEdit` reports editing activity, the pending edit count, whether a draft is being previewed, the latest saved group, and render status without exposing draft text. Pending comments include `anchorStatus` and their currently resolved selection when available.
|
|
58
|
+
|
|
59
|
+
Treat this as observed context. The user's request authorizes the work. Preserve local corrections, source identities, reference records, and comment history. If the current source has moved on, resolve the intended target before changing it. Do not infer that an agent is running merely because the app is connected.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Layout templates
|
|
2
|
+
|
|
3
|
+
Templates define document architecture: columns, section order, cover composition, and placement. Themes supply the visual system: typography and hierarchy, spacing rhythm, page defaults, running matter, and treatments for tables, figures, and asides. Template values are defaults; `themeType` and `themePage` let a selected theme govern its supported roles without replacing the architecture. See [Themes](THEMES.md). Content remains the writer's prose, data, visuals, and citations. A layout must not impose an argument or a mandatory writing outline.
|
|
4
|
+
|
|
5
|
+
Treat that architecture as an adaptable starting point. The specimen demonstrates a design direction, not a fixed rule system. Adjust title size for a long headline, rebalance spacing, vary image proportions, or reshape a passage when the document benefits. Preserve clear hierarchy and readable flow while allowing variation and creativity. Keep adaptations for one document local; shared changes should preserve other documents' defaults. Native rendering, stable IDs, evidence integrity, and applicable data contracts remain functional requirements.
|
|
6
|
+
|
|
7
|
+
The Templates page discovers ordinary `templates/<id>/` folders containing `template.json` in the workspace root. These editable templates are separate from the installed package that contains this guide. The page’s **Documents** and **Presentations** tabs separate page layouts from 16:9 slide decks. Narrative layouts, validated data reports, and presentation skeletons share the same catalog and creation path. Run commands from the workspace root.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx opendoc templates list
|
|
11
|
+
npx opendoc templates inspect monthly-report
|
|
12
|
+
npx opendoc templates check monthly-report
|
|
13
|
+
npx opendoc templates preview monthly-report
|
|
14
|
+
npx opendoc create my-report --project client-work --template monthly-report --title "Monthly report"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Choose an existing project and catalog template ID. Use `--theme <id>` for an explicit override. Template selection is optional for bespoke documents; `--starter` is a separate set of optional prose examples and cannot be combined with `--template`.
|
|
18
|
+
|
|
19
|
+
These commands work in both editions without a browser. `check` validates the descriptor and renders the Neutral specimen with the same format/layout checks as the catalog. `preview` additionally writes `output/templates/<id>.pdf` with source freshness checks. For page images, extracted text, and structured review evidence, use `npx opendoc review --template <id> --json`, then inspect its returned artifacts. Headless theme/template creation and reuse stay in the remote workspace; the recipient can review the specimen PDF without installing OpenDoc. See [Headless](HEADLESS.md#create-themes-and-templates-remotely).
|
|
20
|
+
|
|
21
|
+
Each catalog folder contains:
|
|
22
|
+
|
|
23
|
+
- `AGENTS.md`: brief, qualitative guidance on the design's character and useful defaults, explicitly allowing content-led variation and giving examples. Distinguish flexible visual choices from functional requirements. The shared attitude lives in `templates/AGENTS.md`.
|
|
24
|
+
- `index.tsx`: the reusable pure layout component. Accept a theme from the caller. Preserve structural dimensions where necessary; use theme helpers for type roles and page defaults. Do not reset the caller’s body size, line height, or paragraph gap.
|
|
25
|
+
- `template.json`: `name`, `description`, `format` (a human-readable label), and `structure` (one to eight short layout notes). Presentation templates add `"documentFormat": "presentation"`; omission means `document`. This determines project registration, catalog grouping, and the required root in the PDF specimen.
|
|
26
|
+
- `preview.tsx`: a default pure document component and document metadata, rendered with the shared `neutral` theme. Use clearly marked placeholders so different templates can be compared on structure. This is an actual PDF rendered by the same worker and preflight as documents.
|
|
27
|
+
- `starter.tsx`: a working ordinary document, with double-quoted `"__OPENDOC_TITLE__"` and `"__OPENDOC_THEME__"` literals. Creation replaces these literals with safely quoted user values and copies the result into a new document folder, alongside generated `theme.tsx` and `assets.json` files. Keep workspace-relative provenance and imports valid from `documents/<id>/index.tsx`. The reusable layout stays linked to its template folder.
|
|
28
|
+
|
|
29
|
+
The starter imports `{ theme }` from the exact quoted `"__OPENDOC_THEME_MODULE__"` sentinel once; creation replaces this sentinel import with the generated `./theme` adapter. Use that same adapted theme for template factories and `Document`; importing the base theme directly would bypass saved font choices. It also uses `"__OPENDOC_THEME__"` for metadata and `"__OPENDOC_TITLE__"` for the title. Keep the import’s explanatory TypeScript ignore comment while it is an unresolved starter. Replacement runs once so literal user text is never reinterpreted.
|
|
30
|
+
|
|
31
|
+
A data-bound catalog template may also contain `data.json` (up to 128 KB, a JSON object). Creation copies it into the document before publishing the TSX entry; the title and theme literals may appear in that JSON instead of the starter. The optional double-quoted `"__OPENDOC_DOCUMENT_ID__"` literal in the TSX receives the validated document ID, for accurate data provenance. This uses the same exclusive creation path and never overwrites an existing instance. Quotation demonstrates this pattern. Keep data parsing and calculation in the template contract, not the catalog UI.
|
|
32
|
+
|
|
33
|
+
Use workspace-root `templates/editorial-essay` as the first example. Its layout accepts arbitrary OpenDoc blocks, with no prescribed section outline or JSON format. Import the `DocumentTemplate<T>` contract and binding helpers from `opendoc/template`; import `themeType` and `themePage` from `opendoc/themes`. The contract provides `parse`, `meta`, and `render` for validated data-driven reports. Use it when content needs validation; a narrative page layout can accept ordinary blocks. Keep imports of reusable workspace layouts relative, such as `../../templates/monthly-report` from a document entry.
|
|
34
|
+
|
|
35
|
+
The page presents every specimen in Neutral. A separate theme choice applies when creating a document; the preview remains neutral for comparison. New documents use the existing exclusive folder creation path, preserve existing files, and enter the normal preview/comment/export workflow. A malformed template stays visible with an error; it does not remove other templates. Preview changes invalidate the catalog, and proofs remain outside the document library.
|
|
36
|
+
|
|
37
|
+
Supply sparse, typical, and long specimens, check every rendered page, and verify that changing the theme preserves the intended architecture. Do not promise multi-column sequential text flow until it has been demonstrated in the renderer. A pair of bounded side-by-side panels is not proof of continuous two-column pagination.
|
|
38
|
+
|
|
39
|
+
## Presentation templates
|
|
40
|
+
|
|
41
|
+
Use `Presentation` and explicit `Slide` components. Each slide remains one 960 × 540 PDF page. The template's declared format is inferred during creation; an explicit `--format` must agree. For example:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npx opendoc create investor-deck --project client-work --template pitch-deck --title "Company pitch"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The catalog includes Pitch deck, Brand guidelines, Company profile, and Proposal deck. Each guide records research sources and a recommended skeleton. Adapt the sequence to the audience and brief; the outline is a starting point. Keep editable copy, evidence fields, and visual assignments in the instance starter. Shared template code supplies composition. Mark missing evidence and image slots clearly, use document-owned media when populating them, and never use invented numbers or credentials as a finished company's facts.
|
|
48
|
+
|
|
49
|
+
Inspect every slide, including sparse content, long titles, and another theme. Long content must be edited, recomposed, or divided into explicitly authored slides; it cannot flow onto an accidental continuation page or be silently reduced to fit.
|
|
50
|
+
|
|
51
|
+
Custom template creation happens with the external agent. The page's Create template action supplies a reusable prompt; there is no embedded AI service or form builder.
|
|
52
|
+
|
|
53
|
+
## Project membership
|
|
54
|
+
|
|
55
|
+
Every created document or presentation instance requires a destination project. The creation prompt carries the selected template; the agent resolves the project and any meaningful design preferences through [opendoc-create](../.agents/skills/opendoc-create/SKILL.md). The CLI uses an explicit theme choice, then the project default, then Neutral. Moving an instance or changing a project default leaves its source and current theme intact. Template specimens remain shared resources outside the project document list. **View AGENTS.md** opens the selected template’s current guidance in a scrollable Markdown dialog.
|
package/docs/THEMES.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Themes
|
|
2
|
+
|
|
3
|
+
A theme is OpenDoc’s reusable document design system. It controls more than fonts and colors: opening hierarchy, page rhythm, component treatments, tables, captions, asides, and running matter share one executable definition. A short design guide explains how to use those decisions. A real PDF specimen makes the result inspectable in the app.
|
|
4
|
+
|
|
5
|
+
Themes are authored in source by the external coding agent. Users describe the outcome or supply references; they explore the completed result in the Themes view. The app can choose shared logo and font defaults for new documents; design tokens remain controlled in source. There are no visual tuning controls or embedded AI.
|
|
6
|
+
|
|
7
|
+
## A small source bundle
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
themes/<kebab-case-id>/
|
|
11
|
+
index.ts executable definition; named theme export
|
|
12
|
+
design.md exact palette, type, geometry, composition, usage, and basis
|
|
13
|
+
components.tsx reusable visual components, when the system needs them
|
|
14
|
+
preview.tsx an independent visual showcase and applied document example
|
|
15
|
+
assets.json optional shared logo/body/heading defaults for new documents
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
These folders belong to the workspace root, not the installed package. The folder ID and `theme.id` must agree. Keep `index.ts` pure data; do not import or re-export React components from it. OpenDoc loads this small module for discovery and loads the preview only on demand. New folders need no registry edit. New documents use the `theme.tsx` adapter generated beside their source:
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { theme } from './theme';
|
|
22
|
+
|
|
23
|
+
export const meta = {
|
|
24
|
+
title: 'A clear proposal',
|
|
25
|
+
description: 'The proposal and its supporting detail.',
|
|
26
|
+
theme: theme.id,
|
|
27
|
+
};
|
|
28
|
+
// Pass the same theme to <Document theme={theme} ...> or the chosen template.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Metadata identifies the relationship. The theme passed to the document or template actually controls rendering. Keep them consistent. Every real document still belongs to a project; a theme specimen is a separate preview artifact and does not need a project or a document-library entry.
|
|
32
|
+
|
|
33
|
+
The generated adapter imports the base theme from `../../themes/<id>` and calls `withDocumentAssets` with the document's saved `assets.json`. Use the adapted theme before constructing a template, not only when rendering `Document`; factories may already capture its font roles. Shared colors, geometry, and other rules remain live. Existing direct theme imports remain supported. See [Assets](ASSETS.md) for the adapter and exact-version contract.
|
|
34
|
+
|
|
35
|
+
## What belongs in the definition
|
|
36
|
+
|
|
37
|
+
Import `DocTheme`, `themeType`, and `themePage` from `opendoc/themes`. Root properties provide identity, font families, semantic colors, base reading metrics, page size and running-matter defaults. `palette` holds up to 16 named six-digit hex colors with semantic roles. `geometry` holds up to eight short rules; `useFor` and `principles` summarize the design. These bounded fields power the app without loading every guide. The grouped `design` rules style native OpenDoc components:
|
|
38
|
+
|
|
39
|
+
| Group | Responsibility |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| Typography | Heading levels, labels, leads, small text, captions, and code |
|
|
42
|
+
| Page and opening | Page geometry, title block, and cover treatment |
|
|
43
|
+
| Furniture | Running header, footer, folio, and their typography |
|
|
44
|
+
| Table and figure | Headers, cells, row treatments, figure spacing, and captions |
|
|
45
|
+
| Callout, list, and code | Useful supporting components with a consistent voice |
|
|
46
|
+
|
|
47
|
+
Values use the native PDF style contract. Read the type definition and one selected theme rather than assuming browser CSS works. Standard role rules cover ordinary prose and tables; `components.tsx` supplies distinctive constructions such as a modular grid, spectrum rail, circular diagram, evidence chain or analytical exhibit. Export shared tokens from `index.ts` and import them into components. A preview uses these same reusable components. Explicit document/template choices may override a theme where their composition requires it; ordinary content consumes theme roles. Use OpenDoc `Page` and `Pages` for reliable page surfaces, with native Forme primitives inside them.
|
|
48
|
+
|
|
49
|
+
Use local fonts and assets. The bundled typefaces are the default. Register custom TTF/OTF faces through `theme.fonts`, with workspace-relative `src` paths, family, numeric weight, and style; keep their license alongside. Then use the registered family in the appropriate type roles. Declaring an unregistered family name or CSS fallback stack does not embed a PDF font. Check actual PDF text extraction as well as appearance; see the package's [third-party notices](../THIRD_PARTY.md).
|
|
50
|
+
|
|
51
|
+
For reusable user-supplied logos and font families, prefer the shared asset library and optional theme defaults. Do not copy those families into every theme or document. The source-font registration below remains useful for a design system's own runtime typefaces and existing themes. Theme components should import `documentFont` from `opendoc` and call `documentFont('body')` or `documentFont('heading')` inside their render function when they explicitly need the document's semantic family. This lets saved font choices reach the component; deliberate code, caption, label, and furniture families can retain their own typefaces.
|
|
52
|
+
|
|
53
|
+
For example, after obtaining and checking these local font files, a theme could include:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
// Properties inside the theme definition; replace with verified local assets.
|
|
57
|
+
body: 'Acme Sans',
|
|
58
|
+
heading: 'Acme Sans',
|
|
59
|
+
fonts: [
|
|
60
|
+
{ family: 'Acme Sans', src: 'themes/acme/assets/AcmeSans-Regular.ttf', fontWeight: 400, fontStyle: 'normal' },
|
|
61
|
+
{ family: 'Acme Sans', src: 'themes/acme/assets/AcmeSans-Semibold.ttf', fontWeight: 600, fontStyle: 'normal' },
|
|
62
|
+
{ family: 'Acme Sans', src: 'themes/acme/assets/AcmeSans-Italic.ttf', fontWeight: 400, fontStyle: 'italic' },
|
|
63
|
+
{ family: 'Acme Sans', src: 'themes/acme/assets/AcmeSans-SemiboldItalic.ttf', fontWeight: 600, fontStyle: 'italic' },
|
|
64
|
+
],
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
These paths are examples, not supplied assets. Register each weight/style combination the theme uses. Additional family declarations may be needed in specific typography roles; labels and code can deliberately retain the bundled fonts. Do not replace the reserved `OpenDoc` font families.
|
|
68
|
+
|
|
69
|
+
## What belongs in design.md
|
|
70
|
+
|
|
71
|
+
The guide is a concrete, opinionated design system. Include exact hex values and color roles; type sizes, weights and leading; margins, grid, gutters and spacing units; shape geometry and rule weights; supported compositions; treatment of evidence, imagery and branding; component names and inputs; and specific do/don’t rules. Keep it only as long as the system needs; favor concrete, scannable instructions.
|
|
72
|
+
|
|
73
|
+
Code executes the values; the guide makes them understandable and repeatable. Keep numeric tables synchronized with exported tokens. Do not duplicate component implementations. A short basis section identifies supplied requirements, inspected references, interpretations and font/asset substitutions. Do not claim an external brand’s authority for an inspired theme.
|
|
74
|
+
|
|
75
|
+
Original inspiration material remains in the surrounding project’s existing organization. Do not automatically copy or load reference archives. Record useful pointers and keep only necessary local runtime assets with the theme. A document agent ordinarily needs the selected guide, not the research that produced it.
|
|
76
|
+
|
|
77
|
+
## Specimen and verification
|
|
78
|
+
|
|
79
|
+
`preview.tsx` exports nonempty `meta.title`, `meta.description`, `meta.theme`, and a default pure component. Make an independent showcase that expresses this system: usually two to four pages combining identity, visible palette/type/geometry and a plausible applied document. Use theme-owned components and standard themed primitives. Distinction must extend into the interior composition and evidence treatment. The shared `ThemeSpecimen` demonstrates the simpler foundations; a new distinctive system should use its own showcase.
|
|
80
|
+
|
|
81
|
+
The catalog includes Civic Spectrum’s colored modular rail, Field Manual’s annotated evidence chain, McKinsey Consulting’s analytical exhibits, and the warm editorial house style of OpenDoc Neutral. Their guides describe each system and its reusable compositions. Neutral provides a simpler foundation and is the document fallback when no theme is supplied.
|
|
82
|
+
|
|
83
|
+
Run these commands from the workspace root:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
npx opendoc themes list
|
|
87
|
+
npx opendoc themes inspect <id>
|
|
88
|
+
npx opendoc themes check <id>
|
|
89
|
+
npx opendoc themes preview <id>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`list` is compact discovery. `inspect` identifies the selected definition, guide, optional components, preview, and bounded design summary without rendering every theme. `check` validates and renders the selected specimen. `preview` exports `output/themes/<id>.pdf` with source freshness checks; an edit during rendering cannot silently replace the previous reviewed export. Themes use the same isolated rendering and layout checks as authored documents.
|
|
93
|
+
|
|
94
|
+
Run `npx opendoc check` after changing source. Review every exported specimen page at readable size and inspect representative extracted text. Long titles, dense tables, custom fonts, and altered page geometry deserve representative longer-content checks. Existing usage matters: a shared theme change can reflow documents that import it. Review affected examples instead of treating a passing specimen as proof that all documents are unchanged.
|
|
95
|
+
|
|
96
|
+
## Themes, templates, and projects
|
|
97
|
+
|
|
98
|
+
The theme defines visual language. A template defines document-type architecture, such as an essay opening, a proposal structure, or invoice geometry. Content determines what is said. Media retains its meaning and evidence even when placed inside a new visual system.
|
|
99
|
+
|
|
100
|
+
Projects can provide a default theme for new documents. A document can explicitly choose another. Creating or refining a theme does not silently change a project default or reassign existing documents. Documents already importing a shared theme receive its source changes, so that change should be intentional and verified.
|
|
101
|
+
|
|
102
|
+
The theme detail's **Assets for new documents** section chooses an optional logo, body family, and heading family. **Keep theme font** preserves the source definition. Defaults live in `themes/<id>/assets.json`, separate from `index.ts`, and are captured as exact asset versions during creation. Changing a default does not rebind existing documents; moving, duplicating, or restoring one preserves its selections. A preferred logo is available to `Logo` and the agent but is never inserted automatically. Inspect or change defaults through `npx opendoc assets defaults <theme-id>`; see [Assets](ASSETS.md) for the guarded update command and file shape.
|
|
103
|
+
|
|
104
|
+
The app’s Themes view is for browsing real specimens, exact colors and geometry, reading the guide, seeing usage, and handing requests to the external agent. The current context identifies the active selection and its file paths so the agent can resolve “this theme.” It does not embed all guides or component bodies. Read the selected guide, then only the component source needed for the task. Re-read `.opendoc/current.json` when resolving a selection. Do not expose the local session token.
|
|
105
|
+
|
|
106
|
+
For the reference-to-theme workflow, use the [opendoc-create-theme skill](../.agents/skills/opendoc-create-theme/SKILL.md). For document creation, read [Authoring](AUTHORING.md) and resolve the destination [Project](PROJECTS.md).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Daniel Molitor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @formepdf/core
|
|
2
|
+
|
|
3
|
+
WASM-powered PDF rendering engine for [Forme](https://github.com/formepdf/forme).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @formepdf/react @formepdf/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Document, Page, Text } from '@formepdf/react';
|
|
15
|
+
import { renderDocument } from '@formepdf/core';
|
|
16
|
+
import { writeFileSync } from 'fs';
|
|
17
|
+
|
|
18
|
+
const doc = (
|
|
19
|
+
<Document>
|
|
20
|
+
<Page size="Letter" margin={54}>
|
|
21
|
+
<Text style={{ fontSize: 24 }}>Hello Forme</Text>
|
|
22
|
+
</Page>
|
|
23
|
+
</Document>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const pdfBytes = await renderDocument(doc);
|
|
27
|
+
writeFileSync('output.pdf', pdfBytes);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## What this package does
|
|
31
|
+
|
|
32
|
+
This package contains the compiled WASM binary of Forme's Rust layout engine. It handles:
|
|
33
|
+
|
|
34
|
+
- Page-native layout with automatic content splitting
|
|
35
|
+
- Font loading, subsetting, and TrueType embedding
|
|
36
|
+
- PDF generation with links, bookmarks, images, and SVG
|
|
37
|
+
- Table layout with automatic header repetition
|
|
38
|
+
|
|
39
|
+
You write components with `@formepdf/react`. This package turns them into PDF bytes.
|
|
40
|
+
|
|
41
|
+
## API
|
|
42
|
+
|
|
43
|
+
### `renderDocument(jsx)`
|
|
44
|
+
|
|
45
|
+
Takes a JSX document tree and returns a `Uint8Array` of PDF bytes.
|
|
46
|
+
|
|
47
|
+
### `renderDocumentWithLayout(jsx)`
|
|
48
|
+
|
|
49
|
+
Returns both the PDF bytes and layout metadata (element positions, sizes, page info). Used by the dev server for the element inspector.
|
|
50
|
+
|
|
51
|
+
## Docs
|
|
52
|
+
|
|
53
|
+
Full documentation at [docs.formepdf.com](https://docs.formepdf.com)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDF attachments + Factur-X/ZUGFeRD e-invoice container options.
|
|
3
|
+
*
|
|
4
|
+
* Environment-neutral (Node, browser, workers): used by every entry
|
|
5
|
+
* point so the option mapping cannot drift between them.
|
|
6
|
+
*
|
|
7
|
+
* Tier-1 container support only: the caller supplies the invoice XML;
|
|
8
|
+
* Forme embeds it as a PDF/A-3 associated file with the Factur-X XMP
|
|
9
|
+
* identification. Forme does NOT generate or validate EN 16931 semantic
|
|
10
|
+
* content.
|
|
11
|
+
*/
|
|
12
|
+
/** `/AFRelationship` values (PDF 2.0 §14.13, required by PDF/A-3). */
|
|
13
|
+
export type AfRelationship = 'Data' | 'Source' | 'Alternative' | 'Supplement' | 'Unspecified';
|
|
14
|
+
export interface AttachmentOptions {
|
|
15
|
+
/** Filename recorded in the PDF (e.g. `factur-x.xml`). */
|
|
16
|
+
name: string;
|
|
17
|
+
/** File content: bytes, or a string treated as UTF-8 text. */
|
|
18
|
+
data: Uint8Array | string;
|
|
19
|
+
/** MIME type (PDF/A-3 requires one); default `application/octet-stream`. */
|
|
20
|
+
mimeType?: string;
|
|
21
|
+
/** Default `Unspecified` (the Factur-X path derives it from the profile). */
|
|
22
|
+
relationship?: AfRelationship;
|
|
23
|
+
/** Optional human-readable description. */
|
|
24
|
+
description?: string;
|
|
25
|
+
/**
|
|
26
|
+
* `/Params /ModDate` as a PDF date string (`D:YYYYMMDDHHmmSSZ`).
|
|
27
|
+
* Defaults to a fixed constant — never wall-clock — so output stays
|
|
28
|
+
* byte-deterministic.
|
|
29
|
+
*/
|
|
30
|
+
modDate?: string;
|
|
31
|
+
}
|
|
32
|
+
/** Factur-X / ZUGFeRD profile names, exactly as XMP spells them. */
|
|
33
|
+
export type FacturXProfile = 'MINIMUM' | 'BASIC WL' | 'BASIC' | 'EN 16931' | 'EXTENDED' | 'XRECHNUNG';
|
|
34
|
+
export interface FacturXOptions {
|
|
35
|
+
/** The invoice XML (caller-supplied; Forme does not generate or validate it). */
|
|
36
|
+
xml: Uint8Array | string;
|
|
37
|
+
/** Factur-X profile — drives XMP `fx:ConformanceLevel` and the default `/AFRelationship`. */
|
|
38
|
+
profile: FacturXProfile;
|
|
39
|
+
/** Attachment filename; default `factur-x.xml` (`xrechnung.xml` for XRECHNUNG). */
|
|
40
|
+
filename?: string;
|
|
41
|
+
/** Override the profile-derived `/AFRelationship`. */
|
|
42
|
+
relationship?: AfRelationship;
|
|
43
|
+
/** XMP `fx:Version`; default `1.0`. */
|
|
44
|
+
version?: string;
|
|
45
|
+
/** `/Params /ModDate`; deterministic default. */
|
|
46
|
+
modDate?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Map `attachments` / `facturX` options onto the serialized document.
|
|
50
|
+
* Shared by the Node, browser, and worker entries.
|
|
51
|
+
*/
|
|
52
|
+
export declare function applyAttachmentOptions(doc: Record<string, unknown>, options?: {
|
|
53
|
+
attachments?: AttachmentOptions[];
|
|
54
|
+
facturX?: FacturXOptions;
|
|
55
|
+
}): void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PDF attachments + Factur-X/ZUGFeRD e-invoice container options.
|
|
3
|
+
*
|
|
4
|
+
* Environment-neutral (Node, browser, workers): used by every entry
|
|
5
|
+
* point so the option mapping cannot drift between them.
|
|
6
|
+
*
|
|
7
|
+
* Tier-1 container support only: the caller supplies the invoice XML;
|
|
8
|
+
* Forme embeds it as a PDF/A-3 associated file with the Factur-X XMP
|
|
9
|
+
* identification. Forme does NOT generate or validate EN 16931 semantic
|
|
10
|
+
* content.
|
|
11
|
+
*/
|
|
12
|
+
function toBase64(data) {
|
|
13
|
+
const bytes = typeof data === 'string' ? new TextEncoder().encode(data) : data;
|
|
14
|
+
// Node fast path; browser/workers fall back to btoa over a binary string.
|
|
15
|
+
const B = globalThis.Buffer;
|
|
16
|
+
if (B)
|
|
17
|
+
return B.from(bytes).toString('base64');
|
|
18
|
+
let bin = '';
|
|
19
|
+
for (let i = 0; i < bytes.length; i += 0x8000) {
|
|
20
|
+
bin += String.fromCharCode(...bytes.subarray(i, i + 0x8000));
|
|
21
|
+
}
|
|
22
|
+
return btoa(bin);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Map `attachments` / `facturX` options onto the serialized document.
|
|
26
|
+
* Shared by the Node, browser, and worker entries.
|
|
27
|
+
*/
|
|
28
|
+
export function applyAttachmentOptions(doc, options) {
|
|
29
|
+
const attachments = [];
|
|
30
|
+
for (const a of options?.attachments ?? []) {
|
|
31
|
+
attachments.push({
|
|
32
|
+
name: a.name,
|
|
33
|
+
src: toBase64(a.data),
|
|
34
|
+
mimeType: a.mimeType,
|
|
35
|
+
relationship: a.relationship,
|
|
36
|
+
description: a.description,
|
|
37
|
+
modDate: a.modDate,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const fx = options?.facturX;
|
|
41
|
+
if (fx) {
|
|
42
|
+
const filename = fx.filename ?? (fx.profile === 'XRECHNUNG' ? 'xrechnung.xml' : 'factur-x.xml');
|
|
43
|
+
attachments.push({
|
|
44
|
+
name: filename,
|
|
45
|
+
src: toBase64(fx.xml),
|
|
46
|
+
mimeType: 'text/xml',
|
|
47
|
+
relationship: fx.relationship,
|
|
48
|
+
modDate: fx.modDate,
|
|
49
|
+
});
|
|
50
|
+
doc.zugferd = {
|
|
51
|
+
conformanceLevel: fx.profile,
|
|
52
|
+
documentFileName: filename,
|
|
53
|
+
version: fx.version,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (attachments.length > 0) {
|
|
57
|
+
doc.attachments = attachments;
|
|
58
|
+
}
|
|
59
|
+
}
|