├── .eslintrc
├── .gitattributes
├── .gitignore
├── .prettierrc
├── LICENSE
├── README.md
├── index.html
├── index.js
├── package-lock.json
├── package.json
├── scripts
├── exportPdf.js
└── start.js
├── src
├── App.tsx
├── Page.tsx
├── env.d.ts
├── hooks
│ └── use-key.ts
├── main.tsx
├── templates
│ ├── Basic.tsx
│ ├── Cover.tsx
│ ├── FullPageDiagram.tsx
│ ├── FullPageImage.tsx
│ ├── HalfPage.tsx
│ ├── TitleMultiColumn.tsx
│ └── Util.tsx
├── toml.d.ts
└── vite-env.d.ts
├── starter
├── .npmignore
├── README.md
├── index.js
├── main
│ ├── .gitignore
│ ├── README.md
│ ├── content.toml
│ ├── index.html
│ ├── index.js
│ ├── main.js
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ ├── fonts
│ │ │ ├── Inter-Italic.woff2
│ │ │ ├── Inter-Light.woff2
│ │ │ ├── Inter-LightItalic.woff2
│ │ │ ├── Inter-Regular.woff2
│ │ │ ├── Inter-SemiBold.woff2
│ │ │ ├── Inter-SemiBoldItalic.woff2
│ │ │ ├── InterDisplay-Light.woff2
│ │ │ ├── InterDisplay-LightItalic.woff2
│ │ │ ├── InterDisplay-Regular.woff2
│ │ │ └── InterDisplay-SemiBold.woff2
│ │ ├── large-placeholder.svg
│ │ ├── small-placeholder.svg
│ │ └── styles.css
│ ├── styles
│ │ └── index.css
│ ├── tailwind.config.cjs
│ └── templates
│ │ └── Example.jsx
├── package-lock.json
└── package.json
├── styles
├── dist
│ └── index.css
└── src
│ ├── index.css
│ └── lib
│ ├── highlight.css
│ └── pdf.css
├── tailwind.config.cjs
├── tsconfig.json
├── tsconfig.node.json
└── vite.config.ts
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "ignorePatterns": ["**/*.js", "**/**/*.js"],
3 | "rules": {
4 | "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
5 | "eqeqeq": "error",
6 | "no-param-reassign": "error",
7 | "no-return-assign": "error"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | !styles/dist
13 | dist-ssr
14 | *.local
15 |
16 | # Editor directories and files
17 | .vscode/*
18 | !.vscode/extensions.json
19 | .idea
20 | .DS_Store
21 | *.suo
22 | *.ntvs*
23 | *.njsproj
24 | *.sln
25 | *.sw?
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 92,
3 | "proseWrap": "always",
4 | "semi": false,
5 | "singleQuote": true,
6 | "trailingComma": "all",
7 | "plugins": ["./node_modules/@trivago/prettier-plugin-sort-imports"],
8 | "importOrder": ["^~/(.*)$", "^[./]"],
9 | "importOrderSeparation": true,
10 | "importOrderSortSpecifiers": true
11 | }
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Mozilla Public License Version 2.0
2 | ==================================
3 |
4 | 1. Definitions
5 | --------------
6 |
7 | 1.1. "Contributor"
8 | means each individual or legal entity that creates, contributes to
9 | the creation of, or owns Covered Software.
10 |
11 | 1.2. "Contributor Version"
12 | means the combination of the Contributions of others (if any) used
13 | by a Contributor and that particular Contributor's Contribution.
14 |
15 | 1.3. "Contribution"
16 | means Covered Software of a particular Contributor.
17 |
18 | 1.4. "Covered Software"
19 | means Source Code Form to which the initial Contributor has attached
20 | the notice in Exhibit A, the Executable Form of such Source Code
21 | Form, and Modifications of such Source Code Form, in each case
22 | including portions thereof.
23 |
24 | 1.5. "Incompatible With Secondary Licenses"
25 | means
26 |
27 | (a) that the initial Contributor has attached the notice described
28 | in Exhibit B to the Covered Software; or
29 |
30 | (b) that the Covered Software was made available under the terms of
31 | version 1.1 or earlier of the License, but not also under the
32 | terms of a Secondary License.
33 |
34 | 1.6. "Executable Form"
35 | means any form of the work other than Source Code Form.
36 |
37 | 1.7. "Larger Work"
38 | means a work that combines Covered Software with other material, in
39 | a separate file or files, that is not Covered Software.
40 |
41 | 1.8. "License"
42 | means this document.
43 |
44 | 1.9. "Licensable"
45 | means having the right to grant, to the maximum extent possible,
46 | whether at the time of the initial grant or subsequently, any and
47 | all of the rights conveyed by this License.
48 |
49 | 1.10. "Modifications"
50 | means any of the following:
51 |
52 | (a) any file in Source Code Form that results from an addition to,
53 | deletion from, or modification of the contents of Covered
54 | Software; or
55 |
56 | (b) any new file in Source Code Form that contains any Covered
57 | Software.
58 |
59 | 1.11. "Patent Claims" of a Contributor
60 | means any patent claim(s), including without limitation, method,
61 | process, and apparatus claims, in any patent Licensable by such
62 | Contributor that would be infringed, but for the grant of the
63 | License, by the making, using, selling, offering for sale, having
64 | made, import, or transfer of either its Contributions or its
65 | Contributor Version.
66 |
67 | 1.12. "Secondary License"
68 | means either the GNU General Public License, Version 2.0, the GNU
69 | Lesser General Public License, Version 2.1, the GNU Affero General
70 | Public License, Version 3.0, or any later versions of those
71 | licenses.
72 |
73 | 1.13. "Source Code Form"
74 | means the form of the work preferred for making modifications.
75 |
76 | 1.14. "You" (or "Your")
77 | means an individual or a legal entity exercising rights under this
78 | License. For legal entities, "You" includes any entity that
79 | controls, is controlled by, or is under common control with You. For
80 | purposes of this definition, "control" means (a) the power, direct
81 | or indirect, to cause the direction or management of such entity,
82 | whether by contract or otherwise, or (b) ownership of more than
83 | fifty percent (50%) of the outstanding shares or beneficial
84 | ownership of such entity.
85 |
86 | 2. License Grants and Conditions
87 | --------------------------------
88 |
89 | 2.1. Grants
90 |
91 | Each Contributor hereby grants You a world-wide, royalty-free,
92 | non-exclusive license:
93 |
94 | (a) under intellectual property rights (other than patent or trademark)
95 | Licensable by such Contributor to use, reproduce, make available,
96 | modify, display, perform, distribute, and otherwise exploit its
97 | Contributions, either on an unmodified basis, with Modifications, or
98 | as part of a Larger Work; and
99 |
100 | (b) under Patent Claims of such Contributor to make, use, sell, offer
101 | for sale, have made, import, and otherwise transfer either its
102 | Contributions or its Contributor Version.
103 |
104 | 2.2. Effective Date
105 |
106 | The licenses granted in Section 2.1 with respect to any Contribution
107 | become effective for each Contribution on the date the Contributor first
108 | distributes such Contribution.
109 |
110 | 2.3. Limitations on Grant Scope
111 |
112 | The licenses granted in this Section 2 are the only rights granted under
113 | this License. No additional rights or licenses will be implied from the
114 | distribution or licensing of Covered Software under this License.
115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a
116 | Contributor:
117 |
118 | (a) for any code that a Contributor has removed from Covered Software;
119 | or
120 |
121 | (b) for infringements caused by: (i) Your and any other third party's
122 | modifications of Covered Software, or (ii) the combination of its
123 | Contributions with other software (except as part of its Contributor
124 | Version); or
125 |
126 | (c) under Patent Claims infringed by Covered Software in the absence of
127 | its Contributions.
128 |
129 | This License does not grant any rights in the trademarks, service marks,
130 | or logos of any Contributor (except as may be necessary to comply with
131 | the notice requirements in Section 3.4).
132 |
133 | 2.4. Subsequent Licenses
134 |
135 | No Contributor makes additional grants as a result of Your choice to
136 | distribute the Covered Software under a subsequent version of this
137 | License (see Section 10.2) or under the terms of a Secondary License (if
138 | permitted under the terms of Section 3.3).
139 |
140 | 2.5. Representation
141 |
142 | Each Contributor represents that the Contributor believes its
143 | Contributions are its original creation(s) or it has sufficient rights
144 | to grant the rights to its Contributions conveyed by this License.
145 |
146 | 2.6. Fair Use
147 |
148 | This License is not intended to limit any rights You have under
149 | applicable copyright doctrines of fair use, fair dealing, or other
150 | equivalents.
151 |
152 | 2.7. Conditions
153 |
154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155 | in Section 2.1.
156 |
157 | 3. Responsibilities
158 | -------------------
159 |
160 | 3.1. Distribution of Source Form
161 |
162 | All distribution of Covered Software in Source Code Form, including any
163 | Modifications that You create or to which You contribute, must be under
164 | the terms of this License. You must inform recipients that the Source
165 | Code Form of the Covered Software is governed by the terms of this
166 | License, and how they can obtain a copy of this License. You may not
167 | attempt to alter or restrict the recipients' rights in the Source Code
168 | Form.
169 |
170 | 3.2. Distribution of Executable Form
171 |
172 | If You distribute Covered Software in Executable Form then:
173 |
174 | (a) such Covered Software must also be made available in Source Code
175 | Form, as described in Section 3.1, and You must inform recipients of
176 | the Executable Form how they can obtain a copy of such Source Code
177 | Form by reasonable means in a timely manner, at a charge no more
178 | than the cost of distribution to the recipient; and
179 |
180 | (b) You may distribute such Executable Form under the terms of this
181 | License, or sublicense it under different terms, provided that the
182 | license for the Executable Form does not attempt to limit or alter
183 | the recipients' rights in the Source Code Form under this License.
184 |
185 | 3.3. Distribution of a Larger Work
186 |
187 | You may create and distribute a Larger Work under terms of Your choice,
188 | provided that You also comply with the requirements of this License for
189 | the Covered Software. If the Larger Work is a combination of Covered
190 | Software with a work governed by one or more Secondary Licenses, and the
191 | Covered Software is not Incompatible With Secondary Licenses, this
192 | License permits You to additionally distribute such Covered Software
193 | under the terms of such Secondary License(s), so that the recipient of
194 | the Larger Work may, at their option, further distribute the Covered
195 | Software under the terms of either this License or such Secondary
196 | License(s).
197 |
198 | 3.4. Notices
199 |
200 | You may not remove or alter the substance of any license notices
201 | (including copyright notices, patent notices, disclaimers of warranty,
202 | or limitations of liability) contained within the Source Code Form of
203 | the Covered Software, except that You may alter any license notices to
204 | the extent required to remedy known factual inaccuracies.
205 |
206 | 3.5. Application of Additional Terms
207 |
208 | You may choose to offer, and to charge a fee for, warranty, support,
209 | indemnity or liability obligations to one or more recipients of Covered
210 | Software. However, You may do so only on Your own behalf, and not on
211 | behalf of any Contributor. You must make it absolutely clear that any
212 | such warranty, support, indemnity, or liability obligation is offered by
213 | You alone, and You hereby agree to indemnify every Contributor for any
214 | liability incurred by such Contributor as a result of warranty, support,
215 | indemnity or liability terms You offer. You may include additional
216 | disclaimers of warranty and limitations of liability specific to any
217 | jurisdiction.
218 |
219 | 4. Inability to Comply Due to Statute or Regulation
220 | ---------------------------------------------------
221 |
222 | If it is impossible for You to comply with any of the terms of this
223 | License with respect to some or all of the Covered Software due to
224 | statute, judicial order, or regulation then You must: (a) comply with
225 | the terms of this License to the maximum extent possible; and (b)
226 | describe the limitations and the code they affect. Such description must
227 | be placed in a text file included with all distributions of the Covered
228 | Software under this License. Except to the extent prohibited by statute
229 | or regulation, such description must be sufficiently detailed for a
230 | recipient of ordinary skill to be able to understand it.
231 |
232 | 5. Termination
233 | --------------
234 |
235 | 5.1. The rights granted under this License will terminate automatically
236 | if You fail to comply with any of its terms. However, if You become
237 | compliant, then the rights granted under this License from a particular
238 | Contributor are reinstated (a) provisionally, unless and until such
239 | Contributor explicitly and finally terminates Your grants, and (b) on an
240 | ongoing basis, if such Contributor fails to notify You of the
241 | non-compliance by some reasonable means prior to 60 days after You have
242 | come back into compliance. Moreover, Your grants from a particular
243 | Contributor are reinstated on an ongoing basis if such Contributor
244 | notifies You of the non-compliance by some reasonable means, this is the
245 | first time You have received notice of non-compliance with this License
246 | from such Contributor, and You become compliant prior to 30 days after
247 | Your receipt of the notice.
248 |
249 | 5.2. If You initiate litigation against any entity by asserting a patent
250 | infringement claim (excluding declaratory judgment actions,
251 | counter-claims, and cross-claims) alleging that a Contributor Version
252 | directly or indirectly infringes any patent, then the rights granted to
253 | You by any and all Contributors for the Covered Software under Section
254 | 2.1 of this License shall terminate.
255 |
256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257 | end user license agreements (excluding distributors and resellers) which
258 | have been validly granted by You or Your distributors under this License
259 | prior to termination shall survive termination.
260 |
261 | ************************************************************************
262 | * *
263 | * 6. Disclaimer of Warranty *
264 | * ------------------------- *
265 | * *
266 | * Covered Software is provided under this License on an "as is" *
267 | * basis, without warranty of any kind, either expressed, implied, or *
268 | * statutory, including, without limitation, warranties that the *
269 | * Covered Software is free of defects, merchantable, fit for a *
270 | * particular purpose or non-infringing. The entire risk as to the *
271 | * quality and performance of the Covered Software is with You. *
272 | * Should any Covered Software prove defective in any respect, You *
273 | * (not any Contributor) assume the cost of any necessary servicing, *
274 | * repair, or correction. This disclaimer of warranty constitutes an *
275 | * essential part of this License. No use of any Covered Software is *
276 | * authorized under this License except under this disclaimer. *
277 | * *
278 | ************************************************************************
279 |
280 | ************************************************************************
281 | * *
282 | * 7. Limitation of Liability *
283 | * -------------------------- *
284 | * *
285 | * Under no circumstances and under no legal theory, whether tort *
286 | * (including negligence), contract, or otherwise, shall any *
287 | * Contributor, or anyone who distributes Covered Software as *
288 | * permitted above, be liable to You for any direct, indirect, *
289 | * special, incidental, or consequential damages of any character *
290 | * including, without limitation, damages for lost profits, loss of *
291 | * goodwill, work stoppage, computer failure or malfunction, or any *
292 | * and all other commercial damages or losses, even if such party *
293 | * shall have been informed of the possibility of such damages. This *
294 | * limitation of liability shall not apply to liability for death or *
295 | * personal injury resulting from such party's negligence to the *
296 | * extent applicable law prohibits such limitation. Some *
297 | * jurisdictions do not allow the exclusion or limitation of *
298 | * incidental or consequential damages, so this exclusion and *
299 | * limitation may not apply to You. *
300 | * *
301 | ************************************************************************
302 |
303 | 8. Litigation
304 | -------------
305 |
306 | Any litigation relating to this License may be brought only in the
307 | courts of a jurisdiction where the defendant maintains its principal
308 | place of business and such litigation shall be governed by laws of that
309 | jurisdiction, without reference to its conflict-of-law provisions.
310 | Nothing in this Section shall prevent a party's ability to bring
311 | cross-claims or counter-claims.
312 |
313 | 9. Miscellaneous
314 | ----------------
315 |
316 | This License represents the complete agreement concerning the subject
317 | matter hereof. If any provision of this License is held to be
318 | unenforceable, such provision shall be reformed only to the extent
319 | necessary to make it enforceable. Any law or regulation which provides
320 | that the language of a contract shall be construed against the drafter
321 | shall not be used to construe this License against a Contributor.
322 |
323 | 10. Versions of the License
324 | ---------------------------
325 |
326 | 10.1. New Versions
327 |
328 | Mozilla Foundation is the license steward. Except as provided in Section
329 | 10.3, no one other than the license steward has the right to modify or
330 | publish new versions of this License. Each version will be given a
331 | distinguishing version number.
332 |
333 | 10.2. Effect of New Versions
334 |
335 | You may distribute the Covered Software under the terms of the version
336 | of the License under which You originally received the Covered Software,
337 | or under the terms of any subsequent version published by the license
338 | steward.
339 |
340 | 10.3. Modified Versions
341 |
342 | If you create software not governed by this License, and you want to
343 | create a new license for such software, you may create and use a
344 | modified version of this License if you rename the license and remove
345 | any references to the name of the license steward (except to note that
346 | such modified license differs from this License).
347 |
348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary
349 | Licenses
350 |
351 | If You choose to distribute Source Code Form that is Incompatible With
352 | Secondary Licenses under the terms of this version of the License, the
353 | notice described in Exhibit B of this License must be attached.
354 |
355 | Exhibit A - Source Code Form License Notice
356 | -------------------------------------------
357 |
358 | This Source Code Form is subject to the terms of the Mozilla Public
359 | License, v. 2.0. If a copy of the MPL was not distributed with this
360 | file, You can obtain one at https://mozilla.org/MPL/2.0/.
361 |
362 | If it is not possible or desirable to put the notice in a particular
363 | file, then You may include the notice in a location (such as a LICENSE
364 | file in a relevant directory) where a recipient would be likely to look
365 | for such a notice.
366 |
367 | You may add additional accurate notices of copyright ownership.
368 |
369 | Exhibit B - "Incompatible With Secondary Licenses" Notice
370 | ---------------------------------------------------------
371 |
372 | This Source Code Form is "Incompatible With Secondary Licenses", as
373 | defined by the Mozilla Public License, v. 2.0.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Fable
2 |
3 | > **Warning**: Fable is not much more than an internal experiment in a type of deck
4 | > generator. It won't offer a comprehensive feature set or the robustness of a
5 | > fully-developed library. But it aims to provide a flexible and intuitive tool for
6 | > presentation creation. We greatly appreciate feedback, suggestions, and best of all
7 | > contributions.
8 |
9 | Fable is a deck generator that looks to offer an authoring experience as effortless as
10 | markdown presentation libraries while providing the flexibility to create more varied
11 | layouts. It utilizes TOML templates and content schema validation (via
12 | [zod](https://zod.dev/)) to ensure content accuracy and format adherence.
13 |
14 | 
15 |
16 | ## Key Features
17 |
18 | - Schema-based validation for templates
19 | - Customizable page templates
20 | - Support for a wide variety of content formats (Markdown, code snippets, images) and can be
21 | extended to support anything else
22 | - Seamless export to PDF using [`Puppeteer`](https://pptr.dev/)
23 | - Built-in Tailwind CSS support
24 |
25 | ## How It Works
26 |
27 | Specify a page template along with its own content schema (using [`zod`](https://zod.dev/))
28 | to validate the content and fields in the TOML file.
29 |
30 | ```jsx
31 | export const Schema = z.object({
32 | title: z.string().optional,
33 | text: z.string(),
34 | });
35 | ```
36 |
37 | ```toml
38 | [[pages]]
39 | template = "Basic"
40 | title = "A Journey Through the Cosmos"
41 | text = """
42 | - In the _vastness of space_, time and distance are but mere illusions
43 | - Worlds exist beyond our wildest imaginations
44 | - On these worlds, _beings of all shapes and sizes_ dwell
45 | - With societies and cultures _as diverse as the stars_ that light up the skies above
46 | - They are **united** in their quest for knowledge and understanding
47 | - The universe itself is our teacher, and its secrets our endless source of inspiration
48 | """
49 | ````
50 |
51 | The `template` attribute in your TOML file should correspond to the template component name.
52 | Fable provides
53 | [several built-in templates](https://github.com/oxidecomputer/fable/tree/main/src/templates),
54 | but custom templates can also be created. Any design you can produce with a React layout can
55 | be incorporated into your presentation.
56 |
57 | This means you're not relying on the library to support any type of content, it can be
58 | easily extended to support things like Latex, AsciiMath, AsciiDoc by just installing any
59 | prerequisites and handling it directly in a new layout.
60 |
61 | ## Getting Started
62 |
63 | Create a new presentation with `npx @oxide/create-fable@latest`.
64 |
65 | ## Export to PDF
66 |
67 | To generate a PDF version of your presentation, run `npm run export-pdf`.
68 |
69 | ## Navigation
70 |
71 | Navigate through slides using the left and right arrow keys. Press `f` to enter fullscreen
72 | mode.
73 |
74 | ## Custom Templates
75 |
76 | Custom templates consist of:
77 |
78 | 1. A template schema that validates whether the page's content matches the rendering
79 | requirements of the template.
80 | 2. A React component that handles the page content provided by the user.
81 |
82 | Refer to this
83 | [starter example](https://github.com/oxidecomputer/fable/blob/main/starter/main/templates/Example.jsx)
84 | to create your own custom templates.
85 |
86 | ### Template Utilities
87 |
88 | _Markdown:_ Content enclosed within is parsed and rendered as Markdown.
89 |
90 | _FitText:_ Automatically resizes overflowing text to fit within its container.
91 |
92 | > **Info**: Currently not in use, needs improvements
93 |
94 | ## Stying
95 |
96 | Fable supports [Tailwind CSS](https://tailwindcss.com/) out of the box. You can also use the
97 | `styles.css` file.
98 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fable – Presentation Generator
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | import exportPdf from './scripts/exportPdf.js'
2 | import start from './scripts/start.js'
3 |
4 | export { exportPdf }
5 |
6 | export default start
7 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@oxide/fable",
3 | "version": "0.1.5",
4 | "main": "index.js",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "run-p dev:*",
8 | "dev:server": "npm run start --prefix starter/main",
9 | "dev:css": "npm run generate:css -- --watch",
10 | "generate:css": "tailwindcss -i styles/src/index.css -o styles/dist/index.css",
11 | "build": "tsc && vite build",
12 | "preview": "vite preview",
13 | "fmt": "prettier --write --ignore-path ./.gitignore .",
14 | "fmt:check": "prettier --check --ignore-path ./.gitignore . ",
15 | "tsc": "tsc"
16 | },
17 | "dependencies": {
18 | "@vitejs/plugin-react": "^3.1.0",
19 | "autoprefixer": "^10.4.13",
20 | "highlight.js": "^11.7.0",
21 | "marked": "^7.0.3",
22 | "mousetrap": "^1.6.5",
23 | "postcss": "^8.4.21",
24 | "postcss-cli": "^10.1.0",
25 | "postcss-import": "^15.1.0",
26 | "puppeteer": "^21.0.3",
27 | "react": "^18.2.0",
28 | "react-dom": "^18.2.0",
29 | "table": "^6.8.1",
30 | "tailwindcss": "^3.3.2",
31 | "typescript": "^4.9.3",
32 | "vite": "^4.1.0",
33 | "vite-plugin-toml": "^0.5.0",
34 | "zod": "^3.20.6"
35 | },
36 | "devDependencies": {
37 | "@trivago/prettier-plugin-sort-imports": "^4.0.0",
38 | "@types/inquirer": "^9.0.3",
39 | "@types/marked": "^4.0.8",
40 | "@types/mousetrap": "^1.6.11",
41 | "@types/node": "^18.14.0",
42 | "@types/react": "^18.0.27",
43 | "@types/react-dom": "^18.0.10",
44 | "npm-run-all": "^4.1.5",
45 | "prettier": "^2.8.4"
46 | },
47 | "files": [
48 | "index.js",
49 | "src/**",
50 | "scripts/**",
51 | "tailwind.config.cjs",
52 | "vite.config.ts",
53 | "styles/dist/**"
54 | ],
55 | "repository": {
56 | "type": "git",
57 | "url": "git+https://github.com/oxidecomputer/fable.git"
58 | },
59 | "bugs": {
60 | "url": "https://github.com/oxidecomputer/fable/issues"
61 | },
62 | "homepage": "https://github.com/oxidecomputer/fable#readme",
63 | "description": "Fable is a TOML deck generator with custom templates and schema validation",
64 | "author": "Oxide Computer Company ",
65 | "license": "MPL 2.0",
66 | "publishConfig": {
67 | "registry": "https://registry.npmjs.org/",
68 | "access": "public"
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/scripts/exportPdf.js:
--------------------------------------------------------------------------------
1 | import puppeteer from 'puppeteer'
2 |
3 | const run = async (__dirname) => {
4 | const browser = await puppeteer.launch({ headless: true })
5 | const page = await browser.newPage()
6 | await page.goto('http://localhost:1337/?pdf=true', { waitUntil: 'networkidle0' })
7 | await page.emulateMediaType('screen')
8 |
9 | const pdf = await page.pdf({
10 | path: `${__dirname}/export.pdf`,
11 | printBackground: true,
12 | width: '1920px',
13 | height: '1080px',
14 | })
15 |
16 | await browser.close()
17 | return pdf
18 | }
19 |
20 | async function exportPdf(directory) {
21 | console.log(`Exporting PDF to ${directory}`)
22 | await run(directory)
23 | }
24 |
25 | export default exportPdf
26 |
--------------------------------------------------------------------------------
/scripts/start.js:
--------------------------------------------------------------------------------
1 | import path from 'path'
2 | import { fileURLToPath } from 'url'
3 | import { createServer } from 'vite'
4 |
5 | const __dirname = fileURLToPath(new URL('../', import.meta.url))
6 |
7 | const start = async (root) => {
8 | process.env = { ...process.env, VITE_DIR: root }
9 |
10 | const server = await createServer({
11 | root: root,
12 | configFile: path.resolve(__dirname, 'vite.config.ts'),
13 | server: {
14 | port: 1337,
15 | },
16 | })
17 | await server.listen()
18 |
19 | server.printUrls()
20 | }
21 |
22 | export default start
23 |
--------------------------------------------------------------------------------
/src/App.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useMemo, useState } from 'react'
2 | import { z } from 'zod'
3 |
4 | import '../styles/dist/index.css'
5 | import Page from './Page'
6 | import { useKey } from './hooks/use-key'
7 |
8 | export const Schema = z.object({
9 | pages: z.any().array(),
10 | })
11 |
12 | function App() {
13 | const [data, setData] = useState()
14 | const [isFullscreen, setIsFullscreen] = useState(false)
15 | const [scale, setScale] = useState(1.0)
16 | const [currentPage, setCurrentPage] = useState(0)
17 |
18 | const prevPage = () => {
19 | if (currentPage > 0) {
20 | const newPage = currentPage - 1
21 | updateUrl(newPage)
22 | setCurrentPage(newPage)
23 | }
24 | }
25 |
26 | const nextPage = () => {
27 | if (currentPage < data.pages.length - 1) {
28 | const newPage = currentPage + 1
29 | updateUrl(newPage)
30 | setCurrentPage(newPage)
31 | }
32 | }
33 |
34 | const updateUrl = (newPage: number) => {
35 | window.location.href = `#${newPage + 1}`
36 | }
37 |
38 | const enterFullscreen = () => {
39 | document.body.requestFullscreen()
40 | }
41 |
42 | useKey('left', prevPage)
43 | useKey('right', nextPage)
44 | useKey('f', enterFullscreen)
45 |
46 | const isPdf = useMemo(() => {
47 | const params = new URL(document.location.toString()).searchParams
48 | return params.get('pdf')
49 | }, [])
50 |
51 | useEffect(() => {
52 | function onFullscreenChange() {
53 | setIsFullscreen(document.fullscreenElement !== null)
54 | }
55 |
56 | function checkScale() {
57 | const widthScale = window.innerWidth / 1920
58 | const heightScale = window.innerHeight / 1080
59 |
60 | setScale(widthScale < heightScale ? widthScale : heightScale)
61 | }
62 |
63 | function checkContent() {
64 | if (window.ENV && window.ENV.content) {
65 | const content = window.ENV.content
66 |
67 | setData(content)
68 | Schema.parse(content)
69 | }
70 | }
71 |
72 | checkContent()
73 | checkScale()
74 |
75 | if (isPdf) {
76 | document.body.classList.add('--pdf')
77 | }
78 |
79 | addEventListener('fullscreenchange', onFullscreenChange)
80 | addEventListener('resize', checkScale)
81 | }, [])
82 |
83 | useEffect(() => {
84 | if (!data || !data.pages) {
85 | return
86 | }
87 |
88 | function getPage() {
89 | const hash = window.location.hash.replace('#', '')
90 |
91 | if (!hash) return
92 |
93 | const page = parseInt(hash)
94 |
95 | if (page <= data.pages.length) {
96 | setCurrentPage(page - 1)
97 | }
98 | }
99 |
100 | getPage()
101 | }, [data])
102 |
103 | const pageNumber = (currentPage: number) => (
104 |
105 | {currentPage} / {data.pages.length}
106 |
107 | )
108 |
109 | if (data && data.pages) {
110 | return (
111 |
116 | {isPdf ? (
117 | [...Array(data.pages.length)].map((_e, i) => (
118 |
126 | ))
127 | ) : (
128 |
136 | )}
137 |
138 | )
139 | }
140 |
141 | return null
142 | }
143 |
144 | export default App
145 |
--------------------------------------------------------------------------------
/src/Page.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react'
2 | import { z } from 'zod'
3 |
4 | type Component = {
5 | template: ({ data, className }: { data: any; className?: string }) => JSX.Element
6 | schema: any
7 | }
8 |
9 | type Error = z.ZodIssue
10 |
11 | function Page({ data, scale, pageNumber }: any) {
12 | const [component, setComponent] = useState()
13 | const [errors, setErrors] = useState()
14 |
15 | useEffect(() => {
16 | async function getTemplate() {
17 | const dir = data.custom_template ? `${window.ENV.dir}templates/` : './templates/'
18 | const suffix = data.custom_template ? 'jsx' : 'tsx'
19 |
20 | const template = await import(/* @vite-ignore */ `${dir}${data.template}.${suffix}`)
21 | const schema = template.Schema
22 |
23 | if (schema) {
24 | const parsedMeta = schema.safeParse(data)
25 |
26 | if (!parsedMeta.success) {
27 | console.error("Can't parse slide data")
28 | setErrors(parsedMeta.error.issues)
29 | console.log(parsedMeta)
30 | }
31 | }
32 |
33 | setComponent({
34 | template: template.Template,
35 | schema: schema,
36 | })
37 | }
38 |
39 | if (!component && data) {
40 | getTemplate()
41 | }
42 | }, [component, data])
43 |
44 | if (!component || !data) {
45 | return null
46 | }
47 |
48 | return (
49 |
56 |
57 | {errors ? (
58 |
59 |
60 | Content errors
61 |
62 |
63 | {errors.map((error) => (
64 | <>
65 |
66 | Path
67 | Code
68 | Message
69 |
70 |
71 | {error.path}
72 | {error.code}
73 | {error.message}
74 |
75 | >
76 | ))}
77 |
78 |
79 | ) : (
80 |
81 |
82 |
83 | )}
84 | {pageNumber}
85 |
86 |
87 | )
88 | }
89 |
90 | export default Page
91 |
--------------------------------------------------------------------------------
/src/env.d.ts:
--------------------------------------------------------------------------------
1 | interface Window {
2 | ENV: {
3 | content?: any
4 | dir: string
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/hooks/use-key.ts:
--------------------------------------------------------------------------------
1 | import Mousetrap from 'mousetrap'
2 | import { useEffect } from 'react'
3 |
4 | type Key = Parameters[0]
5 | type Callback = Parameters[1]
6 |
7 | /**
8 | * Bind a keyboard shortcut with [Mousetrap](https://craig.is/killing/mice).
9 | * Callback `fn` should be memoized. `key` does not need to be memoized.
10 | */
11 | export const useKey = (key: Key, fn: Callback) => {
12 | useEffect(() => {
13 | Mousetrap.bind(key, fn)
14 | return () => {
15 | Mousetrap.unbind(key)
16 | }
17 | // JSON.stringify lets us avoid having to memoize the keys at the call site.
18 | // Doing something similar with the callback makes less sense.
19 | /* eslint-disable-next-line react-hooks/exhaustive-deps */
20 | }, [JSON.stringify(key), fn])
21 | }
22 |
--------------------------------------------------------------------------------
/src/main.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom/client'
3 |
4 | import App from './App'
5 |
6 | ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
7 |
8 |
9 | ,
10 | )
11 |
--------------------------------------------------------------------------------
/src/templates/Basic.tsx:
--------------------------------------------------------------------------------
1 | import { z } from 'zod'
2 |
3 | import { Markdown } from './Util'
4 |
5 | export const Schema = z.object({
6 | title: z.string().optional(),
7 | text: z.string().optional(),
8 | text_font_size: z.string().optional(),
9 | })
10 |
11 | type Schema = z.infer
12 |
13 | export const Template = ({ data }: { data: Schema }) => {
14 | const { text, title, text_font_size } = data
15 |
16 | console.log(text)
17 |
18 | return (
19 |
20 | {title && (
21 |
22 |
23 |
24 | )}
25 |
26 | {text && (
27 |
31 |
32 |
33 | )}
34 |
35 | )
36 | }
37 |
--------------------------------------------------------------------------------
/src/templates/Cover.tsx:
--------------------------------------------------------------------------------
1 | import { z } from 'zod'
2 |
3 | import { Markdown } from './Util'
4 |
5 | export const Schema = z.object({
6 | title: z.string(),
7 | })
8 |
9 | type Schema = z.infer
10 |
11 | export const Template = ({ data }: { data: Schema }) => {
12 | const { title } = data
13 |
14 | return (
15 |
16 |
17 |
18 |
19 |
20 | )
21 | }
22 |
--------------------------------------------------------------------------------
/src/templates/FullPageDiagram.tsx:
--------------------------------------------------------------------------------
1 | import { z } from 'zod'
2 |
3 | import { Markdown } from './Util'
4 |
5 | export const Schema = z.object({
6 | title: z.string().optional(),
7 | diagram: z.string(),
8 | diagram_font_size: z.string().optional(),
9 | })
10 |
11 | type Schema = z.infer
12 |
13 | export const Template = ({ data }: { data: Schema }) => {
14 | const { title, diagram, diagram_font_size } = data
15 |
16 | return (
17 |
18 | {title && (
19 |
20 |
21 |
22 | )}
23 |
24 |
31 | {diagram}
32 |
33 |
34 | )
35 | }
36 |
--------------------------------------------------------------------------------
/src/templates/FullPageImage.tsx:
--------------------------------------------------------------------------------
1 | import { z } from 'zod'
2 |
3 | import { Markdown } from './Util'
4 |
5 | export type ObjectFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
6 |
7 | export const Schema = z.object({
8 | image: z.string(),
9 | bg_color: z.string().optional(),
10 | object_fit: z.string().optional(),
11 | title: z.string().optional(),
12 | })
13 |
14 | type Schema = z.infer
15 |
16 | export const Template = ({ data }: { data: Schema }) => {
17 | const { image, bg_color, object_fit, title } = data
18 |
19 | const fit = object_fit ? object_fit : 'cover'
20 |
21 | return (
22 |
28 |
35 |
36 | {title && (
37 |
38 |
39 |
40 |
41 |
42 | )}
43 |
44 | )
45 | }
46 |
--------------------------------------------------------------------------------
/src/templates/HalfPage.tsx:
--------------------------------------------------------------------------------
1 | import { z } from 'zod'
2 |
3 | import type { ObjectFit } from './FullPageImage'
4 | import { Markdown } from './Util'
5 |
6 | export const Schema = z
7 | .object({
8 | title: z.string().optional(),
9 | diagram: z.string(),
10 | image: z.string(),
11 | object_fit: z.string().optional(),
12 | diagram_font_size: z.string().optional(),
13 | text: z.string().optional(),
14 | text_font_size: z.string().optional(),
15 | })
16 | .partial()
17 | .refine(({ diagram, image }) => diagram !== undefined || image !== undefined, {
18 | message: 'Either diagram or image must be defined',
19 | })
20 |
21 | type Schema = z.infer
22 |
23 | export const Template = ({ data }: { data: Schema }) => {
24 | const { title, object_fit, image, diagram, diagram_font_size, text, text_font_size } =
25 | data
26 |
27 | const fit = object_fit ? object_fit : 'cover'
28 |
29 | return (
30 |
31 |
32 | {title && (
33 |
34 |
35 |
36 | )}
37 |
38 | {text && (
39 |
40 |
41 |
42 | )}
43 |
44 |
45 |
46 | {image ? (
47 |
54 | ) : (
55 |
62 | {diagram}
63 |
64 | )}
65 |
66 |
67 | )
68 | }
69 |
--------------------------------------------------------------------------------
/src/templates/TitleMultiColumn.tsx:
--------------------------------------------------------------------------------
1 | import { z } from 'zod'
2 |
3 | import { Markdown } from './Util'
4 |
5 | export const Schema = z.object({
6 | title: z.string().optional(),
7 | text: z.array(z.string()).optional(),
8 | })
9 |
10 | type Schema = z.infer
11 |
12 | export const Template = ({ data }: { data: Schema }) => {
13 | const { text, title } = data
14 |
15 | return (
16 |
17 |
18 | {title && (
19 |
20 |
21 |
22 | )}
23 |
24 |
25 |
26 |
27 | {text && (
28 |
29 | {text.map((col, idx) => (
30 |
35 | ))}
36 |
37 | )}
38 |
39 | )
40 | }
41 |
--------------------------------------------------------------------------------
/src/templates/Util.tsx:
--------------------------------------------------------------------------------
1 | import hljs from 'highlight.js'
2 | import { marked } from 'marked'
3 | import { useEffect, useLayoutEffect, useRef, useState } from 'react'
4 | import type { ReactNode } from 'react'
5 |
6 | export const Markdown = ({
7 | content,
8 | className = '',
9 | }: {
10 | content: string
11 | className?: string
12 | }) => {
13 | const wrapper = useRef(null)
14 |
15 | useEffect(() => {
16 | if (!wrapper || !wrapper.current) return
17 |
18 | const elements = wrapper.current.querySelectorAll('pre code')
19 |
20 | if (elements) {
21 | elements.forEach((el) => {
22 | hljs.highlightElement(el as HTMLElement)
23 | })
24 | }
25 | }, [])
26 |
27 | return (
28 |
35 | )
36 | }
37 |
38 | interface FitTextProps {
39 | children: ReactNode
40 | className?: string
41 | }
42 |
43 | export const FitText = ({ children, className = '' }: FitTextProps) => {
44 | const containerRef = useRef(null)
45 | const textRef = useRef(null)
46 | const [fontSize, setFontSize] = useState()
47 | const [visible, setVisible] = useState(false)
48 |
49 | useLayoutEffect(() => {
50 | const fitTextToContainer = () => {
51 | if (containerRef.current && textRef.current) {
52 | if (!fontSize) {
53 | const size = parseFloat(
54 | window.getComputedStyle(textRef.current, null).getPropertyValue('font-size') ||
55 | '120',
56 | )
57 |
58 | setFontSize(size)
59 | return
60 | }
61 |
62 | const containerHeight = containerRef.current.offsetHeight
63 | const textHeight = textRef.current.offsetHeight
64 |
65 | if (textHeight > containerHeight) {
66 | setFontSize(fontSize * 0.9)
67 | } else {
68 | setVisible(true)
69 | }
70 | }
71 | }
72 |
73 | fitTextToContainer()
74 | }, [fontSize])
75 |
76 | return (
77 |
82 |
83 | {children}
84 |
85 |
86 | )
87 | }
88 |
--------------------------------------------------------------------------------
/src/toml.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.toml' {
2 | const value: any
3 | export default value
4 | }
5 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/starter/.npmignore:
--------------------------------------------------------------------------------
1 | main/node_modules
--------------------------------------------------------------------------------
/starter/README.md:
--------------------------------------------------------------------------------
1 | # Fable Creator
2 |
3 | A generator for presentations at Oxide.
4 |
5 | To get started, open a new shell and run:
6 |
7 | ```sh
8 | npx @oxide/create-fable@latest
9 | ```
10 |
11 | ## PDF Export
12 |
13 | Run `npm run export-pdf` to convert the presentation to a PDF. It is saved in the current
14 | directory as `export.pdf`.
15 |
--------------------------------------------------------------------------------
/starter/index.js:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env node
2 | import fs from 'fs'
3 | import inquirer from 'inquirer'
4 | import * as url from 'url'
5 |
6 | const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
7 |
8 | const QUESTIONS = [
9 | {
10 | name: 'project-name',
11 | type: 'input',
12 | message: 'Project name:',
13 | validate: function (input) {
14 | if (/^([A-Za-z\-\_\d])+$/.test(input)) return true
15 | else return 'Project name may only include letters, numbers, underscores and hashes.'
16 | },
17 | },
18 | ]
19 |
20 | const CURR_DIR = process.cwd()
21 |
22 | inquirer.prompt(QUESTIONS).then((answers) => {
23 | const projectName = answers['project-name']
24 | const templateName = 'main'
25 | const templatePath = `${__dirname}${templateName}`
26 |
27 | fs.mkdirSync(`${CURR_DIR}/${projectName}`)
28 |
29 | try {
30 | createDirectoryContents(projectName, templatePath, projectName)
31 |
32 | console.log(`🎉 Presentation generated!`)
33 | console.log(
34 | `💿 \`cd\` into "${CURR_DIR}/${projectName}" and run \`npm install\` to install dependencies`,
35 | )
36 | console.log(`🪄 Run \`npm run start\` and check out the README to get started`)
37 | } catch {
38 | console.error('🚨 Something went wrong')
39 | }
40 | })
41 |
42 | function createDirectoryContents(projectName, templatePath, newProjectPath) {
43 | const filesToCreate = fs.readdirSync(templatePath)
44 |
45 | filesToCreate.forEach((file) => {
46 | const origFilePath = `${templatePath}/${file}`
47 |
48 | // get stats about the current file
49 | const stats = fs.statSync(origFilePath)
50 |
51 | if (
52 | origFilePath.includes('main/node_modules') ||
53 | file === '.gitignore' ||
54 | file === 'package-lock.json' ||
55 | file === '.DS_Store'
56 | ) {
57 | return
58 | }
59 |
60 | if (stats.isFile()) {
61 | const writePath = `${CURR_DIR}/${newProjectPath}/${file}`
62 |
63 | if (file == 'package.json') {
64 | let contents = fs.readFileSync(origFilePath, 'utf8')
65 | // Generator uses npm version (when it exists)
66 | contents = contents.replace(
67 | `"@oxide/fable": "file:../../"`,
68 | `"@oxide/fable": "^0.1.5"`,
69 | )
70 | fs.writeFileSync(writePath, contents, 'utf8')
71 | } else if (file == 'index.html') {
72 | let contents = fs.readFileSync(origFilePath, 'utf8')
73 | // Replace title for user provided one
74 | contents = contents.replace('Fable – Presentation Generator', toTitle(projectName))
75 | fs.writeFileSync(writePath, contents, 'utf8')
76 | } else {
77 | fs.copyFileSync(origFilePath, writePath)
78 | }
79 | } else if (stats.isDirectory()) {
80 | fs.mkdirSync(`${CURR_DIR}/${newProjectPath}/${file}`)
81 |
82 | // recursive call
83 | createDirectoryContents(
84 | projectName,
85 | `${templatePath}/${file}`,
86 | `${newProjectPath}/${file}`,
87 | )
88 | }
89 | })
90 | }
91 |
92 | function toTitle(str) {
93 | let string = str.replace('-', ' ')
94 |
95 | return string.replace(/\w\S*/g, function (txt) {
96 | return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
97 | })
98 | }
99 |
--------------------------------------------------------------------------------
/starter/main/.gitignore:
--------------------------------------------------------------------------------
1 | package-lock.json
2 | export.pdf
--------------------------------------------------------------------------------
/starter/main/README.md:
--------------------------------------------------------------------------------
1 | # Fable Starter
2 |
--------------------------------------------------------------------------------
/starter/main/content.toml:
--------------------------------------------------------------------------------
1 | [config]
2 | page_numbers = true
3 |
4 | [[pages]]
5 | template = "Cover"
6 | title = "*The Unknown:* Unveiling the Wonders of the Universe"
7 |
8 | [[pages]]
9 | template = "Basic"
10 | title = "A Journey Through the Cosmos"
11 | text = """
12 | - In the _vastness of space_, time and distance are but mere illusions
13 | - Worlds exist beyond our wildest imaginations
14 | - On these worlds, _beings of all shapes and sizes_ dwell
15 | - With societies and cultures _as diverse as the stars_ that light up the skies above
16 | - They are **united** in their quest for knowledge and understanding
17 | - The universe itself is our teacher, and its secrets our endless source of inspiration
18 | """
19 |
20 | [[pages]]
21 | template = "TitleMultiColumn"
22 | title = "In the Vastness of Space, Time and Distance Are but Mere Illusions"
23 | text = [
24 | "Amidst the lush forests and shimmering lakes, ancient beings of immense power and wisdom dwell, watching over the affairs of mortals with a watchful eye.",
25 | "With societies and cultures as diverse as the stars that light up the skies above. On these worlds, beings of all shapes and sizes dwell.",
26 | "The universe itself is our teacher, and its secrets our endless source of inspiration",
27 | ]
28 |
29 | [[pages]]
30 | template = "Basic"
31 | title = "The Verdant Lands"
32 | text = """
33 | **Amidst the lush forests and shimmering lakes**, ancient beings of immense power and wisdom dwell, watching over the affairs of mortals with a watchful eye.
34 | 
35 | """
36 |
37 | [[pages]]
38 | template = "FullPageDiagram"
39 | title = "Phoenix"
40 | diagram_font_size = "28px"
41 | diagram = """
42 | .-==========
43 | .-' O =====
44 | /___ ===
45 | \\_ |
46 | _____________________________) (_____________________________
47 | \\___________ .' `, ____________/
48 | \\__________`. |||< `. .' >||| .'__________/
49 | \\_________`._ ||| < `-..-' > ||| _.'_________/
50 | \\_________`-..|_ _ < > _ _|..-'_________/
51 | \\_________ |_| // \\\\ |_| _________/
52 | .-\\ // \\\\ /-.
53 | , . _.'.- `._ _.' -.`._ . ,
54 | <<<<>>>> .' .' / '``----''` \\ `. `. <<<<>>>>
55 | '/\\` / .' .'.'/|..|\\`.`. `. \\ '/\\`
56 | (()) ` / / .'| |||| |`. \\ \\ ' (())
57 | /\\ ::_.' .' /| || |\\ `. `._:: /\\
58 | //\\\\ '``.' | | || | | `.''` //\\\\
59 | //\\\\ .` .` | || | '. '. //\\\\
60 | //\\\\ ` | `' | ' //\\\\
61 | \\\\// \\\\//
62 | \\/ MJP \\/
63 | """
64 |
65 | [[pages]]
66 | template = "Basic"
67 | title = "Time and Space"
68 | text = """
69 | The human mind, too, is a wonder of the universe, capable of unlocking the secrets of existence and pushing the boundaries of what we know to be true. Through science and philosophy, we seek to understand the nature of reality.
70 |
71 | But as we delve deeper into the unknown, we come to realize that the universe is not always as it seems. Time and space warp and twist, and the very fabric of reality is subject to change. And as we grapple with the implications of our discoveries, we are forced to confront the fundamental questions of our existence.
72 | """
73 |
74 | [[pages]]
75 | template = "FullPageImage"
76 | image = "/large-placeholder.svg"
77 | object_fit = "contain"
78 |
79 | [[pages]]
80 | template = "Basic"
81 | title = "The System"
82 | text = """
83 | The console flickers to life as he approaches, the `lines of code` transforming into a stream of data that flows across the screen. He studies the data, his eyes scanning over the numbers and symbols with practiced ease.
84 |
85 | ```js
86 | function processSensorData(sensorData) {
87 | if (implant.isActive() && sensorData.value > implant.getThreshold()) {
88 | implant.triggerAlert();
89 | }
90 | }
91 | ```
92 | """
93 |
94 | [[pages]]
95 | template = "HalfPage"
96 | title = "Mr. Whiskers"
97 | text = """
98 | He sat atop the garden wall, his fur ruffled by the autumn breeze.
99 |
100 | He watched as the leaves danced in the wind, their vibrant colors a symphony of beauty.
101 | """
102 | diagram_font_size = "24px"
103 | diagram = """
104 | o
105 | .
106 | ,' `.
107 | ,' `.
108 | ,' `.
109 | ,' `.
110 | ,' `.
111 | ,' `.
112 | _,'__________________________`._
113 | |.------------------------------.|
114 | || ||
115 | || i~. .~i ||
116 | || (:.`..-~~~-..'.:) ||
117 | || i: ' : : : ` :i ||
118 | || :° :_ : : _: °: ||
119 | || !:.: o`. .'o :.:! ||
120 | || "L:_` .'_`. '_:J" ||
121 | || `:-:: `.' ::-:' ||
122 | || )~-. -^- .-~( ||
123 | || : :((`~-~')): : ||
124 | || (.`._ -:- _.'.) ||
125 | || /\\._ ~`·.·'~ _.\\ ||
126 | || i-._~·-..·..-·~_.-i adl||
127 | ||______________________________||
128 | `--------------------------------'
129 | """
130 |
131 | [[pages]]
132 | template = "HalfPage"
133 | title = "Mr. Whiskers"
134 | text = """
135 | He sat atop the garden wall, his fur ruffled by the autumn breeze.
136 |
137 | He watched as the leaves danced in the wind, their vibrant colors a symphony of beauty.
138 | """
139 | image = "/large-placeholder.svg"
140 |
141 | [[pages]]
142 | template = "Cover"
143 | title = "_Thank you!_"
144 |
145 |
146 | # [[pages]]
147 | # custom_template = true
148 | # template = "New"
149 | # number = 0
--------------------------------------------------------------------------------
/starter/main/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Fable – Presentation Generator
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/starter/main/index.js:
--------------------------------------------------------------------------------
1 | import fable from '@oxide/fable'
2 | import { fileURLToPath } from 'url'
3 |
4 | const __dirname = fileURLToPath(new URL('.', import.meta.url))
5 |
6 | fable(__dirname)
7 |
--------------------------------------------------------------------------------
/starter/main/main.js:
--------------------------------------------------------------------------------
1 | import '@oxide/fable/src/main.tsx'
2 |
3 | import data from './content.toml'
4 |
5 | window.ENV = {
6 | content: data,
7 | dir: import.meta.env.VITE_DIR,
8 | }
9 |
--------------------------------------------------------------------------------
/starter/main/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fable-example",
3 | "version": "0.1.5",
4 | "description": "",
5 | "main": "index.js",
6 | "type": "module",
7 | "scripts": {
8 | "start": "run-p start:*",
9 | "start:server": "node index.js",
10 | "start:css": "NODE_ENV=production npm run generate:css -- --watch",
11 | "generate:css": "tailwindcss -i styles/index.css -o public/styles.css",
12 | "test": "echo \"Error: no test specified\" && exit 1",
13 | "export-pdf": "node -e \"(async () => { const dir = process.argv[1] || process.cwd(); const { exportPdf } = await import('@oxide/fable'); exportPdf(dir); })();\" $1"
14 | },
15 | "dependencies": {
16 | "@oxide/fable": "file:../../",
17 | "npm-run-all": "^4.1.5",
18 | "react": "^18.2.0",
19 | "react-dom": "^18.2.0",
20 | "tailwindcss": "^3.3.3"
21 | },
22 | "author": "Oxide Computer Company ",
23 | "license": "MPL 2.0"
24 | }
25 |
--------------------------------------------------------------------------------
/starter/main/public/fonts/Inter-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/Inter-Italic.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/Inter-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/Inter-Light.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/Inter-LightItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/Inter-LightItalic.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/Inter-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/Inter-Regular.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/Inter-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/Inter-SemiBold.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/Inter-SemiBoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/Inter-SemiBoldItalic.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/InterDisplay-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/InterDisplay-Light.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/InterDisplay-LightItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/InterDisplay-LightItalic.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/InterDisplay-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/InterDisplay-Regular.woff2
--------------------------------------------------------------------------------
/starter/main/public/fonts/InterDisplay-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oxidecomputer/fable/14d160a4e54a3e47c4c09fcb2be2ce595ced7c61/starter/main/public/fonts/InterDisplay-SemiBold.woff2
--------------------------------------------------------------------------------
/starter/main/public/large-placeholder.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/starter/main/public/small-placeholder.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/starter/main/public/styles.css:
--------------------------------------------------------------------------------
1 | /*
2 | ! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com
3 | */
4 |
5 | /*
6 | 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
7 | 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
8 | */
9 |
10 | *,
11 | ::before,
12 | ::after {
13 | box-sizing: border-box;
14 | /* 1 */
15 | border-width: 0;
16 | /* 2 */
17 | border-style: solid;
18 | /* 2 */
19 | border-color: #e5e7eb;
20 | /* 2 */
21 | }
22 |
23 | ::before,
24 | ::after {
25 | --tw-content: '';
26 | }
27 |
28 | /*
29 | 1. Use a consistent sensible line-height in all browsers.
30 | 2. Prevent adjustments of font size after orientation changes in iOS.
31 | 3. Use a more readable tab size.
32 | 4. Use the user's configured `sans` font-family by default.
33 | 5. Use the user's configured `sans` font-feature-settings by default.
34 | 6. Use the user's configured `sans` font-variation-settings by default.
35 | */
36 |
37 | html {
38 | line-height: 1.5;
39 | /* 1 */
40 | -webkit-text-size-adjust: 100%;
41 | /* 2 */
42 | -moz-tab-size: 4;
43 | /* 3 */
44 | -o-tab-size: 4;
45 | tab-size: 4;
46 | /* 3 */
47 | font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
48 | /* 4 */
49 | font-feature-settings: normal;
50 | /* 5 */
51 | font-variation-settings: normal;
52 | /* 6 */
53 | }
54 |
55 | /*
56 | 1. Remove the margin in all browsers.
57 | 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
58 | */
59 |
60 | body {
61 | margin: 0;
62 | /* 1 */
63 | line-height: inherit;
64 | /* 2 */
65 | }
66 |
67 | /*
68 | 1. Add the correct height in Firefox.
69 | 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
70 | 3. Ensure horizontal rules are visible by default.
71 | */
72 |
73 | hr {
74 | height: 0;
75 | /* 1 */
76 | color: inherit;
77 | /* 2 */
78 | border-top-width: 1px;
79 | /* 3 */
80 | }
81 |
82 | /*
83 | Add the correct text decoration in Chrome, Edge, and Safari.
84 | */
85 |
86 | abbr:where([title]) {
87 | -webkit-text-decoration: underline dotted;
88 | text-decoration: underline dotted;
89 | }
90 |
91 | /*
92 | Remove the default font size and weight for headings.
93 | */
94 |
95 | h1,
96 | h2,
97 | h3,
98 | h4,
99 | h5,
100 | h6 {
101 | font-size: inherit;
102 | font-weight: inherit;
103 | }
104 |
105 | /*
106 | Reset links to optimize for opt-in styling instead of opt-out.
107 | */
108 |
109 | a {
110 | color: inherit;
111 | text-decoration: inherit;
112 | }
113 |
114 | /*
115 | Add the correct font weight in Edge and Safari.
116 | */
117 |
118 | b,
119 | strong {
120 | font-weight: bolder;
121 | }
122 |
123 | /*
124 | 1. Use the user's configured `mono` font family by default.
125 | 2. Correct the odd `em` font sizing in all browsers.
126 | */
127 |
128 | code,
129 | kbd,
130 | samp,
131 | pre {
132 | font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
133 | /* 1 */
134 | font-size: 1em;
135 | /* 2 */
136 | }
137 |
138 | /*
139 | Add the correct font size in all browsers.
140 | */
141 |
142 | small {
143 | font-size: 80%;
144 | }
145 |
146 | /*
147 | Prevent `sub` and `sup` elements from affecting the line height in all browsers.
148 | */
149 |
150 | sub,
151 | sup {
152 | font-size: 75%;
153 | line-height: 0;
154 | position: relative;
155 | vertical-align: baseline;
156 | }
157 |
158 | sub {
159 | bottom: -0.25em;
160 | }
161 |
162 | sup {
163 | top: -0.5em;
164 | }
165 |
166 | /*
167 | 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
168 | 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
169 | 3. Remove gaps between table borders by default.
170 | */
171 |
172 | table {
173 | text-indent: 0;
174 | /* 1 */
175 | border-color: inherit;
176 | /* 2 */
177 | border-collapse: collapse;
178 | /* 3 */
179 | }
180 |
181 | /*
182 | 1. Change the font styles in all browsers.
183 | 2. Remove the margin in Firefox and Safari.
184 | 3. Remove default padding in all browsers.
185 | */
186 |
187 | button,
188 | input,
189 | optgroup,
190 | select,
191 | textarea {
192 | font-family: inherit;
193 | /* 1 */
194 | font-feature-settings: inherit;
195 | /* 1 */
196 | font-variation-settings: inherit;
197 | /* 1 */
198 | font-size: 100%;
199 | /* 1 */
200 | font-weight: inherit;
201 | /* 1 */
202 | line-height: inherit;
203 | /* 1 */
204 | color: inherit;
205 | /* 1 */
206 | margin: 0;
207 | /* 2 */
208 | padding: 0;
209 | /* 3 */
210 | }
211 |
212 | /*
213 | Remove the inheritance of text transform in Edge and Firefox.
214 | */
215 |
216 | button,
217 | select {
218 | text-transform: none;
219 | }
220 |
221 | /*
222 | 1. Correct the inability to style clickable types in iOS and Safari.
223 | 2. Remove default button styles.
224 | */
225 |
226 | button,
227 | [type='button'],
228 | [type='reset'],
229 | [type='submit'] {
230 | -webkit-appearance: button;
231 | /* 1 */
232 | background-color: transparent;
233 | /* 2 */
234 | background-image: none;
235 | /* 2 */
236 | }
237 |
238 | /*
239 | Use the modern Firefox focus style for all focusable elements.
240 | */
241 |
242 | :-moz-focusring {
243 | outline: auto;
244 | }
245 |
246 | /*
247 | Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
248 | */
249 |
250 | :-moz-ui-invalid {
251 | box-shadow: none;
252 | }
253 |
254 | /*
255 | Add the correct vertical alignment in Chrome and Firefox.
256 | */
257 |
258 | progress {
259 | vertical-align: baseline;
260 | }
261 |
262 | /*
263 | Correct the cursor style of increment and decrement buttons in Safari.
264 | */
265 |
266 | ::-webkit-inner-spin-button,
267 | ::-webkit-outer-spin-button {
268 | height: auto;
269 | }
270 |
271 | /*
272 | 1. Correct the odd appearance in Chrome and Safari.
273 | 2. Correct the outline style in Safari.
274 | */
275 |
276 | [type='search'] {
277 | -webkit-appearance: textfield;
278 | /* 1 */
279 | outline-offset: -2px;
280 | /* 2 */
281 | }
282 |
283 | /*
284 | Remove the inner padding in Chrome and Safari on macOS.
285 | */
286 |
287 | ::-webkit-search-decoration {
288 | -webkit-appearance: none;
289 | }
290 |
291 | /*
292 | 1. Correct the inability to style clickable types in iOS and Safari.
293 | 2. Change font properties to `inherit` in Safari.
294 | */
295 |
296 | ::-webkit-file-upload-button {
297 | -webkit-appearance: button;
298 | /* 1 */
299 | font: inherit;
300 | /* 2 */
301 | }
302 |
303 | /*
304 | Add the correct display in Chrome and Safari.
305 | */
306 |
307 | summary {
308 | display: list-item;
309 | }
310 |
311 | /*
312 | Removes the default spacing and border for appropriate elements.
313 | */
314 |
315 | blockquote,
316 | dl,
317 | dd,
318 | h1,
319 | h2,
320 | h3,
321 | h4,
322 | h5,
323 | h6,
324 | hr,
325 | figure,
326 | p,
327 | pre {
328 | margin: 0;
329 | }
330 |
331 | fieldset {
332 | margin: 0;
333 | padding: 0;
334 | }
335 |
336 | legend {
337 | padding: 0;
338 | }
339 |
340 | ol,
341 | ul,
342 | menu {
343 | list-style: none;
344 | margin: 0;
345 | padding: 0;
346 | }
347 |
348 | /*
349 | Reset default styling for dialogs.
350 | */
351 |
352 | dialog {
353 | padding: 0;
354 | }
355 |
356 | /*
357 | Prevent resizing textareas horizontally by default.
358 | */
359 |
360 | textarea {
361 | resize: vertical;
362 | }
363 |
364 | /*
365 | 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
366 | 2. Set the default placeholder color to the user's configured gray 400 color.
367 | */
368 |
369 | input::-moz-placeholder, textarea::-moz-placeholder {
370 | opacity: 1;
371 | /* 1 */
372 | color: #9ca3af;
373 | /* 2 */
374 | }
375 |
376 | input::placeholder,
377 | textarea::placeholder {
378 | opacity: 1;
379 | /* 1 */
380 | color: #9ca3af;
381 | /* 2 */
382 | }
383 |
384 | /*
385 | Set the default cursor for buttons.
386 | */
387 |
388 | button,
389 | [role="button"] {
390 | cursor: pointer;
391 | }
392 |
393 | /*
394 | Make sure disabled buttons don't get the pointer cursor.
395 | */
396 |
397 | :disabled {
398 | cursor: default;
399 | }
400 |
401 | /*
402 | 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
403 | 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
404 | This can trigger a poorly considered lint error in some tools but is included by design.
405 | */
406 |
407 | img,
408 | svg,
409 | video,
410 | canvas,
411 | audio,
412 | iframe,
413 | embed,
414 | object {
415 | display: block;
416 | /* 1 */
417 | vertical-align: middle;
418 | /* 2 */
419 | }
420 |
421 | /*
422 | Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
423 | */
424 |
425 | img,
426 | video {
427 | max-width: 100%;
428 | height: auto;
429 | }
430 |
431 | /* Make elements with the HTML hidden attribute stay hidden by default */
432 |
433 | [hidden] {
434 | display: none;
435 | }
436 |
437 | *, ::before, ::after {
438 | --tw-border-spacing-x: 0;
439 | --tw-border-spacing-y: 0;
440 | --tw-translate-x: 0;
441 | --tw-translate-y: 0;
442 | --tw-rotate: 0;
443 | --tw-skew-x: 0;
444 | --tw-skew-y: 0;
445 | --tw-scale-x: 1;
446 | --tw-scale-y: 1;
447 | --tw-pan-x: ;
448 | --tw-pan-y: ;
449 | --tw-pinch-zoom: ;
450 | --tw-scroll-snap-strictness: proximity;
451 | --tw-gradient-from-position: ;
452 | --tw-gradient-via-position: ;
453 | --tw-gradient-to-position: ;
454 | --tw-ordinal: ;
455 | --tw-slashed-zero: ;
456 | --tw-numeric-figure: ;
457 | --tw-numeric-spacing: ;
458 | --tw-numeric-fraction: ;
459 | --tw-ring-inset: ;
460 | --tw-ring-offset-width: 0px;
461 | --tw-ring-offset-color: #fff;
462 | --tw-ring-color: rgb(59 130 246 / 0.5);
463 | --tw-ring-offset-shadow: 0 0 #0000;
464 | --tw-ring-shadow: 0 0 #0000;
465 | --tw-shadow: 0 0 #0000;
466 | --tw-shadow-colored: 0 0 #0000;
467 | --tw-blur: ;
468 | --tw-brightness: ;
469 | --tw-contrast: ;
470 | --tw-grayscale: ;
471 | --tw-hue-rotate: ;
472 | --tw-invert: ;
473 | --tw-saturate: ;
474 | --tw-sepia: ;
475 | --tw-drop-shadow: ;
476 | --tw-backdrop-blur: ;
477 | --tw-backdrop-brightness: ;
478 | --tw-backdrop-contrast: ;
479 | --tw-backdrop-grayscale: ;
480 | --tw-backdrop-hue-rotate: ;
481 | --tw-backdrop-invert: ;
482 | --tw-backdrop-opacity: ;
483 | --tw-backdrop-saturate: ;
484 | --tw-backdrop-sepia: ;
485 | }
486 |
487 | ::backdrop {
488 | --tw-border-spacing-x: 0;
489 | --tw-border-spacing-y: 0;
490 | --tw-translate-x: 0;
491 | --tw-translate-y: 0;
492 | --tw-rotate: 0;
493 | --tw-skew-x: 0;
494 | --tw-skew-y: 0;
495 | --tw-scale-x: 1;
496 | --tw-scale-y: 1;
497 | --tw-pan-x: ;
498 | --tw-pan-y: ;
499 | --tw-pinch-zoom: ;
500 | --tw-scroll-snap-strictness: proximity;
501 | --tw-gradient-from-position: ;
502 | --tw-gradient-via-position: ;
503 | --tw-gradient-to-position: ;
504 | --tw-ordinal: ;
505 | --tw-slashed-zero: ;
506 | --tw-numeric-figure: ;
507 | --tw-numeric-spacing: ;
508 | --tw-numeric-fraction: ;
509 | --tw-ring-inset: ;
510 | --tw-ring-offset-width: 0px;
511 | --tw-ring-offset-color: #fff;
512 | --tw-ring-color: rgb(59 130 246 / 0.5);
513 | --tw-ring-offset-shadow: 0 0 #0000;
514 | --tw-ring-shadow: 0 0 #0000;
515 | --tw-shadow: 0 0 #0000;
516 | --tw-shadow-colored: 0 0 #0000;
517 | --tw-blur: ;
518 | --tw-brightness: ;
519 | --tw-contrast: ;
520 | --tw-grayscale: ;
521 | --tw-hue-rotate: ;
522 | --tw-invert: ;
523 | --tw-saturate: ;
524 | --tw-sepia: ;
525 | --tw-drop-shadow: ;
526 | --tw-backdrop-blur: ;
527 | --tw-backdrop-brightness: ;
528 | --tw-backdrop-contrast: ;
529 | --tw-backdrop-grayscale: ;
530 | --tw-backdrop-hue-rotate: ;
531 | --tw-backdrop-invert: ;
532 | --tw-backdrop-opacity: ;
533 | --tw-backdrop-saturate: ;
534 | --tw-backdrop-sepia: ;
535 | }
536 |
537 | .flex {
538 | display: flex;
539 | }
540 |
541 | .items-center {
542 | align-items: center;
543 | }
544 |
545 | .justify-center {
546 | justify-content: center;
547 | }
548 |
549 | .\!bg-indigo-950 {
550 | --tw-bg-opacity: 1 !important;
551 | background-color: rgb(30 27 75 / var(--tw-bg-opacity)) !important;
552 | }
553 |
554 | .text-center {
555 | text-align: center;
556 | }
557 |
558 | .text-\[7rem\] {
559 | font-size: 7rem;
560 | }
561 |
562 | .font-\[300\] {
563 | font-weight: 300;
564 | }
565 |
566 | .leading-\[1\.1\] {
567 | line-height: 1.1;
568 | }
569 |
570 | @font-face {
571 | font-family: 'Inter';
572 |
573 | src: url('fonts/Inter-Regular.woff2') format('woff2');
574 |
575 | font-weight: normal;
576 |
577 | font-style: normal;
578 | }
579 |
580 | @font-face {
581 | font-family: 'Inter';
582 |
583 | src: url('fonts/Inter-Italic.woff2') format('woff2');
584 |
585 | font-weight: normal;
586 |
587 | font-style: italic;
588 | }
589 |
590 | @font-face {
591 | font-family: 'Inter';
592 |
593 | src: url('fonts/Inter-Light.woff2') format('woff2');
594 |
595 | font-weight: 300;
596 |
597 | font-style: normal;
598 | }
599 |
600 | @font-face {
601 | font-family: 'Inter';
602 |
603 | src: url('fonts/Inter-LightItalic.woff2') format('woff2');
604 |
605 | font-weight: 300;
606 |
607 | font-style: italic;
608 | }
609 |
610 | @font-face {
611 | font-family: 'Inter';
612 |
613 | src: url('fonts/Inter-SemiBold.woff2') format('woff2');
614 |
615 | font-weight: 600;
616 |
617 | font-style: normal;
618 | }
619 |
620 | @font-face {
621 | font-family: 'Inter';
622 |
623 | src: url('fonts/Inter-SemiBoldItalic.woff2') format('woff2');
624 |
625 | font-weight: 600;
626 |
627 | font-style: italic;
628 | }
629 |
630 | @font-face {
631 | font-family: 'Inter Display';
632 |
633 | src: url('fonts/InterDisplay-Regular.woff2') format('woff2');
634 |
635 | font-weight: normal;
636 |
637 | font-style: normal;
638 | }
639 |
640 | @font-face {
641 | font-family: 'Inter Display';
642 |
643 | src: url('fonts/InterDisplay-Light.woff2') format('woff2');
644 |
645 | font-weight: 300;
646 |
647 | font-style: normal;
648 | }
649 |
650 | @font-face {
651 | font-family: 'Inter Display';
652 |
653 | src: url('fonts/InterDisplay-LightItalic.woff2') format('woff2');
654 |
655 | font-weight: 300;
656 |
657 | font-style: italic;
658 | }
659 |
660 | @font-face {
661 | font-family: 'Inter Display';
662 |
663 | src: url('fonts/InterDisplay-SemiBold.woff2') format('woff2');
664 |
665 | font-weight: 600;
666 |
667 | font-style: normal;
668 | }
669 |
670 | body {
671 | font-family: 'Inter', sans-serif;
672 | }
673 |
674 | h1,
675 | h2,
676 | h3,
677 | h4,
678 | h5 {
679 | font-family: 'Inter Display', sans-serif;
680 | text-wrap: balance;
681 | }
682 |
683 | .markdown img {
684 | margin-top: 1.25rem;
685 | margin-bottom: 1.25rem;
686 | max-height: 100%;
687 | max-width: 100%;
688 | border-radius: 0.5rem;
689 | -o-object-fit: cover;
690 | object-fit: cover;
691 | }
692 |
693 | .page-padding {
694 | padding: 2rem;
695 | }
696 |
697 | .large-title {
698 | margin-bottom: 3rem;
699 | padding-right: 5rem;
700 | font-size: 3rem;
701 | line-height: 1;
702 | font-weight: 300;
703 | }
704 |
705 | .body-md {
706 | font-size: 1.5rem;
707 | line-height: 2rem;
708 | --tw-text-opacity: 1;
709 | color: rgb(163 163 163 / var(--tw-text-opacity));
710 | line-height: 1.33;
711 | }
712 |
713 | .body-padding p {
714 | padding-right: 5rem;
715 | }
716 |
717 | .body-sm {
718 | font-size: 1rem;
719 | line-height: 1.5rem;
720 | --tw-text-opacity: 1;
721 | color: rgb(163 163 163 / var(--tw-text-opacity));
722 | }
723 |
724 | .markdown {
725 | display: flex;
726 | flex-direction: column;
727 | }
728 |
729 | .markdown > :not([hidden]) ~ :not([hidden]) {
730 | --tw-space-y-reverse: 0;
731 | margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));
732 | margin-bottom: calc(1.25rem * var(--tw-space-y-reverse));
733 | }
734 |
735 | .markdown > *:last-child {
736 | margin-bottom: 0px;
737 | }
738 |
739 | .error-table {
740 | font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
741 | font-size: 1rem;
742 | line-height: 1.5rem;
743 | border-collapse: collapse;
744 | width: 100%;
745 | }
746 |
747 | .error-table td,
748 | .error-table th {
749 | border-width: 1px;
750 | --tw-border-opacity: 1;
751 | border-color: rgb(163 163 163 / var(--tw-border-opacity));
752 | padding: 0.5rem;
753 | text-align: left;
754 | text-transform: uppercase;
755 | }
756 |
757 | .error-table th {
758 | --tw-bg-opacity: 1;
759 | background-color: rgb(209 213 219 / var(--tw-bg-opacity));
760 | --tw-text-opacity: 1;
761 | color: rgb(163 163 163 / var(--tw-text-opacity));
762 | }
763 |
764 | .error-table td {
765 | --tw-bg-opacity: 1;
766 | background-color: rgb(17 24 39 / var(--tw-bg-opacity));
767 | }
768 |
769 | .list-item {
770 | border-bottom-width: 1px;
771 | --tw-border-opacity: 1;
772 | border-color: rgb(163 163 163 / var(--tw-border-opacity));
773 | padding-top: 2rem;
774 | padding-bottom: 2rem;
775 | padding-right: 5rem;
776 | font-size: 1.875rem;
777 | line-height: 2.25rem;
778 | --tw-text-opacity: 1;
779 | color: rgb(163 163 163 / var(--tw-text-opacity));
780 | }
781 |
782 | code:not(pre code) {
783 | margin-left: 0.25rem;
784 | margin-right: 0.25rem;
785 | border-radius: 0.25rem;
786 | border-width: 1px;
787 | --tw-border-opacity: 1;
788 | border-color: rgb(75 85 99 / var(--tw-border-opacity));
789 | --tw-bg-opacity: 1;
790 | background-color: rgb(38 38 38 / var(--tw-bg-opacity));
791 | padding-left: 0.25rem;
792 | padding-right: 0.25rem;
793 | padding-top: 0px;
794 | padding-bottom: 0px;
795 | font-size: 0.825em;
796 | }
797 |
798 | em {
799 | font-style: normal;
800 | --tw-text-opacity: 1;
801 | color: rgb(165 180 252 / var(--tw-text-opacity));
802 | }
803 |
804 | strong {
805 | font-weight: 600;
806 | --tw-text-opacity: 1;
807 | color: rgb(229 229 229 / var(--tw-text-opacity));
808 | }
809 |
810 | .markdown ul,
811 | .markdown ol {
812 | list-style: revert;
813 | margin-left: 1rem;
814 | }
815 |
816 | ul,
817 | ol {
818 | margin-left: 1rem;
819 | }
820 |
821 | ul li::marker,
822 | ol li::marker {
823 | --tw-text-opacity: 1;
824 | color: rgb(163 163 163 / var(--tw-text-opacity));
825 | }
826 |
827 | ul li,
828 | ol li {
829 | padding-left: 0.5rem;
830 | }
831 |
832 | ul {
833 | list-style-type: disc;
834 | }
835 |
836 | ul ul li {
837 | list-style-type: circle;
838 | }
839 |
840 | ul ul ul li {
841 | list-style-type: square;
842 | }
843 |
844 | ul ul ul ul li {
845 | list-style-type: disc;
846 | }
847 |
848 | ol {
849 | list-style-type: decimal;
850 | }
851 |
852 | ul .list-item:last-of-type {
853 | border-bottom-width: 0px;
854 | padding-bottom: 0px;
855 | }
856 |
857 | ul .list-item:first-of-type {
858 | padding-top: 0px;
859 | }
860 |
861 | pre {
862 | margin-top: 2.5rem;
863 | margin-bottom: 1.25rem;
864 | border-radius: 0.5rem;
865 | border-width: 1px;
866 | --tw-border-opacity: 1;
867 | border-color: rgb(82 82 82 / var(--tw-border-opacity));
868 | padding: 1.25rem;
869 | line-height: 1;
870 | }
871 |
872 | pre code {
873 | font-size: 0.875rem;
874 | line-height: 1.25rem;
875 | }
876 |
--------------------------------------------------------------------------------
/starter/main/styles/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | @font-face {
6 | font-family: 'Inter';
7 | src: url('fonts/Inter-Regular.woff2') format('woff2');
8 | font-weight: normal;
9 | font-style: normal;
10 | }
11 |
12 | @font-face {
13 | font-family: 'Inter';
14 | src: url('fonts/Inter-Italic.woff2') format('woff2');
15 | font-weight: normal;
16 | font-style: italic;
17 | }
18 |
19 | @font-face {
20 | font-family: 'Inter';
21 | src: url('fonts/Inter-Light.woff2') format('woff2');
22 | font-weight: 300;
23 | font-style: normal;
24 | }
25 |
26 | @font-face {
27 | font-family: 'Inter';
28 | src: url('fonts/Inter-LightItalic.woff2') format('woff2');
29 | font-weight: 300;
30 | font-style: italic;
31 | }
32 |
33 | @font-face {
34 | font-family: 'Inter';
35 | src: url('fonts/Inter-SemiBold.woff2') format('woff2');
36 | font-weight: 600;
37 | font-style: normal;
38 | }
39 |
40 | @font-face {
41 | font-family: 'Inter';
42 | src: url('fonts/Inter-SemiBoldItalic.woff2') format('woff2');
43 | font-weight: 600;
44 | font-style: italic;
45 | }
46 |
47 | @font-face {
48 | font-family: 'Inter Display';
49 | src: url('fonts/InterDisplay-Regular.woff2') format('woff2');
50 | font-weight: normal;
51 | font-style: normal;
52 | }
53 |
54 | @font-face {
55 | font-family: 'Inter Display';
56 | src: url('fonts/InterDisplay-Light.woff2') format('woff2');
57 | font-weight: 300;
58 | font-style: normal;
59 | }
60 |
61 | @font-face {
62 | font-family: 'Inter Display';
63 | src: url('fonts/InterDisplay-LightItalic.woff2') format('woff2');
64 | font-weight: 300;
65 | font-style: italic;
66 | }
67 |
68 | @font-face {
69 | font-family: 'Inter Display';
70 | src: url('fonts/InterDisplay-SemiBold.woff2') format('woff2');
71 | font-weight: 600;
72 | font-style: normal;
73 | }
74 |
75 | body {
76 | font-family: 'Inter', sans-serif;
77 | }
78 |
79 | h1,
80 | h2,
81 | h3,
82 | h4,
83 | h5 {
84 | font-family: 'Inter Display', sans-serif;
85 | text-wrap: balance;
86 | }
87 |
88 | .markdown img {
89 | @apply rounded-lg max-w-full max-h-full object-cover mt-5 mb-5;
90 | }
91 |
92 | .page-padding {
93 | @apply p-8;
94 | }
95 |
96 | .large-title {
97 | @apply text-5xl font-light mb-12 pr-20;
98 | }
99 |
100 | .body-md {
101 | @apply text-2xl text-neutral-400;
102 | line-height: 1.33;
103 | }
104 |
105 | .body-padding p {
106 | @apply pr-20;
107 | }
108 |
109 | .body-sm {
110 | @apply text-base text-neutral-400;
111 | }
112 |
113 | .markdown {
114 | @apply flex flex-col space-y-5;
115 | }
116 |
117 | .markdown > *:last-child {
118 | @apply mb-0;
119 | }
120 |
121 | .error-table {
122 | @apply font-mono text-base;
123 | border-collapse: collapse;
124 | width: 100%;
125 | }
126 |
127 | .error-table td,
128 | .error-table th {
129 | @apply uppercase border border-neutral-400 text-left p-2;
130 | }
131 |
132 | .error-table th {
133 | @apply bg-gray-300 text-neutral-400;
134 | }
135 |
136 | .error-table td {
137 | @apply bg-gray-900;
138 | }
139 |
140 | .list-item {
141 | @apply border-b border-neutral-400 text-3xl text-neutral-400 py-8 pr-20;
142 | }
143 |
144 | code:not(pre code) {
145 | @apply border rounded border-gray-600 bg-neutral-800 px-1 py-0 ml-1 mr-1 text-[0.825em];
146 | }
147 |
148 | em {
149 | @apply text-indigo-300 not-italic;
150 | }
151 |
152 | strong {
153 | @apply font-semibold text-neutral-200;
154 | }
155 |
156 | .markdown ul,
157 | .markdown ol {
158 | list-style: revert;
159 | @apply ml-4;
160 | }
161 |
162 | ul,
163 | ol {
164 | @apply ml-4;
165 | }
166 |
167 | ul li::marker,
168 | ol li::marker {
169 | @apply text-neutral-400;
170 | }
171 |
172 | ul li,
173 | ol li {
174 | @apply pl-2;
175 | }
176 |
177 | ul {
178 | @apply list-disc;
179 | }
180 |
181 | ul ul li {
182 | list-style-type: circle;
183 | }
184 |
185 | ul ul ul li {
186 | list-style-type: square;
187 | }
188 |
189 | ul ul ul ul li {
190 | list-style-type: disc;
191 | }
192 |
193 | ol {
194 | @apply list-decimal;
195 | }
196 |
197 | ul .list-item:last-of-type {
198 | @apply border-b-0 pb-0;
199 | }
200 |
201 | ul .list-item:first-of-type {
202 | @apply pt-0;
203 | }
204 |
205 | pre {
206 | @apply border border-neutral-600 rounded-lg p-5 mt-10 mb-5 leading-[1];
207 | }
208 |
209 | pre code {
210 | @apply text-sm;
211 | }
212 |
--------------------------------------------------------------------------------
/starter/main/tailwind.config.cjs:
--------------------------------------------------------------------------------
1 | module.exports = require('@oxide/fable/tailwind.config.cjs')
2 |
--------------------------------------------------------------------------------
/starter/main/templates/Example.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { z } from 'zod'
3 |
4 | import { Markdown } from '~/Util'
5 |
6 | export const Schema = z.object({
7 | title: z.string(),
8 | })
9 |
10 | export const Template = ({ data }) => {
11 | const { title } = data
12 |
13 | return (
14 |
15 |
19 |
20 | )
21 | }
22 |
--------------------------------------------------------------------------------
/starter/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "create-fable",
3 | "version": "0.0.0",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "create-fable",
9 | "version": "0.0.0",
10 | "license": "ISC",
11 | "dependencies": {
12 | "inquirer": "^9.1.4"
13 | }
14 | },
15 | "node_modules/ansi-escapes": {
16 | "version": "6.0.0",
17 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.0.0.tgz",
18 | "integrity": "sha512-IG23inYII3dWlU2EyiAiGj6Bwal5GzsgPMwjYGvc1HPE2dgbj4ZB5ToWBKSquKw74nB3TIuOwaI6/jSULzfgrw==",
19 | "dependencies": {
20 | "type-fest": "^3.0.0"
21 | },
22 | "engines": {
23 | "node": ">=14.16"
24 | },
25 | "funding": {
26 | "url": "https://github.com/sponsors/sindresorhus"
27 | }
28 | },
29 | "node_modules/ansi-regex": {
30 | "version": "6.0.1",
31 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
32 | "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
33 | "engines": {
34 | "node": ">=12"
35 | },
36 | "funding": {
37 | "url": "https://github.com/chalk/ansi-regex?sponsor=1"
38 | }
39 | },
40 | "node_modules/ansi-styles": {
41 | "version": "6.2.1",
42 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
43 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
44 | "engines": {
45 | "node": ">=12"
46 | },
47 | "funding": {
48 | "url": "https://github.com/chalk/ansi-styles?sponsor=1"
49 | }
50 | },
51 | "node_modules/base64-js": {
52 | "version": "1.5.1",
53 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
54 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
55 | "funding": [
56 | {
57 | "type": "github",
58 | "url": "https://github.com/sponsors/feross"
59 | },
60 | {
61 | "type": "patreon",
62 | "url": "https://www.patreon.com/feross"
63 | },
64 | {
65 | "type": "consulting",
66 | "url": "https://feross.org/support"
67 | }
68 | ]
69 | },
70 | "node_modules/bl": {
71 | "version": "5.1.0",
72 | "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",
73 | "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",
74 | "dependencies": {
75 | "buffer": "^6.0.3",
76 | "inherits": "^2.0.4",
77 | "readable-stream": "^3.4.0"
78 | }
79 | },
80 | "node_modules/buffer": {
81 | "version": "6.0.3",
82 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
83 | "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
84 | "funding": [
85 | {
86 | "type": "github",
87 | "url": "https://github.com/sponsors/feross"
88 | },
89 | {
90 | "type": "patreon",
91 | "url": "https://www.patreon.com/feross"
92 | },
93 | {
94 | "type": "consulting",
95 | "url": "https://feross.org/support"
96 | }
97 | ],
98 | "dependencies": {
99 | "base64-js": "^1.3.1",
100 | "ieee754": "^1.2.1"
101 | }
102 | },
103 | "node_modules/chalk": {
104 | "version": "5.2.0",
105 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
106 | "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
107 | "engines": {
108 | "node": "^12.17.0 || ^14.13 || >=16.0.0"
109 | },
110 | "funding": {
111 | "url": "https://github.com/chalk/chalk?sponsor=1"
112 | }
113 | },
114 | "node_modules/chardet": {
115 | "version": "0.7.0",
116 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
117 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA=="
118 | },
119 | "node_modules/cli-cursor": {
120 | "version": "4.0.0",
121 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
122 | "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
123 | "dependencies": {
124 | "restore-cursor": "^4.0.0"
125 | },
126 | "engines": {
127 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
128 | },
129 | "funding": {
130 | "url": "https://github.com/sponsors/sindresorhus"
131 | }
132 | },
133 | "node_modules/cli-spinners": {
134 | "version": "2.7.0",
135 | "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz",
136 | "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==",
137 | "engines": {
138 | "node": ">=6"
139 | },
140 | "funding": {
141 | "url": "https://github.com/sponsors/sindresorhus"
142 | }
143 | },
144 | "node_modules/cli-width": {
145 | "version": "4.0.0",
146 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.0.0.tgz",
147 | "integrity": "sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw==",
148 | "engines": {
149 | "node": ">= 12"
150 | }
151 | },
152 | "node_modules/clone": {
153 | "version": "1.0.4",
154 | "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
155 | "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
156 | "engines": {
157 | "node": ">=0.8"
158 | }
159 | },
160 | "node_modules/defaults": {
161 | "version": "1.0.4",
162 | "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
163 | "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
164 | "dependencies": {
165 | "clone": "^1.0.2"
166 | },
167 | "funding": {
168 | "url": "https://github.com/sponsors/sindresorhus"
169 | }
170 | },
171 | "node_modules/eastasianwidth": {
172 | "version": "0.2.0",
173 | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
174 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
175 | },
176 | "node_modules/emoji-regex": {
177 | "version": "9.2.2",
178 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
179 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
180 | },
181 | "node_modules/escape-string-regexp": {
182 | "version": "5.0.0",
183 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
184 | "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
185 | "engines": {
186 | "node": ">=12"
187 | },
188 | "funding": {
189 | "url": "https://github.com/sponsors/sindresorhus"
190 | }
191 | },
192 | "node_modules/external-editor": {
193 | "version": "3.1.0",
194 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
195 | "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
196 | "dependencies": {
197 | "chardet": "^0.7.0",
198 | "iconv-lite": "^0.4.24",
199 | "tmp": "^0.0.33"
200 | },
201 | "engines": {
202 | "node": ">=4"
203 | }
204 | },
205 | "node_modules/figures": {
206 | "version": "5.0.0",
207 | "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
208 | "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
209 | "dependencies": {
210 | "escape-string-regexp": "^5.0.0",
211 | "is-unicode-supported": "^1.2.0"
212 | },
213 | "engines": {
214 | "node": ">=14"
215 | },
216 | "funding": {
217 | "url": "https://github.com/sponsors/sindresorhus"
218 | }
219 | },
220 | "node_modules/iconv-lite": {
221 | "version": "0.4.24",
222 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
223 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
224 | "dependencies": {
225 | "safer-buffer": ">= 2.1.2 < 3"
226 | },
227 | "engines": {
228 | "node": ">=0.10.0"
229 | }
230 | },
231 | "node_modules/ieee754": {
232 | "version": "1.2.1",
233 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
234 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
235 | "funding": [
236 | {
237 | "type": "github",
238 | "url": "https://github.com/sponsors/feross"
239 | },
240 | {
241 | "type": "patreon",
242 | "url": "https://www.patreon.com/feross"
243 | },
244 | {
245 | "type": "consulting",
246 | "url": "https://feross.org/support"
247 | }
248 | ]
249 | },
250 | "node_modules/inherits": {
251 | "version": "2.0.4",
252 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
253 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
254 | },
255 | "node_modules/inquirer": {
256 | "version": "9.1.4",
257 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.4.tgz",
258 | "integrity": "sha512-9hiJxE5gkK/cM2d1mTEnuurGTAoHebbkX0BYl3h7iEg7FYfuNIom+nDfBCSWtvSnoSrWCeBxqqBZu26xdlJlXA==",
259 | "dependencies": {
260 | "ansi-escapes": "^6.0.0",
261 | "chalk": "^5.1.2",
262 | "cli-cursor": "^4.0.0",
263 | "cli-width": "^4.0.0",
264 | "external-editor": "^3.0.3",
265 | "figures": "^5.0.0",
266 | "lodash": "^4.17.21",
267 | "mute-stream": "0.0.8",
268 | "ora": "^6.1.2",
269 | "run-async": "^2.4.0",
270 | "rxjs": "^7.5.7",
271 | "string-width": "^5.1.2",
272 | "strip-ansi": "^7.0.1",
273 | "through": "^2.3.6",
274 | "wrap-ansi": "^8.0.1"
275 | },
276 | "engines": {
277 | "node": ">=12.0.0"
278 | }
279 | },
280 | "node_modules/is-interactive": {
281 | "version": "2.0.0",
282 | "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
283 | "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",
284 | "engines": {
285 | "node": ">=12"
286 | },
287 | "funding": {
288 | "url": "https://github.com/sponsors/sindresorhus"
289 | }
290 | },
291 | "node_modules/is-unicode-supported": {
292 | "version": "1.3.0",
293 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
294 | "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
295 | "engines": {
296 | "node": ">=12"
297 | },
298 | "funding": {
299 | "url": "https://github.com/sponsors/sindresorhus"
300 | }
301 | },
302 | "node_modules/lodash": {
303 | "version": "4.17.21",
304 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
305 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
306 | },
307 | "node_modules/log-symbols": {
308 | "version": "5.1.0",
309 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz",
310 | "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==",
311 | "dependencies": {
312 | "chalk": "^5.0.0",
313 | "is-unicode-supported": "^1.1.0"
314 | },
315 | "engines": {
316 | "node": ">=12"
317 | },
318 | "funding": {
319 | "url": "https://github.com/sponsors/sindresorhus"
320 | }
321 | },
322 | "node_modules/mimic-fn": {
323 | "version": "2.1.0",
324 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
325 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
326 | "engines": {
327 | "node": ">=6"
328 | }
329 | },
330 | "node_modules/mute-stream": {
331 | "version": "0.0.8",
332 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
333 | "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
334 | },
335 | "node_modules/onetime": {
336 | "version": "5.1.2",
337 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
338 | "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
339 | "dependencies": {
340 | "mimic-fn": "^2.1.0"
341 | },
342 | "engines": {
343 | "node": ">=6"
344 | },
345 | "funding": {
346 | "url": "https://github.com/sponsors/sindresorhus"
347 | }
348 | },
349 | "node_modules/ora": {
350 | "version": "6.1.2",
351 | "resolved": "https://registry.npmjs.org/ora/-/ora-6.1.2.tgz",
352 | "integrity": "sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw==",
353 | "dependencies": {
354 | "bl": "^5.0.0",
355 | "chalk": "^5.0.0",
356 | "cli-cursor": "^4.0.0",
357 | "cli-spinners": "^2.6.1",
358 | "is-interactive": "^2.0.0",
359 | "is-unicode-supported": "^1.1.0",
360 | "log-symbols": "^5.1.0",
361 | "strip-ansi": "^7.0.1",
362 | "wcwidth": "^1.0.1"
363 | },
364 | "engines": {
365 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
366 | },
367 | "funding": {
368 | "url": "https://github.com/sponsors/sindresorhus"
369 | }
370 | },
371 | "node_modules/os-tmpdir": {
372 | "version": "1.0.2",
373 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
374 | "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
375 | "engines": {
376 | "node": ">=0.10.0"
377 | }
378 | },
379 | "node_modules/readable-stream": {
380 | "version": "3.6.0",
381 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
382 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
383 | "dependencies": {
384 | "inherits": "^2.0.3",
385 | "string_decoder": "^1.1.1",
386 | "util-deprecate": "^1.0.1"
387 | },
388 | "engines": {
389 | "node": ">= 6"
390 | }
391 | },
392 | "node_modules/restore-cursor": {
393 | "version": "4.0.0",
394 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",
395 | "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",
396 | "dependencies": {
397 | "onetime": "^5.1.0",
398 | "signal-exit": "^3.0.2"
399 | },
400 | "engines": {
401 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
402 | },
403 | "funding": {
404 | "url": "https://github.com/sponsors/sindresorhus"
405 | }
406 | },
407 | "node_modules/run-async": {
408 | "version": "2.4.1",
409 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
410 | "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
411 | "engines": {
412 | "node": ">=0.12.0"
413 | }
414 | },
415 | "node_modules/rxjs": {
416 | "version": "7.8.0",
417 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
418 | "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
419 | "dependencies": {
420 | "tslib": "^2.1.0"
421 | }
422 | },
423 | "node_modules/safe-buffer": {
424 | "version": "5.2.1",
425 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
426 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
427 | "funding": [
428 | {
429 | "type": "github",
430 | "url": "https://github.com/sponsors/feross"
431 | },
432 | {
433 | "type": "patreon",
434 | "url": "https://www.patreon.com/feross"
435 | },
436 | {
437 | "type": "consulting",
438 | "url": "https://feross.org/support"
439 | }
440 | ]
441 | },
442 | "node_modules/safer-buffer": {
443 | "version": "2.1.2",
444 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
445 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
446 | },
447 | "node_modules/signal-exit": {
448 | "version": "3.0.7",
449 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
450 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
451 | },
452 | "node_modules/string_decoder": {
453 | "version": "1.3.0",
454 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
455 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
456 | "dependencies": {
457 | "safe-buffer": "~5.2.0"
458 | }
459 | },
460 | "node_modules/string-width": {
461 | "version": "5.1.2",
462 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
463 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
464 | "dependencies": {
465 | "eastasianwidth": "^0.2.0",
466 | "emoji-regex": "^9.2.2",
467 | "strip-ansi": "^7.0.1"
468 | },
469 | "engines": {
470 | "node": ">=12"
471 | },
472 | "funding": {
473 | "url": "https://github.com/sponsors/sindresorhus"
474 | }
475 | },
476 | "node_modules/strip-ansi": {
477 | "version": "7.0.1",
478 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
479 | "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
480 | "dependencies": {
481 | "ansi-regex": "^6.0.1"
482 | },
483 | "engines": {
484 | "node": ">=12"
485 | },
486 | "funding": {
487 | "url": "https://github.com/chalk/strip-ansi?sponsor=1"
488 | }
489 | },
490 | "node_modules/through": {
491 | "version": "2.3.8",
492 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
493 | "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="
494 | },
495 | "node_modules/tmp": {
496 | "version": "0.0.33",
497 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
498 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
499 | "dependencies": {
500 | "os-tmpdir": "~1.0.2"
501 | },
502 | "engines": {
503 | "node": ">=0.6.0"
504 | }
505 | },
506 | "node_modules/tslib": {
507 | "version": "2.5.0",
508 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
509 | "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
510 | },
511 | "node_modules/type-fest": {
512 | "version": "3.6.0",
513 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.6.0.tgz",
514 | "integrity": "sha512-RqTRtKTzvPpNdDUp1dVkKQRunlPITk4mXeqFlAZoJsS+fLRn8AdPK0TcQDumGayhU7fjlBfiBjsq3pe3rIfXZQ==",
515 | "engines": {
516 | "node": ">=14.16"
517 | },
518 | "funding": {
519 | "url": "https://github.com/sponsors/sindresorhus"
520 | }
521 | },
522 | "node_modules/util-deprecate": {
523 | "version": "1.0.2",
524 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
525 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
526 | },
527 | "node_modules/wcwidth": {
528 | "version": "1.0.1",
529 | "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
530 | "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
531 | "dependencies": {
532 | "defaults": "^1.0.3"
533 | }
534 | },
535 | "node_modules/wrap-ansi": {
536 | "version": "8.1.0",
537 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
538 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
539 | "dependencies": {
540 | "ansi-styles": "^6.1.0",
541 | "string-width": "^5.0.1",
542 | "strip-ansi": "^7.0.1"
543 | },
544 | "engines": {
545 | "node": ">=12"
546 | },
547 | "funding": {
548 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
549 | }
550 | }
551 | },
552 | "dependencies": {
553 | "ansi-escapes": {
554 | "version": "6.0.0",
555 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.0.0.tgz",
556 | "integrity": "sha512-IG23inYII3dWlU2EyiAiGj6Bwal5GzsgPMwjYGvc1HPE2dgbj4ZB5ToWBKSquKw74nB3TIuOwaI6/jSULzfgrw==",
557 | "requires": {
558 | "type-fest": "^3.0.0"
559 | }
560 | },
561 | "ansi-regex": {
562 | "version": "6.0.1",
563 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
564 | "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA=="
565 | },
566 | "ansi-styles": {
567 | "version": "6.2.1",
568 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
569 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="
570 | },
571 | "base64-js": {
572 | "version": "1.5.1",
573 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
574 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
575 | },
576 | "bl": {
577 | "version": "5.1.0",
578 | "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",
579 | "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",
580 | "requires": {
581 | "buffer": "^6.0.3",
582 | "inherits": "^2.0.4",
583 | "readable-stream": "^3.4.0"
584 | }
585 | },
586 | "buffer": {
587 | "version": "6.0.3",
588 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
589 | "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
590 | "requires": {
591 | "base64-js": "^1.3.1",
592 | "ieee754": "^1.2.1"
593 | }
594 | },
595 | "chalk": {
596 | "version": "5.2.0",
597 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
598 | "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA=="
599 | },
600 | "chardet": {
601 | "version": "0.7.0",
602 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
603 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA=="
604 | },
605 | "cli-cursor": {
606 | "version": "4.0.0",
607 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
608 | "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
609 | "requires": {
610 | "restore-cursor": "^4.0.0"
611 | }
612 | },
613 | "cli-spinners": {
614 | "version": "2.7.0",
615 | "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz",
616 | "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw=="
617 | },
618 | "cli-width": {
619 | "version": "4.0.0",
620 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.0.0.tgz",
621 | "integrity": "sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw=="
622 | },
623 | "clone": {
624 | "version": "1.0.4",
625 | "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
626 | "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="
627 | },
628 | "defaults": {
629 | "version": "1.0.4",
630 | "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
631 | "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
632 | "requires": {
633 | "clone": "^1.0.2"
634 | }
635 | },
636 | "eastasianwidth": {
637 | "version": "0.2.0",
638 | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
639 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
640 | },
641 | "emoji-regex": {
642 | "version": "9.2.2",
643 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
644 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
645 | },
646 | "escape-string-regexp": {
647 | "version": "5.0.0",
648 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
649 | "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="
650 | },
651 | "external-editor": {
652 | "version": "3.1.0",
653 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
654 | "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
655 | "requires": {
656 | "chardet": "^0.7.0",
657 | "iconv-lite": "^0.4.24",
658 | "tmp": "^0.0.33"
659 | }
660 | },
661 | "figures": {
662 | "version": "5.0.0",
663 | "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
664 | "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
665 | "requires": {
666 | "escape-string-regexp": "^5.0.0",
667 | "is-unicode-supported": "^1.2.0"
668 | }
669 | },
670 | "iconv-lite": {
671 | "version": "0.4.24",
672 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
673 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
674 | "requires": {
675 | "safer-buffer": ">= 2.1.2 < 3"
676 | }
677 | },
678 | "ieee754": {
679 | "version": "1.2.1",
680 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
681 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
682 | },
683 | "inherits": {
684 | "version": "2.0.4",
685 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
686 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
687 | },
688 | "inquirer": {
689 | "version": "9.1.4",
690 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.4.tgz",
691 | "integrity": "sha512-9hiJxE5gkK/cM2d1mTEnuurGTAoHebbkX0BYl3h7iEg7FYfuNIom+nDfBCSWtvSnoSrWCeBxqqBZu26xdlJlXA==",
692 | "requires": {
693 | "ansi-escapes": "^6.0.0",
694 | "chalk": "^5.1.2",
695 | "cli-cursor": "^4.0.0",
696 | "cli-width": "^4.0.0",
697 | "external-editor": "^3.0.3",
698 | "figures": "^5.0.0",
699 | "lodash": "^4.17.21",
700 | "mute-stream": "0.0.8",
701 | "ora": "^6.1.2",
702 | "run-async": "^2.4.0",
703 | "rxjs": "^7.5.7",
704 | "string-width": "^5.1.2",
705 | "strip-ansi": "^7.0.1",
706 | "through": "^2.3.6",
707 | "wrap-ansi": "^8.0.1"
708 | }
709 | },
710 | "is-interactive": {
711 | "version": "2.0.0",
712 | "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
713 | "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="
714 | },
715 | "is-unicode-supported": {
716 | "version": "1.3.0",
717 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
718 | "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ=="
719 | },
720 | "lodash": {
721 | "version": "4.17.21",
722 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
723 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
724 | },
725 | "log-symbols": {
726 | "version": "5.1.0",
727 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz",
728 | "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==",
729 | "requires": {
730 | "chalk": "^5.0.0",
731 | "is-unicode-supported": "^1.1.0"
732 | }
733 | },
734 | "mimic-fn": {
735 | "version": "2.1.0",
736 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
737 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
738 | },
739 | "mute-stream": {
740 | "version": "0.0.8",
741 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
742 | "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
743 | },
744 | "onetime": {
745 | "version": "5.1.2",
746 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
747 | "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
748 | "requires": {
749 | "mimic-fn": "^2.1.0"
750 | }
751 | },
752 | "ora": {
753 | "version": "6.1.2",
754 | "resolved": "https://registry.npmjs.org/ora/-/ora-6.1.2.tgz",
755 | "integrity": "sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw==",
756 | "requires": {
757 | "bl": "^5.0.0",
758 | "chalk": "^5.0.0",
759 | "cli-cursor": "^4.0.0",
760 | "cli-spinners": "^2.6.1",
761 | "is-interactive": "^2.0.0",
762 | "is-unicode-supported": "^1.1.0",
763 | "log-symbols": "^5.1.0",
764 | "strip-ansi": "^7.0.1",
765 | "wcwidth": "^1.0.1"
766 | }
767 | },
768 | "os-tmpdir": {
769 | "version": "1.0.2",
770 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
771 | "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g=="
772 | },
773 | "readable-stream": {
774 | "version": "3.6.0",
775 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
776 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
777 | "requires": {
778 | "inherits": "^2.0.3",
779 | "string_decoder": "^1.1.1",
780 | "util-deprecate": "^1.0.1"
781 | }
782 | },
783 | "restore-cursor": {
784 | "version": "4.0.0",
785 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",
786 | "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",
787 | "requires": {
788 | "onetime": "^5.1.0",
789 | "signal-exit": "^3.0.2"
790 | }
791 | },
792 | "run-async": {
793 | "version": "2.4.1",
794 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
795 | "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ=="
796 | },
797 | "rxjs": {
798 | "version": "7.8.0",
799 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
800 | "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
801 | "requires": {
802 | "tslib": "^2.1.0"
803 | }
804 | },
805 | "safe-buffer": {
806 | "version": "5.2.1",
807 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
808 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
809 | },
810 | "safer-buffer": {
811 | "version": "2.1.2",
812 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
813 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
814 | },
815 | "signal-exit": {
816 | "version": "3.0.7",
817 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
818 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
819 | },
820 | "string_decoder": {
821 | "version": "1.3.0",
822 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
823 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
824 | "requires": {
825 | "safe-buffer": "~5.2.0"
826 | }
827 | },
828 | "string-width": {
829 | "version": "5.1.2",
830 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
831 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
832 | "requires": {
833 | "eastasianwidth": "^0.2.0",
834 | "emoji-regex": "^9.2.2",
835 | "strip-ansi": "^7.0.1"
836 | }
837 | },
838 | "strip-ansi": {
839 | "version": "7.0.1",
840 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
841 | "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
842 | "requires": {
843 | "ansi-regex": "^6.0.1"
844 | }
845 | },
846 | "through": {
847 | "version": "2.3.8",
848 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
849 | "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="
850 | },
851 | "tmp": {
852 | "version": "0.0.33",
853 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
854 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
855 | "requires": {
856 | "os-tmpdir": "~1.0.2"
857 | }
858 | },
859 | "tslib": {
860 | "version": "2.5.0",
861 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
862 | "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
863 | },
864 | "type-fest": {
865 | "version": "3.6.0",
866 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.6.0.tgz",
867 | "integrity": "sha512-RqTRtKTzvPpNdDUp1dVkKQRunlPITk4mXeqFlAZoJsS+fLRn8AdPK0TcQDumGayhU7fjlBfiBjsq3pe3rIfXZQ=="
868 | },
869 | "util-deprecate": {
870 | "version": "1.0.2",
871 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
872 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
873 | },
874 | "wcwidth": {
875 | "version": "1.0.1",
876 | "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
877 | "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
878 | "requires": {
879 | "defaults": "^1.0.3"
880 | }
881 | },
882 | "wrap-ansi": {
883 | "version": "8.1.0",
884 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
885 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
886 | "requires": {
887 | "ansi-styles": "^6.1.0",
888 | "string-width": "^5.0.1",
889 | "strip-ansi": "^7.0.1"
890 | }
891 | }
892 | }
893 | }
894 |
--------------------------------------------------------------------------------
/starter/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@oxide/create-fable",
3 | "version": "0.1.5",
4 | "description": "Creates a new [Fable](https://github.com/oxidecomputer/fable) presentation",
5 | "main": "index.js",
6 | "type": "module",
7 | "scripts": {
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "dependencies": {
11 | "inquirer": "^9.1.4"
12 | },
13 | "devDependencies": {},
14 | "bin": {
15 | "@oxide/create-fable": "index.js"
16 | },
17 | "author": "Oxide Computer Company ",
18 | "license": "MPL 2.0",
19 | "publishConfig": {
20 | "registry": "https://registry.npmjs.org/",
21 | "access": "public"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/styles/dist/index.css:
--------------------------------------------------------------------------------
1 | .hljs {
2 | color: #babcbd;
3 | /* background: #080f11; */
4 | }
5 |
6 | .hljs::-moz-selection, .hljs::-moz-selection {
7 | color: #1e1e22;
8 | background: #bf8fef;
9 | }
10 |
11 | .hljs::selection,
12 | .hljs::selection {
13 | color: #1e1e22;
14 | background: #bf8fef;
15 | }
16 |
17 | .hljs-code,
18 | .hljs-comment,
19 | .hljs-quote {
20 | color: #888896;
21 | }
22 |
23 | .hljs-deletion,
24 | .hljs-literal,
25 | .hljs-number {
26 | color: #e87e97;
27 | }
28 |
29 | .hljs-doctag,
30 | .hljs-meta,
31 | .hljs-operator,
32 | .hljs-punctuation,
33 | .hljs-selector-attr,
34 | .hljs-subst,
35 | .hljs-template-variable {
36 | color: #f1d78f;
37 | }
38 |
39 | .hljs-type {
40 | color: #efef8f;
41 | }
42 |
43 | .hljs-selector-class,
44 | .hljs-selector-id,
45 | .hljs-tag,
46 | .hljs-title {
47 | color: #48d597;
48 | }
49 |
50 | .hljs-addition,
51 | .hljs-regexp,
52 | .hljs-string {
53 | color: #48d597;
54 | }
55 |
56 | .hljs-class,
57 | .hljs-property {
58 | color: #8fefbf;
59 | }
60 |
61 | .hljs-name,
62 | .hljs-selector-tag {
63 | color: #48d597;
64 | }
65 |
66 | .hljs-built_in,
67 | .hljs-keyword {
68 | color: #7996dd;
69 | }
70 |
71 | .hljs-bullet,
72 | .hljs-section {
73 | color: #8f8fef;
74 | }
75 |
76 | .hljs-selector-pseudo {
77 | color: #2e8160;
78 | }
79 |
80 | .hljs-attr,
81 | .hljs-attribute,
82 | .hljs-params,
83 | .hljs-variable {
84 | color: #a2dfc5;
85 | }
86 |
87 | .hljs-link,
88 | .hljs-symbol {
89 | color: #7e89e8;
90 | }
91 |
92 | .hljs-literal,
93 | .hljs-strong,
94 | .hljs-title {
95 | font-weight: 700;
96 | }
97 |
98 | .hljs-emphasis {
99 | font-style: italic;
100 | }
101 |
102 | code.language-bash:before {
103 | content: '$ ';
104 | /* @apply text-grey-700; */
105 | }
106 |
107 | .--pdf #root,
108 | .--pdf {
109 | overflow: visible !important;
110 | }
111 |
112 | .--pdf main {
113 | position: relative !important;
114 | top: 0px !important;
115 | left: 0px !important;
116 | aspect-ratio: initial !important;
117 | height: 100vh !important;
118 | width: 100vw !important;
119 | transform-origin: top left !important;
120 | transform: none !important;
121 | page-break-after: always;
122 | }
123 |
124 | /* ! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com */
125 |
126 | /*
127 | 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
128 | 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
129 | */
130 |
131 | *,
132 | ::before,
133 | ::after {
134 | box-sizing: border-box;
135 | /* 1 */
136 | border-width: 0;
137 | /* 2 */
138 | border-style: solid;
139 | /* 2 */
140 | border-color: #e5e7eb;
141 | /* 2 */
142 | }
143 |
144 | ::before,
145 | ::after {
146 | --tw-content: '';
147 | }
148 |
149 | /*
150 | 1. Use a consistent sensible line-height in all browsers.
151 | 2. Prevent adjustments of font size after orientation changes in iOS.
152 | 3. Use a more readable tab size.
153 | 4. Use the user's configured `sans` font-family by default.
154 | 5. Use the user's configured `sans` font-feature-settings by default.
155 | 6. Use the user's configured `sans` font-variation-settings by default.
156 | */
157 |
158 | html {
159 | line-height: 1.5;
160 | /* 1 */
161 | -webkit-text-size-adjust: 100%;
162 | /* 2 */
163 | -moz-tab-size: 4;
164 | /* 3 */
165 | -o-tab-size: 4;
166 | tab-size: 4;
167 | /* 3 */
168 | font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
169 | /* 4 */
170 | font-feature-settings: normal;
171 | /* 5 */
172 | font-variation-settings: normal;
173 | /* 6 */
174 | }
175 |
176 | /*
177 | 1. Remove the margin in all browsers.
178 | 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
179 | */
180 |
181 | body {
182 | margin: 0;
183 | /* 1 */
184 | line-height: inherit;
185 | /* 2 */
186 | }
187 |
188 | /*
189 | 1. Add the correct height in Firefox.
190 | 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
191 | 3. Ensure horizontal rules are visible by default.
192 | */
193 |
194 | hr {
195 | height: 0;
196 | /* 1 */
197 | color: inherit;
198 | /* 2 */
199 | border-top-width: 1px;
200 | /* 3 */
201 | }
202 |
203 | /*
204 | Add the correct text decoration in Chrome, Edge, and Safari.
205 | */
206 |
207 | abbr:where([title]) {
208 | -webkit-text-decoration: underline dotted;
209 | text-decoration: underline dotted;
210 | }
211 |
212 | /*
213 | Remove the default font size and weight for headings.
214 | */
215 |
216 | h1,
217 | h2,
218 | h3,
219 | h4,
220 | h5,
221 | h6 {
222 | font-size: inherit;
223 | font-weight: inherit;
224 | }
225 |
226 | /*
227 | Reset links to optimize for opt-in styling instead of opt-out.
228 | */
229 |
230 | a {
231 | color: inherit;
232 | text-decoration: inherit;
233 | }
234 |
235 | /*
236 | Add the correct font weight in Edge and Safari.
237 | */
238 |
239 | b,
240 | strong {
241 | font-weight: bolder;
242 | }
243 |
244 | /*
245 | 1. Use the user's configured `mono` font family by default.
246 | 2. Correct the odd `em` font sizing in all browsers.
247 | */
248 |
249 | code,
250 | kbd,
251 | samp,
252 | pre {
253 | font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
254 | /* 1 */
255 | font-size: 1em;
256 | /* 2 */
257 | }
258 |
259 | /*
260 | Add the correct font size in all browsers.
261 | */
262 |
263 | small {
264 | font-size: 80%;
265 | }
266 |
267 | /*
268 | Prevent `sub` and `sup` elements from affecting the line height in all browsers.
269 | */
270 |
271 | sub,
272 | sup {
273 | font-size: 75%;
274 | line-height: 0;
275 | position: relative;
276 | vertical-align: baseline;
277 | }
278 |
279 | sub {
280 | bottom: -0.25em;
281 | }
282 |
283 | sup {
284 | top: -0.5em;
285 | }
286 |
287 | /*
288 | 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
289 | 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
290 | 3. Remove gaps between table borders by default.
291 | */
292 |
293 | table {
294 | text-indent: 0;
295 | /* 1 */
296 | border-color: inherit;
297 | /* 2 */
298 | border-collapse: collapse;
299 | /* 3 */
300 | }
301 |
302 | /*
303 | 1. Change the font styles in all browsers.
304 | 2. Remove the margin in Firefox and Safari.
305 | 3. Remove default padding in all browsers.
306 | */
307 |
308 | button,
309 | input,
310 | optgroup,
311 | select,
312 | textarea {
313 | font-family: inherit;
314 | /* 1 */
315 | font-size: 100%;
316 | /* 1 */
317 | font-weight: inherit;
318 | /* 1 */
319 | line-height: inherit;
320 | /* 1 */
321 | color: inherit;
322 | /* 1 */
323 | margin: 0;
324 | /* 2 */
325 | padding: 0;
326 | /* 3 */
327 | }
328 |
329 | /*
330 | Remove the inheritance of text transform in Edge and Firefox.
331 | */
332 |
333 | button,
334 | select {
335 | text-transform: none;
336 | }
337 |
338 | /*
339 | 1. Correct the inability to style clickable types in iOS and Safari.
340 | 2. Remove default button styles.
341 | */
342 |
343 | button,
344 | [type='button'],
345 | [type='reset'],
346 | [type='submit'] {
347 | -webkit-appearance: button;
348 | /* 1 */
349 | background-color: transparent;
350 | /* 2 */
351 | background-image: none;
352 | /* 2 */
353 | }
354 |
355 | /*
356 | Use the modern Firefox focus style for all focusable elements.
357 | */
358 |
359 | :-moz-focusring {
360 | outline: auto;
361 | }
362 |
363 | /*
364 | Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
365 | */
366 |
367 | :-moz-ui-invalid {
368 | box-shadow: none;
369 | }
370 |
371 | /*
372 | Add the correct vertical alignment in Chrome and Firefox.
373 | */
374 |
375 | progress {
376 | vertical-align: baseline;
377 | }
378 |
379 | /*
380 | Correct the cursor style of increment and decrement buttons in Safari.
381 | */
382 |
383 | ::-webkit-inner-spin-button,
384 | ::-webkit-outer-spin-button {
385 | height: auto;
386 | }
387 |
388 | /*
389 | 1. Correct the odd appearance in Chrome and Safari.
390 | 2. Correct the outline style in Safari.
391 | */
392 |
393 | [type='search'] {
394 | -webkit-appearance: textfield;
395 | /* 1 */
396 | outline-offset: -2px;
397 | /* 2 */
398 | }
399 |
400 | /*
401 | Remove the inner padding in Chrome and Safari on macOS.
402 | */
403 |
404 | ::-webkit-search-decoration {
405 | -webkit-appearance: none;
406 | }
407 |
408 | /*
409 | 1. Correct the inability to style clickable types in iOS and Safari.
410 | 2. Change font properties to `inherit` in Safari.
411 | */
412 |
413 | ::-webkit-file-upload-button {
414 | -webkit-appearance: button;
415 | /* 1 */
416 | font: inherit;
417 | /* 2 */
418 | }
419 |
420 | /*
421 | Add the correct display in Chrome and Safari.
422 | */
423 |
424 | summary {
425 | display: list-item;
426 | }
427 |
428 | /*
429 | Removes the default spacing and border for appropriate elements.
430 | */
431 |
432 | blockquote,
433 | dl,
434 | dd,
435 | h1,
436 | h2,
437 | h3,
438 | h4,
439 | h5,
440 | h6,
441 | hr,
442 | figure,
443 | p,
444 | pre {
445 | margin: 0;
446 | }
447 |
448 | fieldset {
449 | margin: 0;
450 | padding: 0;
451 | }
452 |
453 | legend {
454 | padding: 0;
455 | }
456 |
457 | ol,
458 | ul,
459 | menu {
460 | list-style: none;
461 | margin: 0;
462 | padding: 0;
463 | }
464 |
465 | /*
466 | Prevent resizing textareas horizontally by default.
467 | */
468 |
469 | textarea {
470 | resize: vertical;
471 | }
472 |
473 | /*
474 | 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
475 | 2. Set the default placeholder color to the user's configured gray 400 color.
476 | */
477 |
478 | input::-moz-placeholder, textarea::-moz-placeholder {
479 | opacity: 1;
480 | /* 1 */
481 | color: #9ca3af;
482 | /* 2 */
483 | }
484 |
485 | input::placeholder,
486 | textarea::placeholder {
487 | opacity: 1;
488 | /* 1 */
489 | color: #9ca3af;
490 | /* 2 */
491 | }
492 |
493 | /*
494 | Set the default cursor for buttons.
495 | */
496 |
497 | button,
498 | [role="button"] {
499 | cursor: pointer;
500 | }
501 |
502 | /*
503 | Make sure disabled buttons don't get the pointer cursor.
504 | */
505 |
506 | :disabled {
507 | cursor: default;
508 | }
509 |
510 | /*
511 | 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
512 | 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
513 | This can trigger a poorly considered lint error in some tools but is included by design.
514 | */
515 |
516 | img,
517 | svg,
518 | video,
519 | canvas,
520 | audio,
521 | iframe,
522 | embed,
523 | object {
524 | display: block;
525 | /* 1 */
526 | vertical-align: middle;
527 | /* 2 */
528 | }
529 |
530 | /*
531 | Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
532 | */
533 |
534 | img,
535 | video {
536 | max-width: 100%;
537 | height: auto;
538 | }
539 |
540 | /* Make elements with the HTML hidden attribute stay hidden by default */
541 |
542 | [hidden] {
543 | display: none;
544 | }
545 |
546 | body {
547 | --tw-text-opacity: 1;
548 | color: rgb(212 212 212 / var(--tw-text-opacity));
549 | }
550 |
551 | *, ::before, ::after {
552 | --tw-border-spacing-x: 0;
553 | --tw-border-spacing-y: 0;
554 | --tw-translate-x: 0;
555 | --tw-translate-y: 0;
556 | --tw-rotate: 0;
557 | --tw-skew-x: 0;
558 | --tw-skew-y: 0;
559 | --tw-scale-x: 1;
560 | --tw-scale-y: 1;
561 | --tw-pan-x: ;
562 | --tw-pan-y: ;
563 | --tw-pinch-zoom: ;
564 | --tw-scroll-snap-strictness: proximity;
565 | --tw-gradient-from-position: ;
566 | --tw-gradient-via-position: ;
567 | --tw-gradient-to-position: ;
568 | --tw-ordinal: ;
569 | --tw-slashed-zero: ;
570 | --tw-numeric-figure: ;
571 | --tw-numeric-spacing: ;
572 | --tw-numeric-fraction: ;
573 | --tw-ring-inset: ;
574 | --tw-ring-offset-width: 0px;
575 | --tw-ring-offset-color: #fff;
576 | --tw-ring-color: rgb(59 130 246 / 0.5);
577 | --tw-ring-offset-shadow: 0 0 #0000;
578 | --tw-ring-shadow: 0 0 #0000;
579 | --tw-shadow: 0 0 #0000;
580 | --tw-shadow-colored: 0 0 #0000;
581 | --tw-blur: ;
582 | --tw-brightness: ;
583 | --tw-contrast: ;
584 | --tw-grayscale: ;
585 | --tw-hue-rotate: ;
586 | --tw-invert: ;
587 | --tw-saturate: ;
588 | --tw-sepia: ;
589 | --tw-drop-shadow: ;
590 | --tw-backdrop-blur: ;
591 | --tw-backdrop-brightness: ;
592 | --tw-backdrop-contrast: ;
593 | --tw-backdrop-grayscale: ;
594 | --tw-backdrop-hue-rotate: ;
595 | --tw-backdrop-invert: ;
596 | --tw-backdrop-opacity: ;
597 | --tw-backdrop-saturate: ;
598 | --tw-backdrop-sepia: ;
599 | }
600 |
601 | ::backdrop {
602 | --tw-border-spacing-x: 0;
603 | --tw-border-spacing-y: 0;
604 | --tw-translate-x: 0;
605 | --tw-translate-y: 0;
606 | --tw-rotate: 0;
607 | --tw-skew-x: 0;
608 | --tw-skew-y: 0;
609 | --tw-scale-x: 1;
610 | --tw-scale-y: 1;
611 | --tw-pan-x: ;
612 | --tw-pan-y: ;
613 | --tw-pinch-zoom: ;
614 | --tw-scroll-snap-strictness: proximity;
615 | --tw-gradient-from-position: ;
616 | --tw-gradient-via-position: ;
617 | --tw-gradient-to-position: ;
618 | --tw-ordinal: ;
619 | --tw-slashed-zero: ;
620 | --tw-numeric-figure: ;
621 | --tw-numeric-spacing: ;
622 | --tw-numeric-fraction: ;
623 | --tw-ring-inset: ;
624 | --tw-ring-offset-width: 0px;
625 | --tw-ring-offset-color: #fff;
626 | --tw-ring-color: rgb(59 130 246 / 0.5);
627 | --tw-ring-offset-shadow: 0 0 #0000;
628 | --tw-ring-shadow: 0 0 #0000;
629 | --tw-shadow: 0 0 #0000;
630 | --tw-shadow-colored: 0 0 #0000;
631 | --tw-blur: ;
632 | --tw-brightness: ;
633 | --tw-contrast: ;
634 | --tw-grayscale: ;
635 | --tw-hue-rotate: ;
636 | --tw-invert: ;
637 | --tw-saturate: ;
638 | --tw-sepia: ;
639 | --tw-drop-shadow: ;
640 | --tw-backdrop-blur: ;
641 | --tw-backdrop-brightness: ;
642 | --tw-backdrop-contrast: ;
643 | --tw-backdrop-grayscale: ;
644 | --tw-backdrop-hue-rotate: ;
645 | --tw-backdrop-invert: ;
646 | --tw-backdrop-opacity: ;
647 | --tw-backdrop-saturate: ;
648 | --tw-backdrop-sepia: ;
649 | }
650 |
651 | .visible {
652 | visibility: visible;
653 | }
654 |
655 | .invisible {
656 | visibility: hidden;
657 | }
658 |
659 | .absolute {
660 | position: absolute;
661 | }
662 |
663 | .relative {
664 | position: relative;
665 | }
666 |
667 | .bottom-\[40px\] {
668 | bottom: 40px;
669 | }
670 |
671 | .left-0 {
672 | left: 0px;
673 | }
674 |
675 | .left-1\/2 {
676 | left: 50%;
677 | }
678 |
679 | .right-0 {
680 | right: 0px;
681 | }
682 |
683 | .right-\[40px\] {
684 | right: 40px;
685 | }
686 |
687 | .top-0 {
688 | top: 0px;
689 | }
690 |
691 | .top-1\/2 {
692 | top: 50%;
693 | }
694 |
695 | .-mx-\[80px\] {
696 | margin-left: -80px;
697 | margin-right: -80px;
698 | }
699 |
700 | .\!mb-\[20px\] {
701 | margin-bottom: 20px !important;
702 | }
703 |
704 | .\!mt-0 {
705 | margin-top: 0px !important;
706 | }
707 |
708 | .mb-4 {
709 | margin-bottom: 1rem;
710 | }
711 |
712 | .mt-4 {
713 | margin-top: 1rem;
714 | }
715 |
716 | .mt-\[60px\] {
717 | margin-top: 60px;
718 | }
719 |
720 | .flex {
721 | display: flex;
722 | }
723 |
724 | .table {
725 | display: table;
726 | }
727 |
728 | .aspect-\[16\/9\] {
729 | aspect-ratio: 16/9;
730 | }
731 |
732 | .h-full {
733 | height: 100%;
734 | }
735 |
736 | .w-1\/2 {
737 | width: 50%;
738 | }
739 |
740 | .w-\[1920px\] {
741 | width: 1920px;
742 | }
743 |
744 | .w-\[calc\(100\%\+160px\)\] {
745 | width: calc(100% + 160px);
746 | }
747 |
748 | .w-full {
749 | width: 100%;
750 | }
751 |
752 | .flex-grow {
753 | flex-grow: 1;
754 | }
755 |
756 | .basis-0 {
757 | flex-basis: 0px;
758 | }
759 |
760 | .basis-1\/2 {
761 | flex-basis: 50%;
762 | }
763 |
764 | .transform {
765 | transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
766 | }
767 |
768 | .resize {
769 | resize: both;
770 | }
771 |
772 | .flex-col {
773 | flex-direction: column;
774 | }
775 |
776 | .items-center {
777 | align-items: center;
778 | }
779 |
780 | .justify-center {
781 | justify-content: center;
782 | }
783 |
784 | .space-x-\[60px\] > :not([hidden]) ~ :not([hidden]) {
785 | --tw-space-x-reverse: 0;
786 | margin-right: calc(60px * var(--tw-space-x-reverse));
787 | margin-left: calc(60px * calc(1 - var(--tw-space-x-reverse)));
788 | }
789 |
790 | .space-y-\[20px\] > :not([hidden]) ~ :not([hidden]) {
791 | --tw-space-y-reverse: 0;
792 | margin-top: calc(20px * calc(1 - var(--tw-space-y-reverse)));
793 | margin-bottom: calc(20px * var(--tw-space-y-reverse));
794 | }
795 |
796 | .rounded-lg {
797 | border-radius: 0.5rem;
798 | }
799 |
800 | .border-0 {
801 | border-width: 0px;
802 | }
803 |
804 | .border-neutral-600 {
805 | --tw-border-opacity: 1;
806 | border-color: rgb(82 82 82 / var(--tw-border-opacity));
807 | }
808 |
809 | .\!bg-indigo-950 {
810 | --tw-bg-opacity: 1 !important;
811 | background-color: rgb(30 27 75 / var(--tw-bg-opacity)) !important;
812 | }
813 |
814 | .\!bg-neutral-800 {
815 | --tw-bg-opacity: 1 !important;
816 | background-color: rgb(38 38 38 / var(--tw-bg-opacity)) !important;
817 | }
818 |
819 | .bg-\[\#333\] {
820 | --tw-bg-opacity: 1;
821 | background-color: rgb(51 51 51 / var(--tw-bg-opacity));
822 | }
823 |
824 | .bg-indigo-950 {
825 | --tw-bg-opacity: 1;
826 | background-color: rgb(30 27 75 / var(--tw-bg-opacity));
827 | }
828 |
829 | .bg-neutral-900 {
830 | --tw-bg-opacity: 1;
831 | background-color: rgb(23 23 23 / var(--tw-bg-opacity));
832 | }
833 |
834 | .object-cover {
835 | -o-object-fit: cover;
836 | object-fit: cover;
837 | }
838 |
839 | .\!p-0 {
840 | padding: 0px !important;
841 | }
842 |
843 | .pr-\[120px\] {
844 | padding-right: 120px;
845 | }
846 |
847 | .text-center {
848 | text-align: center;
849 | }
850 |
851 | .\!text-xl {
852 | font-size: 1.25rem !important;
853 | line-height: 1.75rem !important;
854 | }
855 |
856 | .text-\[110px\] {
857 | font-size: 110px;
858 | }
859 |
860 | .text-\[7rem\] {
861 | font-size: 7rem;
862 | }
863 |
864 | .text-xs {
865 | font-size: 0.75rem;
866 | line-height: 1rem;
867 | }
868 |
869 | .font-\[300\] {
870 | font-weight: 300;
871 | }
872 |
873 | .leading-\[1\.1\] {
874 | line-height: 1.1;
875 | }
876 |
877 | .\!text-indigo-500 {
878 | --tw-text-opacity: 1 !important;
879 | color: rgb(99 102 241 / var(--tw-text-opacity)) !important;
880 | }
881 |
882 | .text-indigo-300 {
883 | --tw-text-opacity: 1;
884 | color: rgb(165 180 252 / var(--tw-text-opacity));
885 | }
886 |
887 | .text-neutral-400 {
888 | --tw-text-opacity: 1;
889 | color: rgb(163 163 163 / var(--tw-text-opacity));
890 | }
891 |
892 | .opacity-40 {
893 | opacity: 0.4;
894 | }
895 |
896 | html,
897 | body {
898 | -webkit-font-smoothing: antialiased;
899 | font-feature-settings: 'ss02' on, 'ss03' on, 'ss09' on, 'ss06' on, 'ss07' on, 'ss08' on,
900 | 'case' on;
901 | -webkit-text-stroke: 0;
902 | font-size: 32px;
903 | margin: 0px;
904 | height: 100%;
905 | --tw-bg-opacity: 1;
906 | background-color: rgb(38 38 38 / var(--tw-bg-opacity));
907 | }
908 |
909 | #root,
910 | body {
911 | height: 100%;
912 | width: 100%;
913 | overflow: hidden;
914 | --tw-bg-opacity: 1;
915 | background-color: rgb(51 51 51 / var(--tw-bg-opacity));
916 | }
917 |
918 | .children\:h-full > * {
919 | height: 100%;
920 | }
921 |
922 | .children\:w-full > * {
923 | width: 100%;
924 | }
925 |
926 | .children\:overflow-hidden > * {
927 | overflow: hidden;
928 | }
929 |
--------------------------------------------------------------------------------
/styles/src/index.css:
--------------------------------------------------------------------------------
1 | @import './lib/highlight.css';
2 | @import './lib/pdf.css';
3 |
4 | @tailwind base;
5 | @tailwind components;
6 | @tailwind utilities;
7 |
8 | html,
9 | body {
10 | -webkit-font-smoothing: antialiased;
11 | font-feature-settings: 'ss02' on, 'ss03' on, 'ss09' on, 'ss06' on, 'ss07' on, 'ss08' on,
12 | 'case' on;
13 | -webkit-text-stroke: 0;
14 | font-size: 32px;
15 |
16 | @apply bg-neutral-800 m-0 h-full;
17 | }
18 |
19 | @layer base {
20 | body {
21 | @apply text-neutral-300;
22 | }
23 | }
24 |
25 | #root,
26 | body {
27 | @apply w-full h-full overflow-hidden bg-[#333];
28 | }
29 |
--------------------------------------------------------------------------------
/styles/src/lib/highlight.css:
--------------------------------------------------------------------------------
1 | .hljs {
2 | color: #babcbd;
3 | /* background: #080f11; */
4 | }
5 |
6 | .hljs::selection,
7 | .hljs::selection {
8 | color: #1e1e22;
9 | background: #bf8fef;
10 | }
11 |
12 | .hljs-code,
13 | .hljs-comment,
14 | .hljs-quote {
15 | color: #888896;
16 | }
17 |
18 | .hljs-deletion,
19 | .hljs-literal,
20 | .hljs-number {
21 | color: #e87e97;
22 | }
23 |
24 | .hljs-doctag,
25 | .hljs-meta,
26 | .hljs-operator,
27 | .hljs-punctuation,
28 | .hljs-selector-attr,
29 | .hljs-subst,
30 | .hljs-template-variable {
31 | color: #f1d78f;
32 | }
33 |
34 | .hljs-type {
35 | color: #efef8f;
36 | }
37 |
38 | .hljs-selector-class,
39 | .hljs-selector-id,
40 | .hljs-tag,
41 | .hljs-title {
42 | color: #48d597;
43 | }
44 |
45 | .hljs-addition,
46 | .hljs-regexp,
47 | .hljs-string {
48 | color: #48d597;
49 | }
50 |
51 | .hljs-class,
52 | .hljs-property {
53 | color: #8fefbf;
54 | }
55 |
56 | .hljs-name,
57 | .hljs-selector-tag {
58 | color: #48d597;
59 | }
60 |
61 | .hljs-built_in,
62 | .hljs-keyword {
63 | color: #7996dd;
64 | }
65 |
66 | .hljs-bullet,
67 | .hljs-section {
68 | color: #8f8fef;
69 | }
70 |
71 | .hljs-selector-pseudo {
72 | color: #2e8160;
73 | }
74 |
75 | .hljs-attr,
76 | .hljs-attribute,
77 | .hljs-params,
78 | .hljs-variable {
79 | color: #a2dfc5;
80 | }
81 |
82 | .hljs-link,
83 | .hljs-symbol {
84 | color: #7e89e8;
85 | }
86 |
87 | .hljs-literal,
88 | .hljs-strong,
89 | .hljs-title {
90 | font-weight: 700;
91 | }
92 |
93 | .hljs-emphasis {
94 | font-style: italic;
95 | }
96 |
97 | code.language-bash:before {
98 | content: '$ ';
99 | /* @apply text-grey-700; */
100 | }
101 |
--------------------------------------------------------------------------------
/styles/src/lib/pdf.css:
--------------------------------------------------------------------------------
1 | .--pdf #root,
2 | .--pdf {
3 | @apply !overflow-visible;
4 | }
5 |
6 | .--pdf main {
7 | @apply !w-[100vw] !h-[100vh] !top-0 !left-0 !relative !transform-none !origin-top-left !aspect-[initial];
8 | page-break-after: always;
9 | }
10 |
--------------------------------------------------------------------------------
/tailwind.config.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('tailwindcss/lib/util/createPlugin').default} */
4 | // @ts-ignore
5 | const plugin = require('tailwindcss/plugin')
6 |
7 | const defaultTheme = require('tailwindcss/defaultTheme')
8 |
9 | /** @type {import('tailwindcss/tailwind-config').TailwindConfig} */
10 | module.exports = {
11 | content: [
12 | './src/**/*.{ts,tsx}',
13 | './index.html',
14 | './templates/*.jsx',
15 | './starter/main/templates/*.jsx',
16 | ],
17 | theme: {
18 | extend: {
19 | fontFamily: {
20 | sans: ['Inter', ...defaultTheme.fontFamily.sans],
21 | },
22 | },
23 | },
24 | plugins: [
25 | plugin(({ addVariant }) => {
26 | addVariant('children', '& > *')
27 | }),
28 | ],
29 | }
30 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "useDefineForClassFields": true,
5 | "lib": ["DOM", "DOM.Iterable", "ESNext"],
6 | "allowJs": false,
7 | "skipLibCheck": true,
8 | "esModuleInterop": true,
9 | "allowSyntheticDefaultImports": true,
10 | "strict": true,
11 | "forceConsistentCasingInFileNames": true,
12 | "module": "ESNext",
13 | "moduleResolution": "Node",
14 | "resolveJsonModule": true,
15 | "isolatedModules": true,
16 | "noEmit": true,
17 | "jsx": "react-jsx",
18 | "paths": {
19 | "~/*": ["./src/templates/*"]
20 | }
21 | },
22 | "include": ["src/**/*.ts", "src/**/*.tsx"],
23 | "references": [{ "path": "./tsconfig.node.json" }]
24 | }
25 |
--------------------------------------------------------------------------------
/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "allowSyntheticDefaultImports": true
7 | },
8 | "include": ["vite.config.ts", "postcss.config.js"]
9 | }
10 |
--------------------------------------------------------------------------------
/vite.config.ts:
--------------------------------------------------------------------------------
1 | import react from '@vitejs/plugin-react'
2 | import path from 'path'
3 | import { defineConfig } from 'vite'
4 | import { ViteToml } from 'vite-plugin-toml'
5 |
6 | // https://vitejs.dev/config/
7 | export default () => {
8 | return defineConfig({
9 | plugins: [react(), ViteToml()],
10 | optimizeDeps: {
11 | include: ['mousetrap', 'react-dom/client', 'highlight.js', 'react'],
12 | },
13 | build: {
14 | commonjsOptions: {
15 | include: [/mousetrap/, /highlight.js/, /node_modules/],
16 | },
17 | },
18 | server: {
19 | fs: {
20 | // Allow serving files from one level up to the project root
21 | allow: ['../../'],
22 | },
23 | },
24 | resolve: {
25 | alias: {
26 | '~': path.resolve(__dirname, './src/templates'),
27 | },
28 | },
29 | })
30 | }
31 |
--------------------------------------------------------------------------------