gutterpress 0.10.8 → 0.10.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +88 -87
  2. package/dist/{README-aaqapam1.md → README-6c7fda1s.md} +9 -7
  3. package/dist/{README-mdq34cmb.md → README-jntqyj1z.md} +19 -10
  4. package/dist/api/index.d.ts +8 -8
  5. package/dist/api/index.js +46 -46
  6. package/dist/{audit-m3ce9pvq.js → audit-2x958vnj.js} +4 -4
  7. package/dist/{build-qnecb3a1.js → build-dqv3505a.js} +5 -8
  8. package/dist/{cli-vcv5ewqj.js → cli-0tgbgwnj.js} +2 -9
  9. package/dist/{cli-4vtgt2ng.js → cli-bx950tb4.js} +7 -7
  10. package/dist/{cli-pfpb1t3h.js → cli-bzxqtvrk.js} +1 -2
  11. package/dist/{cli-vxf151ea.js → cli-fwh6rkev.js} +1 -1
  12. package/dist/{cli-1hx14cgk.js → cli-vhdvkqdd.js} +2372 -2449
  13. package/dist/cli.js +24 -53
  14. package/dist/{doctor-qvqye1wd.js → doctor-55r0ghtc.js} +2 -2
  15. package/dist/{engine-daad33qn.js → engine-19mshh07.js} +2 -2
  16. package/dist/{engine-db8632w6.js → engine-d46wgg99.js} +3 -3
  17. package/dist/ext-04n7hydk.js +268 -0
  18. package/dist/{index-rpt4vtby.js → index-dhgzkhs7.js} +1 -1
  19. package/dist/{index-dfw8hn8q.js → index-erwh3bww.js} +5292 -5430
  20. package/dist/{index-9pbaznww.js → index-zwcv1njy.js} +7 -7
  21. package/dist/index.js +47 -47
  22. package/dist/lib/build-runner.d.ts +0 -7
  23. package/dist/lib/cli-args.d.ts +0 -7
  24. package/dist/lib/{theme-import.d.ts → extension-import.d.ts} +20 -11
  25. package/dist/lib/extension-manager.d.ts +170 -0
  26. package/dist/lib/extension-manifest.d.ts +25 -17
  27. package/dist/lib/extension-specifier.d.ts +31 -0
  28. package/dist/lib/manifest-doc.d.ts +3 -9
  29. package/dist/lib/markdown/markers.d.ts +2 -2
  30. package/dist/lib/markdown/plugins.d.ts +4 -4
  31. package/dist/lib/presets.d.ts +1 -1
  32. package/dist/lib/publish/providers/gdrive.d.ts +1 -1
  33. package/dist/lib/snippets.d.ts +11 -15
  34. package/dist/lib/style-resolver.d.ts +1 -1
  35. package/dist/{lint-3p1s8agk.js → lint-c7a4j3ww.js} +4 -4
  36. package/dist/{manifest.schema-1q35yxs9.json → manifest.schema-hsn8rsgr.json} +18 -53
  37. package/dist/{new-xffarp40.js → new-pw3eez61.js} +11 -12
  38. package/dist/{plugin.test.js-mv0ghv5n.tpl → plugin.test.js-npnfhyca.tpl} +0 -1
  39. package/dist/{preflight-z6xpty9w.js → preflight-77zyws1q.js} +4 -4
  40. package/dist/preview/file-watcher.d.ts +4 -4
  41. package/dist/preview/lifecycle.d.ts +1 -1
  42. package/dist/{preview-xa1n7why.js → preview-x7qqhmxf.js} +6 -10
  43. package/dist/{publish-zgmr99kd.js → publish-ms6abf6g.js} +4 -4
  44. package/dist/schema/manifest.types.d.ts +28 -44
  45. package/dist/{theme-cd6efzjw.json → theme-etj4gxck.json} +4 -1
  46. package/dist/{theme-tqfypc1w.json → theme-s2rg7xe7.json} +4 -1
  47. package/dist/{theme-xt0hjb1b.json → theme-vktedy8q.json} +4 -1
  48. package/dist/types.d.ts +0 -7
  49. package/dist/{validate-43hqgzz5.js → validate-vw59jcq7.js} +4 -4
  50. package/package.json +1 -1
  51. package/dist/lib/plugin-manager.d.ts +0 -106
  52. package/dist/lib/theme-manager.d.ts +0 -242
  53. package/dist/plugin-b05ck7zd.js +0 -126
  54. package/dist/theme-m9dtxkhj.js +0 -323
package/README.md CHANGED
@@ -108,7 +108,7 @@ See [User Guide: Chapter 1 — Getting Started](https://github.com/dimm-city/gut
108
108
 
109
109
  ## Manifest
110
110
 
111
- `manifest.yaml` is where you control everything that isn't authored in markdown — book title, the page-size preset, custom styles, plugin loading, validation rules, PDF/X configuration. It is the only recognized project manifest filename. The schema lives in [`docs/schema-autocomplete.md`](https://github.com/dimm-city/gutterpress/blob/main/docs/schema-autocomplete.md) for YAML autocomplete in editors.
111
+ `manifest.yaml` is where you control everything that isn't authored in markdown — book title, the page-size preset, custom styles, extensions (looks and plugins), validation rules, PDF/X configuration. It is the only recognized project manifest filename. The schema lives in [`docs/schema-autocomplete.md`](https://github.com/dimm-city/gutterpress/blob/main/docs/schema-autocomplete.md) for YAML autocomplete in editors.
112
112
 
113
113
  Minimal example:
114
114
 
@@ -133,10 +133,10 @@ The full configuration cascade is `CLI flags > manifest.yaml > preset defaults`.
133
133
 
134
134
  ## Commands
135
135
 
136
- Gutterpress has 11 subcommands. `new`, `preview`, `build`, and `publish` are the
136
+ Gutterpress has 10 subcommands. `new`, `preview`, `build`, and `publish` are the
137
137
  primary author commands; `lint`, `validate`, `audit`, and `preflight` are
138
- CI / advanced checks; and `doctor` reports system readiness. `plugin` manages
139
- project plugins and `theme` manages project themes. Every
138
+ CI / advanced checks; `doctor` reports system readiness; and `ext` manages the
139
+ project's extensions (plugins, looks, component libraries). Every
140
140
  command also accepts `--help` for the authoritative, always-current flag list
141
141
  (`gutterpress <command> --help`) — this section is regenerated from the same
142
142
  source.
@@ -198,7 +198,6 @@ gutterpress preview [input-dir] [options]
198
198
  --skip-pre-validate Skip pre-build validation (pdf|pdfx only)
199
199
  --skip-post-validate Skip post-build PDF/X validation (pdfx only)
200
200
  --allow-shrink Build anyway when content is wider than the page content box (pdf|pdfx only)
201
- --engine <name> native (default) | paged (deprecated) [overrides the manifest's engine: field; applies to the live preview AND --format pdf|pdfx]
202
201
  ```
203
202
 
204
203
  ### `gutterpress build`
@@ -219,7 +218,6 @@ gutterpress build [input-dir] [options]
219
218
  --skip-pre-validate Skip pre-build validation
220
219
  --skip-post-validate Skip post-build PDF/X validation
221
220
  --allow-shrink Build anyway when content is wider than the page content box. Chromium then scales the WHOLE book down to fit it — the build reports that whole-document scale (e.g. "about 0.72x its declared size") plus every offender, as warnings.
222
- --engine <name> native (default) | paged (deprecated) [overrides the manifest's engine: field; native = the Gutterpress engine, native Chromium pagination]
223
221
  ```
224
222
 
225
223
  ### `gutterpress publish`
@@ -334,94 +332,96 @@ Report the Gutterpress version, platform and config paths, and whether each exte
334
332
  gutterpress doctor
335
333
  ```
336
334
 
337
- ### `gutterpress plugin`
335
+ ### `gutterpress ext`
338
336
 
339
- Manage project markdown-it plugins.
337
+ List, add, remove, enable, or disable the project's extensions. Markdown-it
338
+ plugins, looks (stylesheets) and component libraries are all extensions — one
339
+ `extensions:` list in `manifest.yaml`, in load order (see
340
+ [Extensions](#extensions) below). These are the same shared-lib functions the
341
+ desktop app's Look and Features views call, so an extension added from the
342
+ terminal is the same entry the GUI shows.
340
343
 
341
344
  ```sh
342
- gutterpress plugin
345
+ gutterpress ext
343
346
 
344
- --help Show plugin subcommands
347
+ --help Show ext subcommands (list, add, remove, enable, disable)
345
348
  ```
346
349
 
347
- #### `gutterpress plugin add`
350
+ Every subcommand takes the project directory as an optional trailing
351
+ positional (default: the current directory).
348
352
 
349
- Download a markdown-it package and its runtime dependencies directly from npm,
350
- verify their registry hashes, vendor the complete graph into the project, and
351
- pin the exact root version. This does not invoke npm, Bun, Node.js tooling, or
352
- package install scripts.
353
+ #### `gutterpress ext list`
353
354
 
354
- ```sh
355
- gutterpress plugin add markdown-it-highlightjs ./my-book
356
- gutterpress plugin add markdown-it-highlightjs@4.3.0 ./my-book
357
- gutterpress plugin add markdown-it-emoji@3.0.0 ./my-book --export full
358
- ```
359
-
360
- ### `gutterpress theme`
361
-
362
- List, apply, import, revert, or remove project themes — the same
363
- `applyTheme`/`importThemeFrom*`/`revertTheme`/`removeProjectTheme` functions
364
- the desktop app's Theme panel calls, so a theme applied from the terminal is
365
- just as switchable/revertible as one applied from the GUI.
355
+ List the project's extensions in load (= cascade) order: each specifier as
356
+ written, whether it is bundled, a path, or an npm package, what it carries
357
+ (markdown, styles, snippets, components), and any warning — not installed,
358
+ not found, not pinned.
366
359
 
367
360
  ```sh
368
- gutterpress theme
369
-
370
- --help Show theme subcommands
361
+ gutterpress ext list ./my-book
371
362
  ```
372
363
 
373
- #### `gutterpress theme list`
374
-
375
- List the built-in themes, the themes already vendored into this project
376
- (`themes/<id>/`), and which one (if any) is active.
364
+ #### `gutterpress ext add`
365
+
366
+ Add an extension. What `SOURCE` is decides what happens:
367
+
368
+ - an **npm package** (`name` or `name@version`) is downloaded straight from
369
+ the registry along with its runtime dependencies, hash-verified, vendored
370
+ into the project under `plugins/npm/` with a receipt, load-tested, and
371
+ written back pinned as `name@<exact version>`. This does not invoke npm,
372
+ Bun, Node.js tooling, or package install scripts;
373
+ - a **bundled feature** (`markdown-it-mark`, `markdown-it-sub`,
374
+ `markdown-it-sup`, `markdown-it-abbr`, `gutterpress-gfm-alerts`) is simply
375
+ listed — nothing to install, works offline;
376
+ - a **folder or plugin-file path** is load-tested and listed as a
377
+ manifest-relative path, referenced in place — never copied;
378
+ - a **`.zip` or `.css` file**, or an **http(s) URL**, is validated (every
379
+ declared sheet must exist and parse; print-safety findings are warnings)
380
+ and landed in `extensions/<id>/`, then listed as `./extensions/<id>`;
381
+ - with `--look`, `SOURCE` is a built-in look id, copied into
382
+ `extensions/<id>/` as the author's own editable files and listed.
383
+
384
+ Adding something already listed re-pins or updates that entry instead of
385
+ adding a second one.
377
386
 
378
387
  ```sh
379
- gutterpress theme list ./my-book
380
- ```
388
+ gutterpress ext add <source> [dir] [options]
381
389
 
382
- #### `gutterpress theme apply`
383
-
384
- Apply a theme: a built-in id (`clean-book`, `zine`, `technical-doc`) is copied
385
- into `themes/<id>/` the first time, and the manifest's `styles:` entry is
386
- wired so its `theme.css` is the active stylesheet, keeping its cascade
387
- position. Re-running `apply` with an id that is already a project theme makes
388
- it active again without forking a second copy — the same non-destructive
389
- re-apply guarantee the desktop's Theme panel relies on.
390
-
391
- ```sh
392
- gutterpress theme apply clean-book ./my-book
393
- gutterpress theme apply zine ./my-book
390
+ --export <name> Named module export to use as the plugin function (npm and path extensions only)
391
+ --look Treat SOURCE as a built-in look id (clean-book, zine, technical-doc): copy it into extensions/ and add it
394
392
  ```
395
393
 
396
- #### `gutterpress theme import`
397
-
398
- Import a theme from a local folder, a `.zip` package, a `.css` file, or an
399
- `http(s)` URL. Importing vendors the theme under `themes/<id>/` but does not
400
- apply it — follow up with `gutterpress theme apply <id>`.
401
-
402
394
  ```sh
403
- gutterpress theme import ./my-theme-folder ./my-book
404
- gutterpress theme import ./my-theme.zip ./my-book
405
- gutterpress theme import ./my-theme.css ./my-book
406
- gutterpress theme import https://example.com/themes/cool/ ./my-book
395
+ gutterpress ext add markdown-it-highlightjs ./my-book
396
+ gutterpress ext add markdown-it-highlightjs@4.3.0 ./my-book
397
+ gutterpress ext add markdown-it-emoji@3.0.0 ./my-book --export full
398
+ gutterpress ext add markdown-it-mark ./my-book
399
+ gutterpress ext add ./plugins/field-notes ./my-book
400
+ gutterpress ext add zine ./my-book --look
401
+ gutterpress ext add ./parchment.zip ./my-book
402
+ gutterpress ext add https://example.com/looks/cool/ ./my-book
407
403
  ```
408
404
 
409
- #### `gutterpress theme revert`
405
+ #### `gutterpress ext remove`
410
406
 
411
- Re-apply the theme that was active immediately before the current one.
412
- Reverting twice toggles back it is a swap, not a history stack.
407
+ Remove an extension from the manifest, by the specifier as written there (for
408
+ an npm package the bare name is enough). An npm extension's vendored copy
409
+ under `plugins/npm/` is deleted too; a path extension's folder is yours and is
410
+ never touched.
413
411
 
414
412
  ```sh
415
- gutterpress theme revert ./my-book
413
+ gutterpress ext remove markdown-it-highlightjs ./my-book
414
+ gutterpress ext remove ./extensions/zine ./my-book
416
415
  ```
417
416
 
418
- #### `gutterpress theme remove`
417
+ #### `gutterpress ext enable` / `gutterpress ext disable`
419
418
 
420
- Remove a project theme (never a built-in). If it was the active theme, its
421
- manifest `styles:` entry is dropped too, leaving no theme active.
419
+ Turn a configured extension off without removing it (`disable` writes
420
+ `enabled: false` on the entry, so the toggle is reversible), or back on.
422
421
 
423
422
  ```sh
424
- gutterpress theme remove zine ./my-book
423
+ gutterpress ext disable markdown-it-mark ./my-book
424
+ gutterpress ext enable markdown-it-mark ./my-book
425
425
  ```
426
426
 
427
427
  ## Exit codes
@@ -435,44 +435,45 @@ Every command follows the same exit-code contract, so CI can branch on the resul
435
435
  | `2` | Usage — the invocation itself was wrong: a bad flag, positional argument, preset, or value. |
436
436
  | `3` | Pipeline — the build/render/export pipeline itself failed for a reason unrelated to usage or findings (I/O error, missing tool, renderer crash). |
437
437
 
438
- This applies uniformly across `build`, `preview`, `lint`, `validate`, `preflight`, `audit`, `publish`, `plugin`, `theme`, `new`, and `doctor`.
438
+ This applies uniformly across `build`, `preview`, `lint`, `validate`, `preflight`, `audit`, `publish`, `ext`, `new`, and `doctor`.
439
439
 
440
- ## Plugins
440
+ ## Extensions
441
441
 
442
- Gutterpress uses [markdown-it](https://github.com/markdown-it/markdown-it) under the hood, so pure-JavaScript plugins that follow the `(md, options) => void` signature work without a Gutterpress-specific API. Load them in `manifest.yaml`:
442
+ Gutterpress uses [markdown-it](https://github.com/markdown-it/markdown-it) under the hood, so pure-JavaScript plugins that follow the `(md, options) => void` signature work without a Gutterpress-specific API. Plugins, looks (stylesheets) and component libraries are all **extensions**: one `extensions:` list in `manifest.yaml`, in load order. Every entry is a bare specifier, and its form says what it is:
443
443
 
444
444
  ```yaml
445
- plugins:
446
- # npm package installed by `gutterpress plugin add markdown-it-highlightjs`
447
- - name: markdown-it-highlightjs
448
- version: 4.3.0
449
- # package whose plugin function is a named export
450
- - name: markdown-it-emoji
451
- version: 3.0.0
452
- export: full
453
- # local file
445
+ extensions:
446
+ # a feature bundled with Gutterpress nothing to install, works offline
447
+ - markdown-it-mark
448
+ # a folder or plugin file, relative to manifest.yaml — referenced in place
449
+ - ./extensions/clean-book
454
450
  - ./plugins/my-custom-plugin.js
455
- # with options
456
- - name: markdown-it-footnote
451
+ # an npm package, pinned to the exact version `gutterpress ext add` installed
452
+ - markdown-it-highlightjs@4.3.0
453
+ # the object form, only when an entry needs more than its specifier
454
+ - use: markdown-it-emoji@3.0.0
455
+ export: full # the plugin function is a named export
456
+ - use: markdown-it-anchor@9.2.0
457
457
  options:
458
- includeSubsections: false
459
- # explicit priority (lower runs first)
460
- - name: markdown-it-anchor
461
- priority: 10
458
+ level: 2
459
+ - use: ./plugins/drafts.js
460
+ enabled: false # keep the entry, skip loading it
462
461
  ```
463
462
 
463
+ Order is load order: a later entry's markdown runs after earlier entries' (and sees their output) and its CSS wins ties; the project's own `styles:` always load after every extension. There is no `priority` and no `path:`/`name:` wrapper — a manifest still carrying `plugins:` fails with a message that prints the same entries rewritten as `extensions:`. The `engine:` and `engineStyles:` keys are gone too (there is one engine; move any `engineStyles` entries to the end of `styles:`).
464
+
464
465
  Pinned npm packages and their runtime dependencies live under `plugins/npm/`,
465
466
  with a receipt that records the exact graph and hashes the complete tree. They
466
467
  travel with the project and builds never fetch from the registry. Install/build
467
468
  scripts, native addon compilation, bundled `node_modules`, and non-registry
468
469
  dependency selectors are intentionally unsupported. Only install packages you
469
- trust: plugins run unsandboxed with the process's full filesystem and network
470
+ trust: extensions run unsandboxed with the process's full filesystem and network
470
471
  privileges.
471
472
 
472
- Use the manifest `export` field, or `plugin add --export <name>`, for packages
473
+ Use the entry's `export` field, or `ext add --export <name>`, for packages
473
474
  that expose a named plugin function instead of a default export.
474
475
 
475
- See [User Guide: Chapter 5 — Plugins](https://github.com/dimm-city/gutterpress/blob/main/examples/gutterpress-user-guide/05-plugins.md) for authoring custom plugins.
476
+ See [User Guide: Chapter 5 — Plugins](https://github.com/dimm-city/gutterpress/blob/main/examples/gutterpress-user-guide/05-plugins.md) for the full list contract and for authoring custom plugins, and [Chapter 4 — Styling & Theming](https://github.com/dimm-city/gutterpress/blob/main/examples/gutterpress-user-guide/04-styling-theming.md) for looks.
476
477
 
477
478
  ## CI / scripting
478
479
 
@@ -28,13 +28,15 @@ about to add a rule to the wrong sheet.
28
28
  ## Try it
29
29
 
30
30
  ```sh
31
- gutterpress theme import ./{{SLUG}} ../my-book
32
- gutterpress theme apply {{SLUG}} ../my-book
31
+ gutterpress ext add ./{{SLUG}} ../my-book
33
32
  gutterpress preview ../my-book
34
33
  ```
35
34
 
36
- Both theme commands take the book directory as their second POSITIONAL
37
- argument, not a `--dir` flag.
35
+ `ext add` takes the book directory as its second POSITIONAL argument, not a
36
+ `--dir` flag. It lists the folder under the book's `extensions:` and references
37
+ it in place — nothing is copied, so keep editing here and the book follows.
38
+ The book's own `styles:` always load after every extension, so an author can
39
+ override any rule in this package from their `styles/book.css`.
38
40
 
39
41
  Then in a chapter:
40
42
 
@@ -127,9 +129,9 @@ That asymmetry is the whole difference between the two kinds of package.
127
129
  ```
128
130
 
129
131
  Each sheet then puts everything it owns inside its layer. The cascade is
130
- settled by that one line rather than by which file `styles:` lists last, so
131
- splitting a sheet or reordering the manifest can no longer silently flip who
132
- wins.
132
+ settled by that one line rather than by which sheet `gutterpress.json`'s
133
+ `styles` lists last, so splitting a sheet or reordering that list can no
134
+ longer silently flip who wins.
133
135
 
134
136
  The trap, and it catches everyone once: a rule left OUTSIDE all the layers is
135
137
  fully unlayered, and unlayered CSS beats layered CSS at any specificity. So
@@ -25,14 +25,17 @@ bun test
25
25
  Then wire it into a book. In the book's `manifest.yaml`:
26
26
 
27
27
  ```yaml
28
- plugins:
29
- - path: plugins/{{SLUG}}
28
+ extensions:
29
+ - ./plugins/{{SLUG}}
30
30
  ```
31
31
 
32
- `path:` names the FOLDER, not `plugin.js`. That is what makes Gutterpress read
32
+ `gutterpress ext add ./plugins/{{SLUG}} <book>` writes that line for you (the
33
+ book directory is the second positional argument). Either way the entry names
34
+ the FOLDER, not `plugin.js`. That is what makes Gutterpress read
33
35
  `gutterpress.json` and pick up the stylesheet and snippets alongside the
34
36
  markdown behaviour — point it at the `.js` file and you get the markdown and
35
- nothing else.
37
+ nothing else. The folder is referenced in place, never copied: keep editing it
38
+ and the book follows.
36
39
 
37
40
  Now `gutterpress preview` the book and write:
38
41
 
@@ -111,14 +114,20 @@ outcome, and another reason to prefix.
111
114
 
112
115
  `styles/plugin.css` wraps everything in `@layer {{SLUG}}`.
113
116
 
114
- Plugin CSS is injected before the book's own stylesheets, and in CSS an
115
- unlayered rule beats a layered one at any specificity. So an unlayered plugin
116
- sheet outranks every rule in a book that uses the recommended
117
+ Extension CSS lands in the book in `extensions:` list order, and always before
118
+ the book's own `styles:`. In CSS an unlayered rule beats a layered one at any
119
+ specificity. So an unlayered plugin sheet outranks every rule in a book whose
120
+ look uses the recommended
117
121
  `@layer tokens, base, components, templates, pages, book;` convention — the
118
122
  author edits their CSS and nothing happens.
119
123
 
120
- Because this sheet loads first, its layer sorts first, which makes it the
121
- weakest thing in the book. That is the right place for a plugin to sit.
124
+ Inside a layer, the book's own unlayered `styles:` always beat you, which is
125
+ right. Against the LOOK's layers, position decides: a layer sorts by where it
126
+ is first declared, so with this plugin listed above the look in `extensions:`
127
+ its layer sorts first and is the weakest thing in the book — the right place
128
+ for a plugin to sit. Listed below the look, its component rules win ties over
129
+ the look's layered rules instead. Either way the author moves one line to
130
+ change it; that is the whole point of the list.
122
131
 
123
132
  Adopt it for the whole file: a rule left outside the layer is unlayered and
124
133
  beats everything inside it, including your own.
@@ -152,4 +161,4 @@ Anything a book can reach works. Committing the folder into the book's
152
161
  `plugins/` directory is the simplest and needs no registry at all.
153
162
 
154
163
  To publish to npm, `npm publish` this folder and have readers install it with
155
- `gutterpress plugin add {{SLUG}}`.
164
+ `gutterpress ext add {{SLUG}}`.
@@ -33,14 +33,14 @@ export { listBuiltInTemplates, listCustomTemplates, saveProjectAsTemplate, impor
33
33
  export type { TemplateInfo, SaveProjectAsTemplateOptions, } from "../lib/project-templates.ts";
34
34
  export { extractVariables, substituteVariables, listSnippets, readSnippet, saveSnippet, deleteSnippet, listMergedSnippets, readExtensionSnippet, SNIPPETS_DIR, } from "../lib/snippets.ts";
35
35
  export type { SnippetEntry, SnippetSource } from "../lib/snippets.ts";
36
- export { listProjectPlugins, setPluginEnabled, addLocalPlugin, addNpmPlugin, validateProjectPlugins, RECOMMENDED_PLUGINS, PLUGINS_DIR, } from "../lib/plugin-manager.ts";
37
- export type { ProjectPluginEntry, PluginValidationResult, RecommendedPlugin, PluginKind, } from "../lib/plugin-manager.ts";
38
- export { listBuiltInThemes, resolveBuiltInTheme, listProjectThemes, getActiveTheme, applyTheme, importThemeFromFolder, importThemeFromUrl, readThemeCss, removeProjectTheme, getPreviousTheme, revertTheme, detectLegacyForkedTheme, BUILT_IN_THEME_IDS, THEMES_DIR, } from "../lib/theme-manager.ts";
39
- export type { ThemeInfo, ThemeMetadata, ResolvedTheme, ApplyThemeTarget, BuiltInThemeId, } from "../lib/theme-manager.ts";
40
- export { importThemeFromFile } from "../lib/theme-import.ts";
41
- export type { ThemeImportResult, ThemeImportWarning } from "../lib/theme-import.ts";
42
- export { EXTENSION_MANIFEST_FILENAME, LEGACY_THEME_MANIFEST_FILENAME, readExtensionMeta, extensionStyleList, extensionEngineStyleList, assertExtensionContained, pathEscapesFolder, resolveExtension, } from "../lib/extension-manifest.ts";
43
- export type { ExtensionMetadata, ResolvedExtension } from "../lib/extension-manifest.ts";
36
+ export { listProjectExtensions, describeExtension, addExtension, removeExtension, setExtensionEnabled, reorderExtensions, validateProjectExtensions, readExtensionCss, listBuiltInStyleSets, addBuiltInStyleSet, sameExtension, RECOMMENDED_EXTENSIONS, BUILT_IN_STYLE_SET_IDS, EXTENSIONS_DIR, PLUGINS_DIR, } from "../lib/extension-manager.ts";
37
+ export type { ProjectExtensionEntry, ExtensionValidationResult, RecommendedExtension, ExtensionSourceKind, BuiltInStyleSet, BuiltInStyleSetId, AddExtensionOptions, } from "../lib/extension-manager.ts";
38
+ export { BUNDLED_EXTENSIONS, isBundledExtension, isPathSpecifier, parseExtensionSpecifier, } from "../lib/extension-specifier.ts";
39
+ export type { ParsedExtensionSpecifier } from "../lib/extension-specifier.ts";
40
+ export { importExtensionFromFile, importExtensionFromUrl } from "../lib/extension-import.ts";
41
+ export type { ExtensionImportResult, ExtensionImportWarning } from "../lib/extension-import.ts";
42
+ export { EXTENSION_MANIFEST_FILENAME, LEGACY_THEME_MANIFEST_FILENAME, readExtensionMeta, extensionStyleList, extensionStyleListWithDefault, extensionCarries, assertExtensionContained, pathEscapesFolder, resolveExtension, } from "../lib/extension-manifest.ts";
43
+ export type { ExtensionMetadata, ResolvedExtension, ExtensionCarries, } from "../lib/extension-manifest.ts";
44
44
  export { listProjectStyles, resolveActiveStyles } from "../lib/style-resolver.ts";
45
45
  export type { ProjectStyle } from "../lib/style-resolver.ts";
46
46
  export { readManifestFields, setManifestFields, setActiveStyles, } from "../lib/manifest-config.ts";
package/dist/api/index.js CHANGED
@@ -6,8 +6,10 @@ import {
6
6
  AUTO_SYNC_MAX_MINUTES,
7
7
  AUTO_SYNC_MIN_MINUTES,
8
8
  AUTO_SYNC_PUSH_INTERVAL_MINUTES,
9
+ BUILT_IN_STYLE_SET_IDS,
9
10
  BUILT_IN_TEMPLATE_IDS,
10
- BUILT_IN_THEME_IDS,
11
+ BUNDLED_EXTENSIONS,
12
+ EXTENSIONS_DIR,
11
13
  EXTENSION_KINDS,
12
14
  EXTENSION_MANIFEST_FILENAME,
13
15
  FileTokenStore,
@@ -22,17 +24,15 @@ import {
22
24
  PRESETS,
23
25
  PRESET_IDS,
24
26
  PublishSelectionsStore,
25
- RECOMMENDED_PLUGINS,
27
+ RECOMMENDED_EXTENSIONS,
26
28
  RESERVED_PREFIX,
27
29
  SNIPPETS_DIR,
28
30
  SYNC_SNAPSHOT_MESSAGE,
29
31
  TARGETS,
30
32
  TARGET_IDS,
31
- THEMES_DIR,
32
- addLocalPlugin,
33
- addNpmPlugin,
33
+ addBuiltInStyleSet,
34
+ addExtension,
34
35
  adoptFolder,
35
- applyTheme,
36
36
  assertExtensionContained,
37
37
  autoSnapshotDelayMs,
38
38
  autoSyncDelayMs,
@@ -42,40 +42,40 @@ import {
42
42
  connectPublishProvider,
43
43
  defaultConfigDir,
44
44
  deleteSnippet,
45
- detectLegacyForkedTheme,
45
+ describeExtension,
46
46
  diagnoseProjectRemote,
47
47
  disconnectPublishCredential,
48
48
  escapeYamlScalar,
49
- extensionEngineStyleList,
49
+ extensionCarries,
50
50
  extensionStyleList,
51
+ extensionStyleListWithDefault,
51
52
  extractUrlCredential,
52
53
  extractVariables,
53
54
  forgeKindForHost,
54
- getActiveTheme,
55
- getPreviousTheme,
56
55
  getSystemDiagnostics,
57
56
  hasProjectManifest,
57
+ importExtensionFromFile,
58
+ importExtensionFromUrl,
58
59
  importTemplateFromFolder,
59
- importThemeFromFile,
60
- importThemeFromFolder,
61
- importThemeFromUrl,
60
+ isBundledExtension,
62
61
  isGitInternalPath,
62
+ isPathSpecifier,
63
63
  isSshRemoteUrl,
64
64
  knownForgeTokenUrl,
65
+ listBuiltInStyleSets,
65
66
  listBuiltInTemplates,
66
- listBuiltInThemes,
67
67
  listCustomTemplates,
68
68
  listGitHubBranches,
69
69
  listGitHubRepositories,
70
70
  listMergedSnippets,
71
- listProjectPlugins,
71
+ listProjectExtensions,
72
72
  listProjectStyles,
73
- listProjectThemes,
74
73
  listPublishAccounts,
75
74
  listPublishProviders,
76
75
  listRepoBooks,
77
76
  listSnippets,
78
77
  loadManifestWithPath,
78
+ parseExtensionSpecifier,
79
79
  parseRemoteOrigin,
80
80
  pathEscapesFolder,
81
81
  pkceChallengeFromVerifier,
@@ -83,16 +83,16 @@ import {
83
83
  publishCredentialKey,
84
84
  publishProviderFor,
85
85
  publishTargetFor,
86
+ readExtensionCss,
86
87
  readExtensionMeta,
87
88
  readExtensionSnippet,
88
89
  readManifestFields,
89
90
  readPublishSettings,
90
91
  readSnippet,
91
- readThemeCss,
92
- removeProjectTheme,
92
+ removeExtension,
93
+ reorderExtensions,
93
94
  requireGoogleClientCredentials,
94
95
  resolveActiveStyles,
95
- resolveBuiltInTheme,
96
96
  resolveConfig,
97
97
  resolveExtension,
98
98
  resolveExtensionPrefix,
@@ -101,18 +101,18 @@ import {
101
101
  resolveGoogleClientSecret,
102
102
  resolvePublishFormat,
103
103
  resolvePublishRequest,
104
- revertTheme,
105
104
  revokeGoogleCredential,
106
105
  runBuild,
107
106
  runPublish,
107
+ sameExtension,
108
108
  sanitizeCloneFolderName,
109
109
  saveProjectAsTemplate,
110
110
  saveSnippet,
111
111
  scaffoldExtension,
112
112
  scaffoldProject,
113
113
  setActiveStyles,
114
+ setExtensionEnabled,
114
115
  setManifestFields,
115
- setPluginEnabled,
116
116
  setPublishProviderConfig,
117
117
  slugifyProjectName,
118
118
  splitOutPath,
@@ -120,13 +120,13 @@ import {
120
120
  substituteVariables,
121
121
  syncProject,
122
122
  testRemoteAccess,
123
- validateProjectPlugins
124
- } from "../index-dfw8hn8q.js";
123
+ validateProjectExtensions
124
+ } from "../index-erwh3bww.js";
125
125
  import {
126
126
  BuildError,
127
127
  DEFAULT_PRINT_OPTS,
128
128
  readyProbeExpr
129
- } from "../index-9pbaznww.js";
129
+ } from "../index-zwcv1njy.js";
130
130
  import {
131
131
  AUTO_SNAPSHOT_MESSAGE,
132
132
  HISTORY_PAGE_LIMIT,
@@ -145,7 +145,7 @@ import {
145
145
  } from "../index-v5mp7a6q.js";
146
146
  import"../index-37x76zdn.js";
147
147
  export {
148
- validateProjectPlugins,
148
+ validateProjectExtensions,
149
149
  testRemoteAccess,
150
150
  syncProject,
151
151
  substituteVariables,
@@ -153,18 +153,18 @@ export {
153
153
  splitOutPath,
154
154
  slugifyProjectName,
155
155
  setPublishProviderConfig,
156
- setPluginEnabled,
157
156
  setManifestFields,
157
+ setExtensionEnabled,
158
158
  setActiveStyles,
159
159
  scaffoldProject,
160
160
  scaffoldExtension,
161
161
  saveSnippet,
162
162
  saveProjectAsTemplate,
163
163
  sanitizeCloneFolderName,
164
+ sameExtension,
164
165
  runPublish,
165
166
  runBuild,
166
167
  revokeGoogleCredential,
167
- revertTheme,
168
168
  restoreVersionWithBackup,
169
169
  resolvePublishRequest,
170
170
  resolvePublishFormat,
@@ -175,19 +175,19 @@ export {
175
175
  resolveExtensionPrefix,
176
176
  resolveExtension,
177
177
  resolveConfig,
178
- resolveBuiltInTheme,
179
178
  resolveActiveStyles,
180
179
  requireGoogleClientCredentials,
181
180
  repoSubPath,
182
181
  repoRootForSource,
183
- removeProjectTheme,
182
+ reorderExtensions,
183
+ removeExtension,
184
184
  readyProbeExpr,
185
- readThemeCss,
186
185
  readSnippet,
187
186
  readPublishSettings,
188
187
  readManifestFields,
189
188
  readExtensionSnippet,
190
189
  readExtensionMeta,
190
+ readExtensionCss,
191
191
  publishTargetFor,
192
192
  publishProviderFor,
193
193
  publishCredentialKey,
@@ -196,43 +196,43 @@ export {
196
196
  pkceChallengeFromVerifier,
197
197
  pathEscapesFolder,
198
198
  parseRemoteOrigin,
199
+ parseExtensionSpecifier,
199
200
  loadManifestWithPath,
200
201
  listSnippets,
201
202
  listRepoBooks,
202
203
  listPublishProviders,
203
204
  listPublishAccounts,
204
- listProjectThemes,
205
205
  listProjectStyles,
206
- listProjectPlugins,
206
+ listProjectExtensions,
207
207
  listMergedSnippets,
208
208
  listGitHubRepositories,
209
209
  listGitHubBranches,
210
210
  listCustomTemplates,
211
- listBuiltInThemes,
212
211
  listBuiltInTemplates,
212
+ listBuiltInStyleSets,
213
213
  knownForgeTokenUrl,
214
214
  isSshRemoteUrl,
215
+ isPathSpecifier,
215
216
  isNoChangesError,
216
217
  isGitInternalPath,
217
- importThemeFromUrl,
218
- importThemeFromFolder,
219
- importThemeFromFile,
218
+ isBundledExtension,
220
219
  importTemplateFromFolder,
220
+ importExtensionFromUrl,
221
+ importExtensionFromFile,
221
222
  hasProjectManifest,
222
223
  getSystemDiagnostics,
223
- getPreviousTheme,
224
- getActiveTheme,
225
224
  forgeKindForHost,
226
225
  findEnclosingRepoDir,
227
226
  extractVariables,
228
227
  extractUrlCredential,
228
+ extensionStyleListWithDefault,
229
229
  extensionStyleList,
230
- extensionEngineStyleList,
230
+ extensionCarries,
231
231
  escapeYamlScalar,
232
232
  disconnectPublishCredential,
233
233
  diagnoseProjectRemote,
234
234
  detectProjectSource,
235
- detectLegacyForkedTheme,
235
+ describeExtension,
236
236
  deleteSnippet,
237
237
  defaultConfigDir,
238
238
  connectPublishProvider,
@@ -243,18 +243,16 @@ export {
243
243
  autoSyncDelayMs,
244
244
  autoSnapshotDelayMs,
245
245
  assertExtensionContained,
246
- applyTheme,
247
246
  adoptFolder,
248
- addNpmPlugin,
249
- addLocalPlugin,
250
- THEMES_DIR,
247
+ addExtension,
248
+ addBuiltInStyleSet,
251
249
  TARGET_IDS,
252
250
  TARGETS,
253
251
  SYNC_SNAPSHOT_MESSAGE,
254
252
  SNIPPETS_DIR,
255
253
  RESTORE_BACKUP_MESSAGE,
256
254
  RESERVED_PREFIX,
257
- RECOMMENDED_PLUGINS,
255
+ RECOMMENDED_EXTENSIONS,
258
256
  PublishSelectionsStore,
259
257
  PRESET_IDS,
260
258
  PRESETS,
@@ -270,10 +268,12 @@ export {
270
268
  FileTokenStore,
271
269
  EXTENSION_MANIFEST_FILENAME,
272
270
  EXTENSION_KINDS,
271
+ EXTENSIONS_DIR,
273
272
  DEFAULT_PRINT_OPTS,
274
273
  BuildError,
275
- BUILT_IN_THEME_IDS,
274
+ BUNDLED_EXTENSIONS,
276
275
  BUILT_IN_TEMPLATE_IDS,
276
+ BUILT_IN_STYLE_SET_IDS,
277
277
  AUTO_SYNC_PUSH_INTERVAL_MINUTES,
278
278
  AUTO_SYNC_MIN_MINUTES,
279
279
  AUTO_SYNC_MAX_MINUTES,