diff --git a/addon-build/docx-editor/build.mjs b/addon-build/docx-editor/build.mjs index d49488b8..252b73a9 100644 --- a/addon-build/docx-editor/build.mjs +++ b/addon-build/docx-editor/build.mjs @@ -1,5 +1,5 @@ // Bundles the extension's npm dependencies into -// extensions/docx-editor/vendor/docx-vendor.js. +// bundled-addons/docx-editor/vendor/docx-vendor.js. // // npm run build (from addon-build/docx-editor/) // @@ -13,7 +13,7 @@ import path from "node:path"; import { applyPatches, patches } from "./patches.mjs"; const here = path.dirname(fileURLToPath(import.meta.url)); -const out = path.resolve(here, "../../extensions/docx-editor/vendor"); +const out = path.resolve(here, "../../bundled-addons/docx-editor/vendor"); const patchedRoot = path.join(here, ".patched"); // --- 1. patched mammoth --------------------------------------------------- diff --git a/addon-build/docx-editor/make-icons.mjs b/addon-build/docx-editor/make-icons.mjs index 908b329a..1af2fe7b 100644 --- a/addon-build/docx-editor/make-icons.mjs +++ b/addon-build/docx-editor/make-icons.mjs @@ -15,7 +15,7 @@ import os from "node:os"; const here = path.dirname(fileURLToPath(import.meta.url)); const ROOT = path.resolve(here, "../.."); -const EXT = path.resolve(ROOT, "extensions/docx-editor"); +const EXT = path.resolve(ROOT, "bundled-addons/docx-editor"); const SIZES = [16, 32, 48, 128, 256]; const electron = path.join(ROOT, "node_modules", "electron", "dist", diff --git a/addon-build/docx-editor/package.json b/addon-build/docx-editor/package.json index fb1f8a86..275b0f3e 100644 --- a/addon-build/docx-editor/package.json +++ b/addon-build/docx-editor/package.json @@ -2,7 +2,7 @@ "name": "docx-editor-vendor-build", "private": true, "version": "0.0.0", - "description": "Build-time only: bundles mammoth + ProseMirror + docx into extensions/docx-editor/vendor/, and rasterises the icon.", + "description": "Build-time only: bundles mammoth + ProseMirror + docx into bundled-addons/docx-editor/vendor/, and rasterises the icon.", "type": "module", "scripts": { "build": "node build.mjs", diff --git a/addon-build/docx-editor/test/harness.mjs b/addon-build/docx-editor/test/harness.mjs index 0eac8e8b..cbfa8080 100644 --- a/addon-build/docx-editor/test/harness.mjs +++ b/addon-build/docx-editor/test/harness.mjs @@ -14,7 +14,7 @@ import { JSDOM } from "jsdom"; const here = path.dirname(fileURLToPath(import.meta.url)); const require = createRequire(import.meta.url); -export const ADDON = path.resolve(here, "../../../extensions/docx-editor"); +export const ADDON = path.resolve(here, "../../../bundled-addons/docx-editor"); export function loadAddonLibs() { const dom = new JSDOM(""); diff --git a/extensions/docx-editor/README.md b/bundled-addons/docx-editor/README.md similarity index 87% rename from extensions/docx-editor/README.md rename to bundled-addons/docx-editor/README.md index 3a9d6713..08e83071 100644 --- a/extensions/docx-editor/README.md +++ b/bundled-addons/docx-editor/README.md @@ -17,12 +17,16 @@ operator key, and updated over the channel at It does not go through the community catalogue, which is for extensions published by whoever owns a BNS name. -It currently lives outside `bundled-addons/`, so it is not compiled into the -browser and a fresh profile doesn't have it. That keeps a megabyte of -vendored library off everyone who only wanted a browser — but note that -Settings can only *install* from the community catalogue, so until it is -either bundled or listed there, the update channel keeps an existing copy -current without giving anyone a way to get the first one. +It ships inside Theseus, so a fresh install already has it and Settings +lists it under **Built into Theseus**; the channel above then updates it +between releases without waiting for one. That is the same arrangement as +screenshot, aegis and pdf-editor, and it is what gives a user their first +copy at all — Settings can only *install* from the community catalogue, so +an extension that is neither bundled nor catalogued has a working update +channel and no way in. + +The cost is about 400 KB compressed in the installer, most of it the +vendored editor libraries. ## The icon diff --git a/extensions/docx-editor/ROUND-TRIP.md b/bundled-addons/docx-editor/ROUND-TRIP.md similarity index 100% rename from extensions/docx-editor/ROUND-TRIP.md rename to bundled-addons/docx-editor/ROUND-TRIP.md diff --git a/extensions/docx-editor/addon.json b/bundled-addons/docx-editor/addon.json similarity index 100% rename from extensions/docx-editor/addon.json rename to bundled-addons/docx-editor/addon.json diff --git a/extensions/docx-editor/editor.css b/bundled-addons/docx-editor/editor.css similarity index 100% rename from extensions/docx-editor/editor.css rename to bundled-addons/docx-editor/editor.css diff --git a/extensions/docx-editor/editor.html b/bundled-addons/docx-editor/editor.html similarity index 100% rename from extensions/docx-editor/editor.html rename to bundled-addons/docx-editor/editor.html diff --git a/extensions/docx-editor/editor.js b/bundled-addons/docx-editor/editor.js similarity index 100% rename from extensions/docx-editor/editor.js rename to bundled-addons/docx-editor/editor.js diff --git a/extensions/docx-editor/icon-128.png b/bundled-addons/docx-editor/icon-128.png similarity index 100% rename from extensions/docx-editor/icon-128.png rename to bundled-addons/docx-editor/icon-128.png diff --git a/extensions/docx-editor/icon-16.png b/bundled-addons/docx-editor/icon-16.png similarity index 100% rename from extensions/docx-editor/icon-16.png rename to bundled-addons/docx-editor/icon-16.png diff --git a/extensions/docx-editor/icon-256.png b/bundled-addons/docx-editor/icon-256.png similarity index 100% rename from extensions/docx-editor/icon-256.png rename to bundled-addons/docx-editor/icon-256.png diff --git a/extensions/docx-editor/icon-32.png b/bundled-addons/docx-editor/icon-32.png similarity index 100% rename from extensions/docx-editor/icon-32.png rename to bundled-addons/docx-editor/icon-32.png diff --git a/extensions/docx-editor/icon-48.png b/bundled-addons/docx-editor/icon-48.png similarity index 100% rename from extensions/docx-editor/icon-48.png rename to bundled-addons/docx-editor/icon-48.png diff --git a/extensions/docx-editor/icon.svg b/bundled-addons/docx-editor/icon.svg similarity index 100% rename from extensions/docx-editor/icon.svg rename to bundled-addons/docx-editor/icon.svg diff --git a/extensions/docx-editor/index.js b/bundled-addons/docx-editor/index.js similarity index 100% rename from extensions/docx-editor/index.js rename to bundled-addons/docx-editor/index.js diff --git a/extensions/docx-editor/lib/doc-css.js b/bundled-addons/docx-editor/lib/doc-css.js similarity index 100% rename from extensions/docx-editor/lib/doc-css.js rename to bundled-addons/docx-editor/lib/doc-css.js diff --git a/extensions/docx-editor/lib/pkg.js b/bundled-addons/docx-editor/lib/pkg.js similarity index 100% rename from extensions/docx-editor/lib/pkg.js rename to bundled-addons/docx-editor/lib/pkg.js diff --git a/extensions/docx-editor/lib/read.js b/bundled-addons/docx-editor/lib/read.js similarity index 100% rename from extensions/docx-editor/lib/read.js rename to bundled-addons/docx-editor/lib/read.js diff --git a/extensions/docx-editor/lib/schema.js b/bundled-addons/docx-editor/lib/schema.js similarity index 100% rename from extensions/docx-editor/lib/schema.js rename to bundled-addons/docx-editor/lib/schema.js diff --git a/extensions/docx-editor/lib/write.js b/bundled-addons/docx-editor/lib/write.js similarity index 100% rename from extensions/docx-editor/lib/write.js rename to bundled-addons/docx-editor/lib/write.js diff --git a/extensions/docx-editor/panel.html b/bundled-addons/docx-editor/panel.html similarity index 100% rename from extensions/docx-editor/panel.html rename to bundled-addons/docx-editor/panel.html diff --git a/extensions/docx-editor/vendor/LICENSES.txt b/bundled-addons/docx-editor/vendor/LICENSES.txt similarity index 100% rename from extensions/docx-editor/vendor/LICENSES.txt rename to bundled-addons/docx-editor/vendor/LICENSES.txt diff --git a/extensions/docx-editor/vendor/docx-vendor.js b/bundled-addons/docx-editor/vendor/docx-vendor.js similarity index 100% rename from extensions/docx-editor/vendor/docx-vendor.js rename to bundled-addons/docx-editor/vendor/docx-vendor.js