Add Dock icon pack and polish controls and navigation geometry
This commit is contained in:
1 parent
ef98c2835b
commit
99156ed011
161 files changed
+1438
-54
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { concepts, tokensFor, cssVars } from "../concepts/registry.js";
|
||||
import { iconNames } from "../icons/icons.js";
|
||||
function zip(files) {
|
||||
const enc = new TextEncoder();
|
||||
let offset = 0;
|
||||
@@ -12,7 +13,7 @@ function zip(files) {
|
||||
u16(v, n >>> 16);
|
||||
};
|
||||
for (const [name, content] of Object.entries(files)) {
|
||||
const bytes = enc.encode(content),
|
||||
const bytes = content instanceof Uint8Array ? content : enc.encode(content),
|
||||
nb = enc.encode(name);
|
||||
let crc = -1;
|
||||
for (const b of bytes) {
|
||||
@@ -92,6 +93,17 @@ export async function exportSystem(
|
||||
};
|
||||
const files = {};
|
||||
const paths = [
|
||||
"icons/icons.js",
|
||||
"icons/index.html",
|
||||
"icons/catalog.css",
|
||||
"icons/catalog.js",
|
||||
"icons/manifest.json",
|
||||
"icons/README.md",
|
||||
"icons/sprite.svg",
|
||||
"icons/preview-light.svg",
|
||||
"icons/preview-dark.svg",
|
||||
"icons/anidev-dock-icons.zip",
|
||||
...iconNames.map((name) => `icons/svg/${name}.svg`),
|
||||
"components/system.css",
|
||||
"components/export-system.js",
|
||||
"components/account-pages.js",
|
||||
@@ -113,7 +125,12 @@ export async function exportSystem(
|
||||
paths.map(async (p) => {
|
||||
const r = await fetch(new URL(p, new URL("../", import.meta.url)));
|
||||
if (!r.ok) throw Error(p);
|
||||
return [p, await r.text()];
|
||||
return [
|
||||
p,
|
||||
p.endsWith(".zip")
|
||||
? new Uint8Array(await r.arrayBuffer())
|
||||
: await r.text(),
|
||||
];
|
||||
}),
|
||||
);
|
||||
for (const [p, t] of fetched) files[p] = t;
|
||||
|
||||
Reference in new issue
Block a user