vintage-frames 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -18
- package/custom-elements.json +8 -8
- package/dist/text-control.d.ts +3 -3
- package/docs/SPEC.md +3 -3
- package/editor/vscode.html-custom-data.json +3 -3
- package/editor/web-types.json +7 -7
- package/package.json +4 -34
- package/dist/build/app-file.d.ts +0 -21
- package/dist/build/app-file.js +0 -42
- package/dist/build/box.d.ts +0 -57
- package/dist/build/box.js +0 -93
- package/dist/build/client.d.ts +0 -12
- package/dist/build/frame-picture.d.ts +0 -6
- package/dist/build/frame-picture.js +0 -4
- package/dist/build/frame.d.ts +0 -11
- package/dist/build/frame.js +0 -44
- package/dist/build/index.d.ts +0 -14
- package/dist/build/index.js +0 -4
- package/dist/build/plugins.d.ts +0 -41
- package/dist/build/plugins.js +0 -134
- package/dist/build/png.d.ts +0 -24
- package/dist/build/png.js +0 -116
- package/dist/shell/alert.d.ts +0 -40
- package/dist/shell/alert.js +0 -41
- package/dist/shell/app-file.d.ts +0 -115
- package/dist/shell/app-file.js +0 -189
- package/dist/shell/catalog.d.ts +0 -250
- package/dist/shell/catalog.js +0 -349
- package/dist/shell/clock.d.ts +0 -16
- package/dist/shell/clock.js +0 -36
- package/dist/shell/filing.d.ts +0 -39
- package/dist/shell/filing.js +0 -68
- package/dist/shell/finder.d.ts +0 -180
- package/dist/shell/finder.js +0 -676
- package/dist/shell/geometry.d.ts +0 -203
- package/dist/shell/geometry.js +0 -257
- package/dist/shell/index.d.ts +0 -30
- package/dist/shell/index.js +0 -12
- package/dist/shell/pure.d.ts +0 -13
- package/dist/shell/pure.js +0 -6
- package/dist/shell/shell.d.ts +0 -177
- package/dist/shell/shell.js +0 -277
- package/dist/shell/state.d.ts +0 -88
- package/dist/shell/state.js +0 -103
- package/dist/shell/storage.d.ts +0 -14
- package/dist/shell/storage.js +0 -41
- package/dist/shell/version.d.ts +0 -2
- package/dist/shell/version.js +0 -4
- package/dist/shell/windows.d.ts +0 -278
- package/dist/shell/windows.js +0 -447
- package/dist/styles/body-strike.d.ts +0 -12
- package/dist/styles/body-strike.js +0 -3961
- package/dist/styles/display-strike.d.ts +0 -12
- package/dist/styles/display-strike.js +0 -4343
- package/dist/styles/strike.d.ts +0 -30
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region src/build/frame-picture.ts
|
|
2
|
-
var e = Uint8Array.from(atob("iVBORw0KGgoAAAANSUhEUgAAAeAAAAJnCAYAAABPiYBoAAAL3klEQVR42u3VwQkAIAwEwfRfW3rSBnwJBuFmYQpQAldVtQCAcT4BAAwwAKQNsCRJepcBliTJAEuSZIAlSZIBliTJAEuSJAMsSZIBliRJBliSJAMsSZIMsCRJBliSJAMsSZIMsCRJBliSJBlgSZIMsCRJMsCSJBlgSZJkgCVJMsCSJBlgAyxJkgGWJMkAS5IkAyxJkgGWJEkGWJIkAyxJkgywJEkGWJIkA2yAJUkywJIkGWBJkmSAJUkywJIkyQBLkmSAJUmSAZYkyQBLkmSADbAkSQZYkiQDLEmSDPDxAQCEM8AGGAADbIABMMAG+NEDuhuAQAbYAANggA0wAAbYABtgAAywAQbAABtgAwyAATbAABhgA2yAATDABhgAA2yADTAABtgAA2CADTAABtgAG2AADLABBsAAG2ADDIABNsAAGGADbIABMMAGGAADbIANMAAG2AADYIANMAAG2AAbYAAMsAEGwAAbYAMMgAE2wAAYYANsgAEwwAYYAANsgA0wAAbYAANggA0wAAbYABtgAAywAQbAABtgAwyAATbAABhgA2yAATDABhgAA2yADTAABtgAA2CADTAABtgAG2AADLABBsAAG2ADDIABNsAAGGADbIABMMAGGAADbIANMAAG2AADYIANsCMEMMAG2AADYIANMAAG2AAbYAAMsAEGwAAbYAMMgAE2wAAYYANsgAEwwAYYAANsgA0wgAE2wAYYAANsgAEwwAbYAANggA0wAAbYABtgAAywAQbAABtgAwyAATbAABhgA2yAAQywATbAABhgAwyAATbABhgAA2yAATDABtgAA2CADTAABtgAG2AADLABBsAAG2ADDGCADbABBsAAG2AADLABNsAAGGADDIABNsAGGAADbIABMMAG2AADYIANMAAG2AAbYAADbIANMAAG2AADYIANsAEGwAAbYAAMsAE2wAAYYAMMgAE2wAYYAANsgAEwwAbYAANggA0wAAbYAANggA2wAQbAABtgAAywATbAABhgAwyAATbABhgAA2yAATDABtgAA2CADTAABtgAA2CADbABBsAAG2AADLABNsAAGGADDIABNsAGGAADbIABMMAG2AADYIANMAAG2AADYIANsAEGwAAbYAAMsAE2wAAYYAMMgAE2wAYYAANsgAEwwAbYAANggA0wAAbYAANggA2wAQbAABtgAAywATbAABhgAwyAATbABhgAA2yAATDABtgAA2CADTAABtgAO0IAA2yADTAABtgAA2CADbABBsAAG2AADLABNsAAGGADDIABNsAGGAADbIABMMAG2BECGGADbIABMMAGGAADbIANMAAG2AADYIANsAEGwAAbYAAMsAE2wAAYYAMMgAE2wAYYwAAbYAMMgAE2wAAYYANsgAEwwAYYAANsgA0wAAbYAANggA2wAQbAABtgAAywATbAAAbYABtgAAywAQbAABtgAwyAATbAABhgA2yAATDABhgAA2yADTAABtgAA2CADbABBjDABtgAA2CADTAABtgAG2AADLABBsAAG2ADDIABNsAAGGADbIABMMAGGAADbIANMAAG2AADYIANMAAG2AAbYAAMsAEGwAAbYAMMgAE2wAAYYANsgAEwwAYYAANsgA0wAAbYAANggA0wAAbYABtgAAywAQbAABtgAwyAATbAABhgA2yAATDABhgAA2yADTAABtgAA2CADTAABtgAG2AADLABBsAAG2ADDIABNsAAGGADbIABMMAGGAADbIANMAAG2AADYIANMAAG2AAbYAAMsAEGwAAbYAMMgAE2wAAYYANsgAEwwAYYAANsgA0wAAbYAANggA0wAAbYABtgAAywAQbAABtgAwyAATbAABhgA2yAATDABhgAA2yADTAABtgAA2CADbAjBDDABtgAA2CADTAABtgAG2AADLABBsAAG2ADDIABNsAAGGADbIABMMAGGAADbIANMIABNsAGGAADbIABMMAG2AADYIANMAAG2AAbYAAMsAEGwAAbYAMMgAE2wAAYYANsgAEMsAE2wAAYYAMMgAE2wAYYAANsgAEwwAbYAANggA0wAAbYABtgAAywAQbAABtgAwxggA2wAQbAABtgAAywATbAABhgAwyAATbABhgAA2yAATDABtgAA2CADTAABtgAG2AADLABBsAAG2AADLABNsAAGGADDIABNsAGGAADbIABMMAG2AADYIANMAAG2AAbYAAMsAEGwAAbYAAMsAE2wAAYYAMMgAE2wAYYAANsgAEwwAbYAANggA0wAAbYABtgAAywAQbAABtgAAywATbAABhgAwyAATbABhgAA2yAATDABtgAA2CADTAABtgAG2AADLABBsAAG2AADLABNsAAGGADDIABNsAGGAADbIABMMAG2AADYIANMAAG2AAbYAAMsAEGwAAbYAAMsAE2wAAYYAMMgAE2wAYYAANsgAEwwAbYAANggA0wAAbYABtgAAywAQbAABtgRwhggA2wAQbAABtgAAywATbAABhgAwyAATbABhgAA2yAATDABtgAA2CADTAABtgAG2AAA2yADTAABtgAA2CADbABBsAAG2AADLABNsAAGGADDIABNsAGGAADbIABMMAG2AADGGADbIABMMAGGAADbIANMAAG2AADYIANsAEGwAAbYAAMsAE2wAAYYAMMgAE2wAYYwAAbYAMMgAE2wAAYYANsgAEwwAYYAANsgA0wAAbYAANggA2wAQbAABtgAAywATbAAAbYABtgAAywAQbAABtgAwyAATbAABhgA2yAATDABhgAA2yADTAABtgAA2CADbABBsAAG2AADLABBsAAG2ADDIABNsAAGGADbIABMMAGGAADbIANMAAG2AADYIANsAEGwAAbYAAMsAEGwAAbYAMMgAE2wAAYYANsgAEwwAYYAANsgA0wAAbYAANggA2wAQbAABtgAAywAQbAABtgAwyAATbAABhgA2yAATDABhgAA2yADTAABtgAA2CADbABBsAAG2AADLABBsAAG2ADDIABNsAAGGADbIABMMAGGAADbICvHwBAOANsgAEwwAYYAANsgCVJCs8AS5JkgCVJMsCSJMkAS5JkgCVJkgGWJMkAS5IkAyxJkgGWJEkGWJIkAyxJkgGWJEkGWJIkAyxJkgywJEkGWJIkGWBJkgywJEkywJIkGWBJkgywAZYkyQBLkmSAJUmSAZYkyQBLkiQDLEmSAZYkSQZYkiQDLEmSATbAkiQZYEmSDLAkSTLAkiQZYEmSZIAlSTLAkiTJAEuSZIAlSTLABliSJAMsSZIBliRJBliSJAMsSZIMsCRJBliSJBlgSZIMsCRJBtgAS5JkgCVJMsCSJMkAS5JkgCVJkgGWJMkAS5IkAyxJkgGWJMkAG2BJkgywJEkGWJIkGWBJkgywJEkywJIkGWBJkmSAJUkywJIkGWADLEmSAZYkyQBLkiQDLEmSAZYkSQZYkiQDLEmSDLAkSQZYkiQDbIAlSTLAkiQZYEmSZIAlSTLAkiTJAEuSZIAlSZIBliTJAEuSZIANsCRJBliSJAMsSZIMsCRJBliSJBlgSZIMsCRJMsCSJBlgSZJkgCVJMsCSJBlgSZJkgCVJMsCSJMkAS5JkgCVJkgGWJMkAS5IkAyxJkgGWJMkAG2BJkgywJEkGWJIkGWBJkgywJEkywJIkGWBJkmSAJUkywJIkGWADLEmSAZYkyQBLkiQDLEmSAZYkSQZYkiQDLEmSDLAkSQZYkiQDbIAlSTLAkiQZYEmSZIAlSTLAkiTJAEuSZIAlSZIBliTJAEuSZIANsCRJBliSJAMsSZIMsCRJBliSJBlgSZIMsCRJMsCSJBlgSZIMsAGWJMkAS5JkgCVJkgGWJMkAS5IkAyxJkgGWJEkGWJIkAyxJkgE2wJIkGWBJkgywJEkywJIkGWBJkmSAJUkywJIkyQBLkmSAJUkywAZYkiQDLEmSAZYkSQZYkiQDLEmSDLAkSQZYkiQZYEmSDLAkSQbYAEuSZIAlSTLAkiTJAEuSZIAlSZIBliTJAEuSJAMsSZIBliRJBliSpK8GGAAY4xMAwAADQIANOM+x56UXUawAAAAASUVORK5CYII="), (e) => e.charCodeAt(0));
|
|
3
|
-
//#endregion
|
|
4
|
-
export { e as FRAME_PNG };
|
package/dist/build/frame.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The kit's frame: the picture every app file's box is drawn on, and its
|
|
3
|
-
* slots, in the picture's px. A placeholder: a white card on 160 × 205
|
|
4
|
-
* system px drawn at 3×, the artwork's slot on a gray backdrop inside a
|
|
5
|
-
* black rule, then the name, the version and the author, centered.
|
|
6
|
-
*
|
|
7
|
-
* The picture is box/frame.png (`npm run embed:frame`). A redrawn picture
|
|
8
|
-
* moves its slots here.
|
|
9
|
-
*/
|
|
10
|
-
import type { BoxFrame } from './box.js';
|
|
11
|
-
export declare const FRAME: BoxFrame;
|
package/dist/build/frame.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import "../shell/app-file.js";
|
|
2
|
-
import { VF_BODY_STRIKE as e } from "../styles/body-strike.js";
|
|
3
|
-
import { VF_DISPLAY_STRIKE as t } from "../styles/display-strike.js";
|
|
4
|
-
import { FRAME_PNG as n } from "./frame-picture.js";
|
|
5
|
-
//#region src/build/frame.ts
|
|
6
|
-
var r = 3, i = {
|
|
7
|
-
left: 16 * r,
|
|
8
|
-
width: 128 * r,
|
|
9
|
-
scale: r,
|
|
10
|
-
ink: "#000000",
|
|
11
|
-
align: "center"
|
|
12
|
-
}, a = {
|
|
13
|
-
picture: n,
|
|
14
|
-
scale: r,
|
|
15
|
-
artwork: {
|
|
16
|
-
left: 16 * r,
|
|
17
|
-
top: 16 * r,
|
|
18
|
-
width: 128 * r,
|
|
19
|
-
height: 128 * r,
|
|
20
|
-
stamp: 3 * r
|
|
21
|
-
},
|
|
22
|
-
text: [
|
|
23
|
-
{
|
|
24
|
-
...i,
|
|
25
|
-
top: 152 * r,
|
|
26
|
-
strike: t,
|
|
27
|
-
text: "{name}"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
...i,
|
|
31
|
-
top: 170 * r,
|
|
32
|
-
strike: e,
|
|
33
|
-
text: "Version {version}"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
...i,
|
|
37
|
-
top: 182 * r,
|
|
38
|
-
strike: e,
|
|
39
|
-
text: "by {author}"
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
};
|
|
43
|
-
//#endregion
|
|
44
|
-
export { a as FRAME };
|
package/dist/build/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `vintage-frames/build` — app files, written: the Vite plugin that makes an
|
|
3
|
-
* application's build write its app file, the one that builds app files
|
|
4
|
-
* into a site, and the pieces under them: the packer, the writer and the box
|
|
5
|
-
* in the kit's frame. Build-only: it runs under Node, and no page imports
|
|
6
|
-
* it. Reading an app file is `vintage-frames/shell/pure`'s.
|
|
7
|
-
* docs/APP-FILES.md is the guide.
|
|
8
|
-
*/
|
|
9
|
-
export { appFile, appFiles } from './plugins.js';
|
|
10
|
-
export type { AppFileOptions } from './plugins.js';
|
|
11
|
-
export { packApp, writeAppFile } from './app-file.js';
|
|
12
|
-
export type { PackAppInput } from './app-file.js';
|
|
13
|
-
export { composeBox } from './box.js';
|
|
14
|
-
export type { BoxInput } from './box.js';
|
package/dist/build/index.js
DELETED
package/dist/build/plugins.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Vite plugins. `appFile()` makes an application's build write its app
|
|
3
|
-
* file; `appFiles()` builds app files into a site.
|
|
4
|
-
*/
|
|
5
|
-
import type { Plugin } from 'vite';
|
|
6
|
-
export interface AppFileOptions {
|
|
7
|
-
/** The application's id, name, version and author, and its description if it has one: its `app.ts`. */
|
|
8
|
-
app: {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
version: string;
|
|
12
|
-
author: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
};
|
|
15
|
-
/** The module whose default export is the application's factory. */
|
|
16
|
-
entry: string;
|
|
17
|
-
/** Its 32 × 32 icon, a PNG. */
|
|
18
|
-
icon: string;
|
|
19
|
-
/** Its artwork for the box: a 128 × 128 PNG, or that divided by a whole number. */
|
|
20
|
-
artwork?: string;
|
|
21
|
-
/** A directory to write the app file to as well, such as a site's `apps/`. */
|
|
22
|
-
copyTo?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Makes an application's build write its app file, `dist/<name>.png`. It
|
|
26
|
-
* builds the entry as a library, one ES module with the kit's entries left
|
|
27
|
-
* as imports, and fails the build when the bundle breaks a rule: CSS or any
|
|
28
|
-
* other file beside the code, more than one module, Lit or the kit bundled
|
|
29
|
-
* in, or an import of anything but the kit's three entries. `npm run dev`
|
|
30
|
-
* is untouched.
|
|
31
|
-
*/
|
|
32
|
-
export declare function appFile(options: AppFileOptions): Plugin;
|
|
33
|
-
/**
|
|
34
|
-
* Builds app files into a site. An import of `*.png?app` reads the file and
|
|
35
|
-
* refuses one that isn't an app file, or one this kit doesn't run
|
|
36
|
-
* (`appRuns`). Its default export is the application's factory,
|
|
37
|
-
* its definition given the manifest's icon, and `manifest` is the manifest.
|
|
38
|
-
* The code imports the kit by name, so the page keeps one copy of it. A new
|
|
39
|
-
* file reloads the dev server's page.
|
|
40
|
-
*/
|
|
41
|
-
export declare function appFiles(): Plugin;
|
package/dist/build/plugins.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { VERSION as e } from "../shell/version.js";
|
|
2
|
-
import { appRuns as t, inspectAppFile as n, isVersion as r, satisfies as i } from "../shell/app-file.js";
|
|
3
|
-
import { packApp as a } from "./app-file.js";
|
|
4
|
-
import { mkdir as o, readFile as s, writeFile as c } from "node:fs/promises";
|
|
5
|
-
import { join as l, relative as u, resolve as d } from "node:path";
|
|
6
|
-
//#region src/build/plugins.ts
|
|
7
|
-
var f = [
|
|
8
|
-
"vintage-frames",
|
|
9
|
-
"vintage-frames/shell",
|
|
10
|
-
"vintage-frames/shell/pure"
|
|
11
|
-
], p = "app-code";
|
|
12
|
-
function m(e) {
|
|
13
|
-
let t = e.match(/(?<=[\\/]node_modules[\\/])(?:@[^\\/]+[\\/])?[^\\/]+/g)?.at(-1)?.replace("\\", "/");
|
|
14
|
-
return t === "vintage-frames" ? "a copy of vintage-frames" : t && /^(?:lit|lit-html|lit-element|@lit\/.+|@lit-labs\/.+)$/.test(t) ? `Lit (${t})` : null;
|
|
15
|
-
}
|
|
16
|
-
async function h(t) {
|
|
17
|
-
let n = JSON.parse(await s(l(t, "package.json"), "utf8")), i = n.devDependencies?.["vintage-frames"] ?? n.dependencies?.["vintage-frames"];
|
|
18
|
-
if (typeof i != "string") throw Error("package.json has no vintage-frames dev dependency");
|
|
19
|
-
if (!i.startsWith("^") || !r(i.slice(1))) throw Error(`package.json's vintage-frames range is "${i}", and an app file requires a caret range: ^${e}`);
|
|
20
|
-
return i;
|
|
21
|
-
}
|
|
22
|
-
function g(t) {
|
|
23
|
-
let { app: n, entry: u, icon: p, artwork: g, copyTo: _ } = t;
|
|
24
|
-
for (let e of [
|
|
25
|
-
"id",
|
|
26
|
-
"name",
|
|
27
|
-
"version",
|
|
28
|
-
"author"
|
|
29
|
-
]) if (typeof n?.[e] != "string" || !n[e]) throw Error(`vintage-frames appFile(): app.${e} is missing`);
|
|
30
|
-
if (!r(n.version)) throw Error(`vintage-frames appFile(): app.version, ${n.version}, is not a version`);
|
|
31
|
-
if (!u || !p) throw Error(`vintage-frames appFile(): ${u ? "icon" : "entry"} is missing`);
|
|
32
|
-
let v = `${n.name.replace(/[\\/:*?"<>|]/g, "-")}.png`, y = "", b = null;
|
|
33
|
-
return {
|
|
34
|
-
name: "vintage-frames:app-file",
|
|
35
|
-
apply: "build",
|
|
36
|
-
config: () => ({ build: {
|
|
37
|
-
lib: {
|
|
38
|
-
entry: u,
|
|
39
|
-
formats: ["es"],
|
|
40
|
-
fileName: "app"
|
|
41
|
-
},
|
|
42
|
-
copyPublicDir: !1,
|
|
43
|
-
rolldownOptions: {
|
|
44
|
-
external: /^vintage-frames(?:\/|$)/,
|
|
45
|
-
output: { codeSplitting: !1 }
|
|
46
|
-
}
|
|
47
|
-
} }),
|
|
48
|
-
configResolved(e) {
|
|
49
|
-
y = e.root;
|
|
50
|
-
},
|
|
51
|
-
buildStart() {
|
|
52
|
-
for (let e of [
|
|
53
|
-
p,
|
|
54
|
-
g,
|
|
55
|
-
"package.json"
|
|
56
|
-
]) e && this.addWatchFile(d(y, e));
|
|
57
|
-
},
|
|
58
|
-
generateBundle: {
|
|
59
|
-
order: "post",
|
|
60
|
-
async handler(t, r) {
|
|
61
|
-
let o = Object.values(r), c = o.filter((e) => e.type === "chunk"), l = o.filter((e) => e.type === "asset").map((e) => e.fileName);
|
|
62
|
-
l.length && this.error(`${n.name} emits ${l.join(", ")} beside its code, and an app file holds one module: no CSS import, no source map file, its art inlined.`);
|
|
63
|
-
let [u] = c;
|
|
64
|
-
(!u || c.length > 1) && this.error(`${n.name} builds to ${c.length} modules, and an app file holds one.`);
|
|
65
|
-
for (let e of Object.keys(u.modules)) {
|
|
66
|
-
let t = m(e);
|
|
67
|
-
t && this.error(`${n.name} bundles ${t}. It composes the page's kit and brings none of its own.`);
|
|
68
|
-
}
|
|
69
|
-
let _ = [...u.imports, ...u.dynamicImports].filter((e) => !f.includes(e));
|
|
70
|
-
_.length && this.error(`${n.name} imports ${_.join(", ")}. An application imports ${f.join(", ")} and its own files.`);
|
|
71
|
-
try {
|
|
72
|
-
let t = await h(y);
|
|
73
|
-
if (!i("0.19.1", t)) throw Error(`package.json requires vintage-frames ${t}, and the build is on ${e}: move the range`);
|
|
74
|
-
b = await a({
|
|
75
|
-
manifest: {
|
|
76
|
-
id: n.id,
|
|
77
|
-
name: n.name,
|
|
78
|
-
version: n.version,
|
|
79
|
-
requires: t,
|
|
80
|
-
author: n.author,
|
|
81
|
-
description: n.description
|
|
82
|
-
},
|
|
83
|
-
icon: new Uint8Array(await s(d(y, p))),
|
|
84
|
-
code: u.code,
|
|
85
|
-
artwork: g ? new Uint8Array(await s(d(y, g))) : void 0
|
|
86
|
-
});
|
|
87
|
-
} catch (e) {
|
|
88
|
-
this.error(`${n.name}: ${e.message}`);
|
|
89
|
-
}
|
|
90
|
-
delete r[u.fileName], this.emitFile({
|
|
91
|
-
type: "asset",
|
|
92
|
-
fileName: v,
|
|
93
|
-
source: b
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
async writeBundle() {
|
|
98
|
-
if (!_ || !b) return;
|
|
99
|
-
let e = d(y, _);
|
|
100
|
-
await o(e, { recursive: !0 }), await c(l(e, v), b);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function _(t) {
|
|
105
|
-
return t.api === void 0 ? `requires vintage-frames ${t.requires}, and this site has ${e}` : `is built for app API ${t.api}, and this site's kit runs app API 2`;
|
|
106
|
-
}
|
|
107
|
-
function v() {
|
|
108
|
-
let r = "";
|
|
109
|
-
return {
|
|
110
|
-
name: "vintage-frames:app-files",
|
|
111
|
-
enforce: "pre",
|
|
112
|
-
configResolved(e) {
|
|
113
|
-
r = e.root;
|
|
114
|
-
},
|
|
115
|
-
async load(i) {
|
|
116
|
-
let a = i.indexOf("?");
|
|
117
|
-
if (a < 0) return null;
|
|
118
|
-
let o = i.slice(0, a), c = new URLSearchParams(i.slice(a + 1));
|
|
119
|
-
if (!o.endsWith(".png") || !(c.has("app") || c.has(p))) return null;
|
|
120
|
-
this.addWatchFile(o);
|
|
121
|
-
let l = u(r, o), d = await n(new Uint8Array(await s(o)));
|
|
122
|
-
typeof d == "string" && this.error(`${l} is not an app file: ${d}.`);
|
|
123
|
-
let { manifest: f, code: m } = d;
|
|
124
|
-
return c.has(p) ? m : (t(f) || this.error(`${l}: ${f.name} ${f.version} ${_(f)}. Build ${f.name} on ${e} and copy its app file in.`), [
|
|
125
|
-
`import factory from ${JSON.stringify(`${o}?${p}`)}`,
|
|
126
|
-
`export const manifest = ${JSON.stringify(f)}`,
|
|
127
|
-
"export default (...args) => ({ ...factory(...args), icon: manifest.icon })",
|
|
128
|
-
""
|
|
129
|
-
].join("\n"));
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
//#endregion
|
|
134
|
-
export { g as appFile, v as appFiles };
|
package/dist/build/png.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PNG pixels, with no canvas and no dependency: a decoder for the forms art
|
|
3
|
-
* comes in, and an encoder for the box.
|
|
4
|
-
*
|
|
5
|
-
* - Decoding takes 8-bit gray, RGB, gray with alpha and RGBA, and indexed
|
|
6
|
-
* or gray at 1, 2, 4 or 8 bits, non-interlaced, with their transparency.
|
|
7
|
-
* 16-bit and interlaced files are refused, naming what to save them as.
|
|
8
|
-
* - Encoding writes 8-bit RGBA, each row filtered the way that compresses
|
|
9
|
-
* it best.
|
|
10
|
-
*/
|
|
11
|
-
/** Straight RGBA, 8 bits a channel, rows top first. */
|
|
12
|
-
export interface Pixels {
|
|
13
|
-
width: number;
|
|
14
|
-
height: number;
|
|
15
|
-
data: Uint8Array;
|
|
16
|
-
}
|
|
17
|
-
/** `parts`, end to end. */
|
|
18
|
-
export declare function concat(parts: readonly Uint8Array[]): Uint8Array;
|
|
19
|
-
/** One chunk, with its length and CRC. */
|
|
20
|
-
export declare function pngChunk(type: string, data: Uint8Array): Uint8Array;
|
|
21
|
-
/** A PNG's pixels. `what` names it in an error: "the artwork". */
|
|
22
|
-
export declare function decodePng(bytes: Uint8Array, what?: string): Promise<Pixels>;
|
|
23
|
-
/** Pixels as an 8-bit RGBA PNG. */
|
|
24
|
-
export declare function encodePng({ width, height, data }: Pixels): Promise<Uint8Array>;
|
package/dist/build/png.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { PNG_SIGNATURE as e, crc32 as t, deflate as n, inflate as r, pngChunks as i } from "../shell/app-file.js";
|
|
2
|
-
//#region src/build/png.ts
|
|
3
|
-
var a = {
|
|
4
|
-
0: 1,
|
|
5
|
-
2: 3,
|
|
6
|
-
3: 1,
|
|
7
|
-
4: 2,
|
|
8
|
-
6: 4
|
|
9
|
-
};
|
|
10
|
-
function o(e) {
|
|
11
|
-
let t = new Uint8Array(e.reduce((e, t) => e + t.length, 0)), n = 0;
|
|
12
|
-
for (let r of e) t.set(r, n), n += r.length;
|
|
13
|
-
return t;
|
|
14
|
-
}
|
|
15
|
-
function s(e, n) {
|
|
16
|
-
let r = new Uint8Array(12 + n.length), i = new DataView(r.buffer);
|
|
17
|
-
i.setUint32(0, n.length);
|
|
18
|
-
for (let t = 0; t < 4; t++) r[4 + t] = e.charCodeAt(t);
|
|
19
|
-
return r.set(n, 8), i.setUint32(8 + n.length, t(r.subarray(4, 8 + n.length))), r;
|
|
20
|
-
}
|
|
21
|
-
async function c(e, t = "the PNG") {
|
|
22
|
-
let n = i(e), s = n?.[0];
|
|
23
|
-
if (!n || s?.type !== "IHDR" || s.data.length !== 13) throw Error(`${t} is not a whole PNG`);
|
|
24
|
-
let c = new DataView(s.data.buffer, s.data.byteOffset, 13), l = c.getUint32(0), u = c.getUint32(4), [f, p, m, h, g] = s.data.subarray(8);
|
|
25
|
-
if (f === 16) throw Error(`${t} is a 16-bit PNG: save it as an 8-bit PNG`);
|
|
26
|
-
if (g) throw Error(`${t} is interlaced: save it as a non-interlaced PNG`);
|
|
27
|
-
let _ = a[p], v = p === 0 || p === 3 ? [
|
|
28
|
-
1,
|
|
29
|
-
2,
|
|
30
|
-
4,
|
|
31
|
-
8
|
|
32
|
-
].includes(f) : f === 8;
|
|
33
|
-
if (!_ || !v || m || h) throw Error(`${t} is a kind of PNG this kit doesn't read (color type ${p}, ${f} bits): save it as an 8-bit PNG`);
|
|
34
|
-
let y = null, b = null, x = [];
|
|
35
|
-
for (let { type: e, data: t } of n) e === "PLTE" ? y = t : e === "tRNS" ? b = t : e === "IDAT" && x.push(t);
|
|
36
|
-
if (p === 3 && !y) throw Error(`${t} is indexed and has no palette`);
|
|
37
|
-
let S = _ * f, C = Math.ceil(l * S / 8), w = await r(o(x)).catch(() => {
|
|
38
|
-
throw Error(`${t} is not a whole PNG`);
|
|
39
|
-
});
|
|
40
|
-
if (w.length < u * (C + 1)) throw Error(`${t} is not a whole PNG`);
|
|
41
|
-
let T = d(w, u, C, Math.max(1, S >> 3), t), E = (1 << f) - 1, D = (e, t) => {
|
|
42
|
-
let n = t * f;
|
|
43
|
-
return T[e + (n >> 3)] >> 8 - f - (n & 7) & E;
|
|
44
|
-
}, O = (e) => b && b.length >= e * 2 + 2 ? b[e * 2] << 8 | b[e * 2 + 1] : -1, k = new Uint8Array(l * u * 4);
|
|
45
|
-
for (let e = 0; e < u; e++) {
|
|
46
|
-
let n = e * C;
|
|
47
|
-
for (let r = 0; r < l; r++) {
|
|
48
|
-
let i = (e * l + r) * 4;
|
|
49
|
-
if (p === 0) {
|
|
50
|
-
let e = f === 8 ? T[n + r] : D(n, r);
|
|
51
|
-
k[i] = k[i + 1] = k[i + 2] = Math.round(e * 255 / E), k[i + 3] = e === O(0) ? 0 : 255;
|
|
52
|
-
} else if (p === 3) {
|
|
53
|
-
let e = f === 8 ? T[n + r] : D(n, r);
|
|
54
|
-
if (e * 3 + 2 >= y.length) throw Error(`${t} uses a color its palette lacks`);
|
|
55
|
-
k[i] = y[e * 3], k[i + 1] = y[e * 3 + 1], k[i + 2] = y[e * 3 + 2], k[i + 3] = b?.[e] ?? 255;
|
|
56
|
-
} else if (p === 2) {
|
|
57
|
-
let e = n + r * 3;
|
|
58
|
-
k.set(T.subarray(e, e + 3), i);
|
|
59
|
-
let t = T[e] !== O(0) || T[e + 1] !== O(1) || T[e + 2] !== O(2);
|
|
60
|
-
k[i + 3] = t ? 255 : 0;
|
|
61
|
-
} else if (p === 4) {
|
|
62
|
-
let e = n + r * 2;
|
|
63
|
-
k[i] = k[i + 1] = k[i + 2] = T[e], k[i + 3] = T[e + 1];
|
|
64
|
-
} else k.set(T.subarray(n + r * 4, n + r * 4 + 4), i);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
width: l,
|
|
69
|
-
height: u,
|
|
70
|
-
data: k
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function l(e, t, n) {
|
|
74
|
-
let r = e + t - n, i = Math.abs(r - e), a = Math.abs(r - t), o = Math.abs(r - n);
|
|
75
|
-
return i <= a && i <= o ? e : a <= o ? t : n;
|
|
76
|
-
}
|
|
77
|
-
function u(e, t, n, r) {
|
|
78
|
-
return e === 1 ? t : e === 2 ? n : e === 3 ? t + n >> 1 : e === 4 ? l(t, n, r) : 0;
|
|
79
|
-
}
|
|
80
|
-
function d(e, t, n, r, i) {
|
|
81
|
-
let a = new Uint8Array(t * n);
|
|
82
|
-
for (let o = 0; o < t; o++) {
|
|
83
|
-
let t = e[o * (n + 1)];
|
|
84
|
-
if (t > 4) throw Error(`${i} is not a whole PNG`);
|
|
85
|
-
let s = o * (n + 1) + 1, c = o * n;
|
|
86
|
-
for (let i = 0; i < n; i++) {
|
|
87
|
-
let l = i >= r ? a[c + i - r] : 0, d = o ? a[c - n + i] : 0, f = i >= r && o ? a[c - n + i - r] : 0;
|
|
88
|
-
a[c + i] = e[s + i] + u(t, l, d, f) & 255;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return a;
|
|
92
|
-
}
|
|
93
|
-
async function f({ width: t, height: r, data: i }) {
|
|
94
|
-
let a = t * 4, c = new Uint8Array(r * (a + 1)), l = Array.from({ length: 5 }, () => new Uint8Array(a));
|
|
95
|
-
for (let e = 0; e < r; e++) {
|
|
96
|
-
let t = e * a, n = 0, r = Infinity;
|
|
97
|
-
for (let o = 0; o < 5; o++) {
|
|
98
|
-
let s = l[o], c = 0;
|
|
99
|
-
for (let n = 0; n < a; n++) {
|
|
100
|
-
let r = n >= 4 ? i[t + n - 4] : 0, l = e ? i[t - a + n] : 0, d = n >= 4 && e ? i[t - a + n - 4] : 0, f = i[t + n] - u(o, r, l, d) & 255;
|
|
101
|
-
s[n] = f, c += f < 128 ? f : 256 - f;
|
|
102
|
-
}
|
|
103
|
-
c < r && (r = c, n = o);
|
|
104
|
-
}
|
|
105
|
-
c[e * (a + 1)] = n, c.set(l[n], e * (a + 1) + 1);
|
|
106
|
-
}
|
|
107
|
-
let d = /* @__PURE__ */ new Uint8Array(13), f = new DataView(d.buffer);
|
|
108
|
-
return f.setUint32(0, t), f.setUint32(4, r), d[8] = 8, d[9] = 6, o([
|
|
109
|
-
e,
|
|
110
|
-
s("IHDR", d),
|
|
111
|
-
s("IDAT", await n(c)),
|
|
112
|
-
s("IEND", /* @__PURE__ */ new Uint8Array())
|
|
113
|
-
]);
|
|
114
|
-
}
|
|
115
|
-
//#endregion
|
|
116
|
-
export { o as concat, c as decodePng, f as encodePng, s as pngChunk };
|
package/dist/shell/alert.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Finder's alert: a plain-framed `vf-dialog` with the site's caution art,
|
|
3
|
-
* a message and a row of buttons, sized to the message — composed from kit
|
|
4
|
-
* elements, as every alert in the kit is. Its buttons submit a
|
|
5
|
-
* `<form method="dialog">`, so it answers with the pressed button's `value`
|
|
6
|
-
* like any dialog an application holds.
|
|
7
|
-
*
|
|
8
|
-
* The layout follows the plain frame's body, its width and height less 10:
|
|
9
|
-
* the art and the message 16 in from the body's top-left, the buttons'
|
|
10
|
-
* bottom-right corner 16 in from the body's.
|
|
11
|
-
*/
|
|
12
|
-
import type { VfDialog } from '../index.js';
|
|
13
|
-
/** One button of an alert. */
|
|
14
|
-
export interface AlertButton {
|
|
15
|
-
label: string;
|
|
16
|
-
/** What the alert answers when it is pressed. */
|
|
17
|
-
value: string;
|
|
18
|
-
/** The default button, which Return presses. */
|
|
19
|
-
default?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface AlertOptions {
|
|
22
|
-
/** Default: OK, the default button. */
|
|
23
|
-
buttons?: AlertButton[];
|
|
24
|
-
/** The dialog's width, system px. Default 400. */
|
|
25
|
-
width?: number;
|
|
26
|
-
/** The 32×32 art beside the message, or null for none. */
|
|
27
|
-
art?: string | null;
|
|
28
|
-
/** The dialog's accessible name. Default "Alert". */
|
|
29
|
-
label?: string;
|
|
30
|
-
}
|
|
31
|
-
/** An alert, made but not yet shown. */
|
|
32
|
-
export interface ComposedAlert {
|
|
33
|
-
dialog: VfDialog;
|
|
34
|
-
/** Resolves once its parts have rendered, so `show()` opens it at once. Call it once the dialog is in the page. */
|
|
35
|
-
rendered(): Promise<unknown>;
|
|
36
|
-
/** Size the box to the message. Call it right after `show()`: a closed dialog lays out nothing. */
|
|
37
|
-
fit(): void;
|
|
38
|
-
}
|
|
39
|
-
/** Make an alert for `message`. */
|
|
40
|
-
export declare function composeAlert(message: string, options?: AlertOptions): ComposedAlert;
|
package/dist/shell/alert.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { effectiveScale as e } from "../scale.js";
|
|
2
|
-
import "../index.js";
|
|
3
|
-
//#region src/shell/alert.ts
|
|
4
|
-
var t = 10, n = 16, r = 32, i = 28;
|
|
5
|
-
function a(a, o = {}) {
|
|
6
|
-
let { buttons: s = [{
|
|
7
|
-
label: "OK",
|
|
8
|
-
value: "ok",
|
|
9
|
-
default: !0
|
|
10
|
-
}], width: c = 400, art: l = null, label: u = "Alert" } = o, d = document.createElement("vf-dialog");
|
|
11
|
-
d.frame = "plain", d.label = u, d.width = c, d.height = 120;
|
|
12
|
-
let f = document.createElement("form");
|
|
13
|
-
f.method = "dialog", f.noValidate = !0;
|
|
14
|
-
let p = l ? 64 : n;
|
|
15
|
-
if (l) {
|
|
16
|
-
let e = document.createElement("vf-img");
|
|
17
|
-
e.width = r, e.height = r, e.left = n, e.top = n;
|
|
18
|
-
let t = document.createElement("img");
|
|
19
|
-
t.src = l, t.alt = "", e.append(t), f.append(e);
|
|
20
|
-
}
|
|
21
|
-
let m = document.createElement("vf-paragraph");
|
|
22
|
-
m.face = "display", m.width = c - t - p - n, m.left = p, m.top = n, m.textContent = a, f.append(m);
|
|
23
|
-
let h = document.createElement("vf-button-group");
|
|
24
|
-
return h.origin = "bottom right", h.append(...s.map((e) => {
|
|
25
|
-
let t = document.createElement("vf-button");
|
|
26
|
-
return t.textContent = e.label, t.type = "submit", t.value = e.value, e.default && (t.variant = "default"), t;
|
|
27
|
-
})), f.append(h), d.append(f), {
|
|
28
|
-
dialog: d,
|
|
29
|
-
rendered: () => Promise.all([
|
|
30
|
-
d.updateComplete,
|
|
31
|
-
m.updateComplete,
|
|
32
|
-
h.updateComplete
|
|
33
|
-
]),
|
|
34
|
-
fit() {
|
|
35
|
-
let r = Math.ceil(m.getBoundingClientRect().height / e(m)), a = Math.max(l ? 48 : 0, n + r) + n + i + n;
|
|
36
|
-
d.height = a + t, h.left = c - t - n, h.top = a - n;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
export { a as composeAlert };
|
package/dist/shell/app-file.d.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* App files: an application on the shell as one PNG. The picture is the
|
|
3
|
-
* application's box; two iTXt chunks before IEND carry its manifest, as
|
|
4
|
-
* JSON, and its code, one ES module compressed with zlib. Any PNG tool reads
|
|
5
|
-
* the chunks and any decoder skips them.
|
|
6
|
-
*
|
|
7
|
-
* This is the reading half: the reader, checking a version against a range,
|
|
8
|
-
* putting versions in order, the app API levels and whether this kit runs an
|
|
9
|
-
* application, and the scale every box is drawn at. It is pure and runs the
|
|
10
|
-
* same under Node and in a page, through the platform's compression streams.
|
|
11
|
-
* Writing an app file, and the box, are `vintage-frames/build`'s.
|
|
12
|
-
*/
|
|
13
|
-
/** The app file format this kit reads and writes. */
|
|
14
|
-
export declare const APP_FILE_FORMAT = 1;
|
|
15
|
-
/**
|
|
16
|
-
* The app API this kit provides: the level of what a built application can
|
|
17
|
-
* use of it. It goes up when something in it changes or goes away, and never
|
|
18
|
-
* for an addition. app-api.json lists what it covers.
|
|
19
|
-
*/
|
|
20
|
-
export declare const APP_API = 2;
|
|
21
|
-
/** The oldest app API this kit still runs. */
|
|
22
|
-
export declare const APP_API_OLDEST = 2;
|
|
23
|
-
/**
|
|
24
|
-
* One system px of an app file's box, in its picture's px: every box of
|
|
25
|
-
* this format is drawn at 3×, each system px a 3 × 3 block.
|
|
26
|
-
*/
|
|
27
|
-
export declare const BOX_SCALE = 3;
|
|
28
|
-
/** The iTXt keywords of the manifest's chunk and the code's. */
|
|
29
|
-
export declare const MANIFEST_KEYWORD = "vintage-frames.app";
|
|
30
|
-
export declare const CODE_KEYWORD = "vintage-frames.code";
|
|
31
|
-
/** What an app file says about its application. */
|
|
32
|
-
export interface AppManifest {
|
|
33
|
-
/** The app file's own format, {@link APP_FILE_FORMAT}. */
|
|
34
|
-
format: number;
|
|
35
|
-
id: string;
|
|
36
|
-
name: string;
|
|
37
|
-
version: string;
|
|
38
|
-
/** The kit range the code was built and checked against: `^0.17.0`. */
|
|
39
|
-
requires: string;
|
|
40
|
-
/** The app API the code was built against, {@link APP_API}. A file from before levels has none. */
|
|
41
|
-
api?: number;
|
|
42
|
-
author: string;
|
|
43
|
-
/** What the application is, in a sentence or two of plain text. */
|
|
44
|
-
description?: string;
|
|
45
|
-
/** Its 32 × 32 icon: its PNG as a `data:` URL. */
|
|
46
|
-
icon: string;
|
|
47
|
-
}
|
|
48
|
-
/** An application, read from its app file. */
|
|
49
|
-
export interface AppFile {
|
|
50
|
-
manifest: AppManifest;
|
|
51
|
-
/** One ES module. Its default export is the application's factory. */
|
|
52
|
-
code: string;
|
|
53
|
-
}
|
|
54
|
-
/** The eight bytes every PNG starts with. */
|
|
55
|
-
export declare const PNG_SIGNATURE: Uint8Array<ArrayBuffer>;
|
|
56
|
-
/** The CRC-32 a PNG chunk ends with, over its type and data. */
|
|
57
|
-
export declare function crc32(bytes: Uint8Array): number;
|
|
58
|
-
/** One chunk of a PNG. */
|
|
59
|
-
export interface PngChunk {
|
|
60
|
-
type: string;
|
|
61
|
-
data: Uint8Array;
|
|
62
|
-
/** Where it sits in the file: its length's first byte, and the byte after its CRC. */
|
|
63
|
-
start: number;
|
|
64
|
-
end: number;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* A PNG's chunks, IEND last, or null when it isn't a whole PNG: the
|
|
68
|
-
* signature is wrong, a chunk runs past the end, a CRC doesn't match, or
|
|
69
|
-
* there is no IEND. Anything after IEND is left out.
|
|
70
|
-
*/
|
|
71
|
-
export declare function pngChunks(bytes: Uint8Array): PngChunk[] | null;
|
|
72
|
-
/** An iTXt chunk's keyword. */
|
|
73
|
-
export declare function itxtKeyword(data: Uint8Array): string;
|
|
74
|
-
/** zlib data, inflated. */
|
|
75
|
-
export declare function inflate(bytes: Uint8Array): Promise<Uint8Array>;
|
|
76
|
-
/** zlib data, deflated. */
|
|
77
|
-
export declare function deflate(bytes: Uint8Array): Promise<Uint8Array>;
|
|
78
|
-
/** A parsed manifest as one this kit reads, or what is wrong with it. */
|
|
79
|
-
export declare function manifestOf(json: unknown): AppManifest | string;
|
|
80
|
-
/**
|
|
81
|
-
* The manifest and code an app file carries, or why it isn't one: not a
|
|
82
|
-
* whole PNG, a chunk missing or doubled, a format this kit doesn't read, a
|
|
83
|
-
* field missing or unreadable, or code that doesn't inflate. The reason ends
|
|
84
|
-
* a sentence such as "Meteors.png is not an app file: …", and is for people:
|
|
85
|
-
* its wording can change in any release, so match on nothing in it.
|
|
86
|
-
*/
|
|
87
|
-
export declare function inspectAppFile(bytes: Uint8Array): Promise<AppFile | string>;
|
|
88
|
-
/** The manifest and code an app file carries, or null for any other PNG. */
|
|
89
|
-
export declare function readAppFile(bytes: Uint8Array): Promise<AppFile | null>;
|
|
90
|
-
/**
|
|
91
|
-
* Whether `text` is a version exactly as semver writes one: `0.1.0`,
|
|
92
|
-
* `1.0.0-rc.1`, but not `v0.1.0`, ` 0.1.0` or `01.2.3`.
|
|
93
|
-
*/
|
|
94
|
-
export declare function isVersion(text: string): boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Below zero, zero or above as version `a` comes before, with or after `b`,
|
|
97
|
-
* in semver's order: a release after its prereleases, build metadata
|
|
98
|
-
* ignored. Anything that isn't a version, a string or not, comes before
|
|
99
|
-
* every version, so a sort never throws.
|
|
100
|
-
*/
|
|
101
|
-
export declare function compareVersions(a: string, b: string): number;
|
|
102
|
-
/**
|
|
103
|
-
* Whether `version` meets `range`: an exact version, or a caret range as
|
|
104
|
-
* npm reads it. `^1.2.3` takes 1.x from 1.2.3 on, `^0.2.3` takes 0.2.x from
|
|
105
|
-
* 0.2.3 on, and `^0.0.3` takes 0.0.3 alone. A prerelease meets a range only
|
|
106
|
-
* when the range names a prerelease of the same version. Anything else is
|
|
107
|
-
* false.
|
|
108
|
-
*/
|
|
109
|
-
export declare function satisfies(version: string, range: string): boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Whether this kit runs the application a manifest describes: one built at
|
|
112
|
-
* an app API from {@link APP_API_OLDEST} to {@link APP_API}, or, for a file
|
|
113
|
-
* from before levels, one whose `requires` this kit's version meets.
|
|
114
|
-
*/
|
|
115
|
-
export declare function appRuns(manifest: Pick<AppManifest, 'requires' | 'api'>): boolean;
|