@vinena/knobs 0.5.1 → 0.5.3
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/CHANGELOG.md +29 -0
- package/README.md +7 -0
- package/dist/early.global.js +6 -6
- package/dist/{elementsview-tf4qzmtw.js → elementsview-1wsxcdtj.js} +4 -4
- package/dist/{elementsview-jnkbhzkj.js → elementsview-3kv34jfx.js} +4 -4
- package/dist/engine/browserdraw.d.ts +29 -2
- package/dist/engine/browserkit.d.ts +20 -1
- package/dist/engine/browserui.d.ts +162 -22
- package/dist/engine/devices.d.ts +3 -2
- package/dist/engine/devicon.d.ts +59 -0
- package/dist/engine/fit.d.ts +4 -3
- package/dist/engine/foldflip.d.ts +40 -0
- package/dist/engine/frames.d.ts +1 -0
- package/dist/engine/identity.d.ts +12 -5
- package/dist/engine/index.d.ts +2 -0
- package/dist/engine/mock.d.ts +14 -0
- package/dist/engine/mockdata.d.ts +5 -1
- package/dist/engine/morphrun.d.ts +4 -0
- package/dist/engine/native.d.ts +31 -3
- package/dist/engine/notice.d.ts +1 -2
- package/dist/engine/pageshot.d.ts +5 -2
- package/dist/engine/safaridraw.d.ts +162 -10
- package/dist/engine/screen.d.ts +24 -0
- package/dist/engine/store.d.ts +2 -1
- package/dist/engine/tabicon.d.ts +43 -0
- package/dist/engine/toplayer.d.ts +62 -0
- package/dist/engine/touchpointer.d.ts +0 -21
- package/dist/engine/underbar.d.ts +61 -0
- package/dist/engine/width.d.ts +3 -0
- package/dist/{framekit-3n7p79ht.js → framekit-cjz0e4y8.js} +2492 -1587
- package/dist/{framekit-g96t6nmq.js → framekit-yk1jxjv7.js} +2492 -1587
- package/dist/host.d.ts +51 -0
- package/dist/{index-33x9hxe3.js → index-6wbgqkdz.js} +626 -189
- package/dist/{index-2d6wvs8h.js → index-9jhatmky.js} +4 -4
- package/dist/{index-zvze25nf.js → index-begsqdm0.js} +1 -1
- package/dist/{index-peh33xjv.js → index-j1h13ahg.js} +1 -1
- package/dist/{index-5baxvd3v.js → index-p57fdttx.js} +307 -129
- package/dist/{index-dvr4x91q.js → index-prjpx67p.js} +20 -8
- package/dist/{index-d0cjxjsm.js → index-q73py563.js} +1 -1
- package/dist/{index-ke6v7919.js → index-sn2y6j09.js} +20 -8
- package/dist/{index-0casarhy.js → index-vgfn2n1h.js} +1 -1
- package/dist/{index-k015tb6c.js → index-zt3rheck.js} +4 -4
- package/dist/index.d.ts +26 -1
- package/dist/index.global.js +299 -176
- package/dist/index.js +424 -124
- package/dist/instance.d.ts +23 -4
- package/dist/{react-qv0nykcv.js → react-3rhdj2k1.js} +623 -186
- package/dist/{react-carf84xv.js → react-6tss0r9f.js} +307 -129
- package/dist/{react-eygws6cx.js → react-7vjfsh40.js} +4 -4
- package/dist/{react-71a9ypex.js → react-806qmkyz.js} +4 -4
- package/dist/{react-65tgdbs8.js → react-gefkdkdz.js} +1 -1
- package/dist/{react-sq9pkw4k.js → react-mmq2zya3.js} +1 -1
- package/dist/{react-xxfpfddf.js → react-qfpg79hs.js} +1 -1
- package/dist/{react-pdvseef0.js → react-qgz9afa2.js} +1 -1
- package/dist/react.js +420 -123
- package/dist/{storageview-sb23henh.js → storageview-7cv0vpdm.js} +4 -4
- package/dist/{storageview-vf8v8q8j.js → storageview-dyhpgt8f.js} +4 -4
- package/dist/types.d.ts +14 -0
- package/dist/ui/footer.d.ts +9 -2
- package/dist/ui/panel.d.ts +16 -2
- package/dist/ui/settings.d.ts +25 -1
- package/dist/version.d.ts +2 -0
- package/package.json +3 -2
- package/skills/devknobs/SKILL.md +1 -1
- package/dist/engine/endroom.d.ts +0 -21
package/dist/host.d.ts
CHANGED
|
@@ -5,3 +5,54 @@ import type { MountOptions } from "./index";
|
|
|
5
5
|
* Read field by field, as it comes from another copy, maybe of another version.
|
|
6
6
|
*/
|
|
7
7
|
export declare function pageChoices(options: object): MountOptions;
|
|
8
|
+
/** Which copy runs the panel on a page that mounts its own: the extension's, or the page's. */
|
|
9
|
+
export type PreferValue = "extension" | "page";
|
|
10
|
+
/**
|
|
11
|
+
* A host's choice of who runs the panel where the page mounts its own copy,
|
|
12
|
+
* shown in the panel's settings. With `page`, the host steps aside for a page
|
|
13
|
+
* copy that can take the page from it: it takes its panel, frame and patches
|
|
14
|
+
* away and that copy mounts as on a page with no host.
|
|
15
|
+
*/
|
|
16
|
+
export interface PreferSetting {
|
|
17
|
+
/** The choice as the mount begins. `setPrefer` brings a later one. */
|
|
18
|
+
value: PreferValue;
|
|
19
|
+
/** The user picked another in the settings: keep it for the next load. */
|
|
20
|
+
change: (value: PreferValue) => void;
|
|
21
|
+
/** The host let a copy of the page's have the page, and will not take it back. */
|
|
22
|
+
yielded?: () => void;
|
|
23
|
+
/** The choice as it is now, where it can change elsewhere, such as in another tab. */
|
|
24
|
+
now?: () => PreferValue;
|
|
25
|
+
}
|
|
26
|
+
/** What the settings say under the choice. */
|
|
27
|
+
export declare const PREFER_HINT = "page: a site's own knobs, say a local build, runs the panel where the site has one; real browser settings are off then";
|
|
28
|
+
/**
|
|
29
|
+
* A host's preference, as a page copy reads it from the host that handed the
|
|
30
|
+
* page over, field by field: it comes from another copy, maybe of another version.
|
|
31
|
+
*/
|
|
32
|
+
export declare function preferOf(handed: object): PreferSetting | null;
|
|
33
|
+
/**
|
|
34
|
+
* Does a host step aside for a page copy? Only where the user prefers the
|
|
35
|
+
* page's and that copy left a way to take the page: older copies leave none.
|
|
36
|
+
*/
|
|
37
|
+
export declare function stepsAside(prefer: PreferValue | null, take: unknown): boolean;
|
|
38
|
+
/** Does a host take the page back from a copy that took it? Not where the user prefers the page's. */
|
|
39
|
+
export declare function takesBack(prefer: PreferValue | null): boolean;
|
|
40
|
+
/** Which build of a host: the one a store ships, or a local one, such as an unpacked extension. */
|
|
41
|
+
export type HostBuild = "store" | "local";
|
|
42
|
+
/** A host's rank, on the host slot, so that where two hosts meet on a page, one holds it. */
|
|
43
|
+
export interface HostRank {
|
|
44
|
+
build: HostBuild;
|
|
45
|
+
/** Its version as its footer names it, such as `0.5.1` or `0.5.1 · local ios26-preview (9e966ae)`. */
|
|
46
|
+
version: string;
|
|
47
|
+
}
|
|
48
|
+
/** A host's rank as another copy reads it from the host slot, field by field. Null for an older host that leaves none. */
|
|
49
|
+
export declare function rankOf(host: object): HostRank | null;
|
|
50
|
+
/**
|
|
51
|
+
* Does host `a` outrank host `b`, so it holds the page where both meet? A
|
|
52
|
+
* local build outranks a store one, then the newer version, then the version
|
|
53
|
+
* as text, so the answer never depends on which came first. Any host with a
|
|
54
|
+
* rank outranks an older one that leaves none.
|
|
55
|
+
*/
|
|
56
|
+
export declare function outranks(a: HostRank, b: HostRank | null): boolean;
|
|
57
|
+
/** What a host's footer says of a host that stood down for it, such as `store extension stood down`. */
|
|
58
|
+
export declare function stoodDownNote(other: HostRank | null): string;
|