@hackbuild/ai-views 0.1.0 → 0.1.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.
- package/README.md +228 -80
- package/dist/chat.d.ts +18 -2
- package/dist/chat.js +7 -1
- package/dist/elements.d.ts +6 -0
- package/dist/frame.d.ts +2 -0
- package/dist/jobs.d.ts +6 -1
- package/dist/jobs.js +4 -1
- package/dist/memory.d.ts +9 -0
- package/dist/memory.js +3 -0
- package/dist/mount-chat.d.ts +4 -1
- package/dist/mount-chat.js +2 -1
- package/dist/mount-frame.d.ts +13 -1
- package/dist/mount-frame.js +3 -1
- package/dist/mount-mask.d.ts +19 -1
- package/dist/mount-mask.js +5 -1
- package/dist/mount-model.d.ts +1 -0
- package/dist/mount-transcribe.d.ts +11 -2
- package/dist/mount-transcribe.js +2 -2
- package/dist/pick.d.ts +17 -0
- package/dist/pick.js +6 -0
- package/dist/rows.d.ts +6 -0
- package/dist/rows.js +2 -0
- package/dist/single/elements.iife.js +81 -50
- package/dist/single/elements.js +81 -50
- package/dist/single/index.iife.js +74 -45
- package/dist/single/index.js +74 -45
- package/dist/single/vue.iife.js +87 -45
- package/dist/single/vue.js +88 -45
- package/dist/transcribe.d.ts +14 -2
- package/dist/transcribe.js +2 -2
- package/dist/vue.d.ts +22 -0
- package/dist/vue.js +22 -0
- package/llms.md +1133 -0
- package/package.json +12 -11
package/dist/single/vue.iife.js
CHANGED
|
@@ -3874,7 +3874,7 @@ Component that was made reactive: `, type);
|
|
|
3874
3874
|
skipped
|
|
3875
3875
|
};
|
|
3876
3876
|
}
|
|
3877
|
-
/** The onnxruntime-web ladder
|
|
3877
|
+
/** The onnxruntime-web ladder to walk after one fetch: webgpu at basic, all, disabled, then wasm. */
|
|
3878
3878
|
function ortLadder() {
|
|
3879
3879
|
return [
|
|
3880
3880
|
{
|
|
@@ -3908,6 +3908,7 @@ Component that was made reactive: `, type);
|
|
|
3908
3908
|
];
|
|
3909
3909
|
}
|
|
3910
3910
|
// packages/models/src/pins.ts
|
|
3911
|
+
/** Pinned commits and file hashes per Hugging Face repo, written by tools/pin-weights.mjs. */
|
|
3911
3912
|
const PINS = {
|
|
3912
3913
|
"HuggingFaceTB/SmolLM2-135M-Instruct": {
|
|
3913
3914
|
"revision": "12fd25f77366fa6b3b4b768ec3050bf629380bac",
|
|
@@ -6756,6 +6757,7 @@ Component that was made reactive: `, type);
|
|
|
6756
6757
|
* added to a registry, so every loader resolves `resolve/<commit>/` URLs,
|
|
6757
6758
|
* and pinnedSha gives the SHA-256 for such a URL.
|
|
6758
6759
|
*/
|
|
6760
|
+
/** The pin of a repo, or undefined when the repo is not pinned. */
|
|
6759
6761
|
function pinOf(repo) {
|
|
6760
6762
|
return repo && Object.hasOwn(PINS, repo) ? PINS[repo] : void 0;
|
|
6761
6763
|
}
|
|
@@ -6765,15 +6767,15 @@ Component that was made reactive: `, type);
|
|
|
6765
6767
|
}
|
|
6766
6768
|
// packages/models/src/catalog.ts
|
|
6767
6769
|
/**
|
|
6768
|
-
* Starter records. Sizes marked "inferred" come from
|
|
6770
|
+
* Starter records. Sizes marked "inferred" come from published tables or
|
|
6769
6771
|
* from parameter count times bits and are not measured downloads. Chat rows
|
|
6770
6772
|
* marked "measured" sum the Content-Length of a HEAD request on every file
|
|
6771
6773
|
* the runtime loads, at the repo head of 2026-11-24, in MiB; no weight was
|
|
6772
6774
|
* downloaded. WebLLM rows count the Hugging Face repo and leave out the
|
|
6773
6775
|
* model library wasm, which comes from another host. Licences on the older rows are the ones on each model card as
|
|
6774
6776
|
* of 2026-11-22; on the chat rows added 2026-11-24 they are the model card
|
|
6775
|
-
* licence field the Hugging Face API returns, or
|
|
6776
|
-
*
|
|
6777
|
+
* licence field the Hugging Face API returns, or a recorded string, and
|
|
6778
|
+
* were not checked (owner decision). Recheck before shipping a
|
|
6777
6779
|
* product on them. Add your own records with registry.add().
|
|
6778
6780
|
*
|
|
6779
6781
|
* vramMB marked "computed" on the 14 WebLLM rows added 2026-11-25 is the
|
|
@@ -6782,13 +6784,13 @@ Component that was made reactive: `, type);
|
|
|
6782
6784
|
* Rows with sizeSource "vendor" added 2026-11-25 sum the file sizes of the
|
|
6783
6785
|
* Hugging Face listing of the repo (no download), converted to MiB.
|
|
6784
6786
|
* Every row carries a speed word and a verdict of one to four words: what
|
|
6785
|
-
* a person picks by, in the owner's voice
|
|
6787
|
+
* a person picks by, in the owner's voice.
|
|
6786
6788
|
*
|
|
6787
6789
|
* Catalogue facts (params, quant, VRAM, censorship, tags, note) are copied
|
|
6788
|
-
* from the
|
|
6789
|
-
* design harvest; VRAM figures are the catalogue's own (vendor). Licence
|
|
6790
|
+
* from the owner's model labels and the WebLLM catalogue; VRAM figures are the catalogue's own (vendor). Licence
|
|
6790
6791
|
* strings are shown as recorded and were not verified for these facts.
|
|
6791
6792
|
*/
|
|
6793
|
+
/** The starter model records, each with its size source and weight licence. */
|
|
6792
6794
|
const CATALOG = [
|
|
6793
6795
|
{
|
|
6794
6796
|
id: "smollm2-135m-instruct",
|
|
@@ -7344,7 +7346,7 @@ Component that was made reactive: `, type);
|
|
|
7344
7346
|
tier: "large",
|
|
7345
7347
|
family: "gemma",
|
|
7346
7348
|
tags: [],
|
|
7347
|
-
note: "an uncensored gemma 4 brain.
|
|
7349
|
+
note: "an uncensored gemma 4 brain. it warns with no webgpu.",
|
|
7348
7350
|
group: "uncensored",
|
|
7349
7351
|
badge: "best",
|
|
7350
7352
|
speed: "slow",
|
|
@@ -7378,7 +7380,7 @@ Component that was made reactive: `, type);
|
|
|
7378
7380
|
tier: "medium",
|
|
7379
7381
|
family: "gemma",
|
|
7380
7382
|
tags: [],
|
|
7381
|
-
note: "lighter gemma 4.
|
|
7383
|
+
note: "lighter gemma 4. a chat default with webgpu.",
|
|
7382
7384
|
group: "uncensored",
|
|
7383
7385
|
badge: "lighter",
|
|
7384
7386
|
speed: "steady",
|
|
@@ -7554,7 +7556,7 @@ Component that was made reactive: `, type);
|
|
|
7554
7556
|
tier: "small",
|
|
7555
7557
|
family: "qwen3.5",
|
|
7556
7558
|
tags: ["no gpu"],
|
|
7557
|
-
note: "
|
|
7559
|
+
note: "a chat default with no webgpu. thin for long chats.",
|
|
7558
7560
|
group: "uncensored",
|
|
7559
7561
|
badge: "faster",
|
|
7560
7562
|
speed: "fast",
|
|
@@ -7686,7 +7688,7 @@ Component that was made reactive: `, type);
|
|
|
7686
7688
|
tier: "small",
|
|
7687
7689
|
family: "qwen3",
|
|
7688
7690
|
tags: ["think"],
|
|
7689
|
-
note: "a small qwen3 with a think trace.
|
|
7691
|
+
note: "a small qwen3 with a think trace. fits a deliberator role.",
|
|
7690
7692
|
group: "reasoning",
|
|
7691
7693
|
badge: "think, easier on memory",
|
|
7692
7694
|
speed: "fast",
|
|
@@ -8356,25 +8358,25 @@ Component that was made reactive: `, type);
|
|
|
8356
8358
|
}
|
|
8357
8359
|
return spec.wasmFirst ? [...cpu, ...gpu] : [...gpu, ...cpu];
|
|
8358
8360
|
}
|
|
8359
|
-
/** onnxruntime-web rungs:
|
|
8361
|
+
/** onnxruntime-web rungs: webgpu then wasm, or wasm only when the graph is known to fail on webgpu. */
|
|
8360
8362
|
function ortRungs(opts = {}) {
|
|
8361
8363
|
const all = ortLadder();
|
|
8362
8364
|
return opts.webgpu === false ? all.filter((r) => r.device === "wasm") : all;
|
|
8363
8365
|
}
|
|
8364
|
-
/** Ladders by name,
|
|
8366
|
+
/** Ladders by name, one per model family. Each model record may copy one or write its own. */
|
|
8365
8367
|
const LADDERS = {
|
|
8366
|
-
/**
|
|
8368
|
+
/** Depth: fp16 then fp32 on webgpu, q8 then fp32 on wasm. */
|
|
8367
8369
|
depth: () => tjsLadder({
|
|
8368
8370
|
webgpu: ["fp16", "fp32"],
|
|
8369
8371
|
wasm: ["q8", "fp32"]
|
|
8370
8372
|
}),
|
|
8371
|
-
/**
|
|
8373
|
+
/** Perception models on cpu by default. */
|
|
8372
8374
|
perceptionCpu: () => tjsLadder({
|
|
8373
8375
|
webgpu: ["fp32"],
|
|
8374
8376
|
wasm: ["q8", "fp32"],
|
|
8375
8377
|
wasmFirst: true
|
|
8376
8378
|
}),
|
|
8377
|
-
/** whisper-large-v3-turbo (weights MIT)
|
|
8379
|
+
/** whisper-large-v3-turbo (weights MIT). */
|
|
8378
8380
|
whisperTurbo: () => tjsLadder({
|
|
8379
8381
|
webgpu: [{
|
|
8380
8382
|
encoder_model: "fp16",
|
|
@@ -8399,7 +8401,7 @@ Component that was made reactive: `, type);
|
|
|
8399
8401
|
decoder_model_merged: "q8"
|
|
8400
8402
|
}]
|
|
8401
8403
|
}),
|
|
8402
|
-
/** SmolVLM (weights Apache-2.0): fp16 embed and vision, q4 decoder on webgpu; q8 vision on wasm
|
|
8404
|
+
/** SmolVLM (weights Apache-2.0): fp16 embed and vision, q4 decoder on webgpu; q8 vision on wasm. */
|
|
8403
8405
|
smolvlm: () => tjsLadder({
|
|
8404
8406
|
webgpu: [{
|
|
8405
8407
|
embed_tokens: "fp32",
|
|
@@ -8417,7 +8419,7 @@ Component that was made reactive: `, type);
|
|
|
8417
8419
|
}],
|
|
8418
8420
|
freshHeapRetry: true
|
|
8419
8421
|
}),
|
|
8420
|
-
/**
|
|
8422
|
+
/** q4f16 on webgpu only. */
|
|
8421
8423
|
vlmGpuOnly: () => tjsLadder({ webgpu: ["q4f16", "q4"] }),
|
|
8422
8424
|
ort: ortRungs
|
|
8423
8425
|
};
|
|
@@ -8426,6 +8428,7 @@ Component that was made reactive: `, type);
|
|
|
8426
8428
|
* Embedder records for the models hub. Sizes are inferred from the model
|
|
8427
8429
|
* repos' file lists; licences are the model cards' as of 2026-11-22.
|
|
8428
8430
|
*/
|
|
8431
|
+
/** Hub records for potion-base-8M, all-MiniLM-L6-v2 and bge-small-en-v1.5. */
|
|
8429
8432
|
const EMBED_RECORDS = [
|
|
8430
8433
|
{
|
|
8431
8434
|
id: "potion-base-8m",
|
|
@@ -8445,7 +8448,7 @@ Component that was made reactive: `, type);
|
|
|
8445
8448
|
licence: "MIT",
|
|
8446
8449
|
commercial: true,
|
|
8447
8450
|
place: "main",
|
|
8448
|
-
notes: ["256 dims, no runtime, about 0.08 ms per sentence
|
|
8451
|
+
notes: ["256 dims, no runtime, about 0.08 ms per sentence (measured outside this repository)", "misses paraphrase"]
|
|
8449
8452
|
},
|
|
8450
8453
|
{
|
|
8451
8454
|
id: "minilm-l6",
|
|
@@ -8467,7 +8470,7 @@ Component that was made reactive: `, type);
|
|
|
8467
8470
|
commercial: true,
|
|
8468
8471
|
place: "cpu-worker",
|
|
8469
8472
|
runtime: "@huggingface/transformers@4.3.2",
|
|
8470
|
-
notes: ["384 dims; webgpu with q8 garbled other models
|
|
8473
|
+
notes: ["384 dims; webgpu with q8 garbled other models, so q8 stays on wasm"]
|
|
8471
8474
|
},
|
|
8472
8475
|
{
|
|
8473
8476
|
id: "bge-small-en",
|
|
@@ -8513,6 +8516,7 @@ Component that was made reactive: `, type);
|
|
|
8513
8516
|
height_latent: 64,
|
|
8514
8517
|
width_latent: 64
|
|
8515
8518
|
} };
|
|
8519
|
+
/** The image models {@link attachImagegen} registers: SD-Turbo and SD 1.5, each with its licence, size and form. */
|
|
8516
8520
|
const IMAGEGEN_RECORDS = [{
|
|
8517
8521
|
id: "sd-turbo",
|
|
8518
8522
|
label: "sd-turbo 512",
|
|
@@ -8537,9 +8541,9 @@ Component that was made reactive: `, type);
|
|
|
8537
8541
|
place: "gpu",
|
|
8538
8542
|
runtime: "onnxruntime-web@1.27.0",
|
|
8539
8543
|
notes: [
|
|
8540
|
-
"webgpu only
|
|
8544
|
+
"webgpu only, no wasm floor",
|
|
8541
8545
|
"tokenizer: Xenova/clip-vit-base-patch16 through transformers.js (CLIP weights MIT)",
|
|
8542
|
-
"graph file paths inferred
|
|
8546
|
+
"graph file paths inferred, not checked against the repo"
|
|
8543
8547
|
],
|
|
8544
8548
|
form: {
|
|
8545
8549
|
steps: {
|
|
@@ -8579,7 +8583,7 @@ Component that was made reactive: `, type);
|
|
|
8579
8583
|
place: "gpu",
|
|
8580
8584
|
runtime: "onnxruntime-web@1.27.0",
|
|
8581
8585
|
notes: [
|
|
8582
|
-
"about 2 GB
|
|
8586
|
+
"about 2 GB (vendor); the repo, its file paths and its input dtypes are inferred and not checked",
|
|
8583
8587
|
"runs the unet twice a step for guidance, so a step costs about twice an sd-turbo step (inferred)",
|
|
8584
8588
|
"tokenizer: Xenova/clip-vit-base-patch16 through transformers.js (CLIP weights MIT)"
|
|
8585
8589
|
],
|
|
@@ -8636,7 +8640,7 @@ Component that was made reactive: `, type);
|
|
|
8636
8640
|
commercial: "unknown",
|
|
8637
8641
|
place: "gpu",
|
|
8638
8642
|
runtime: "onnxruntime-web@1.27.0",
|
|
8639
|
-
notes: ["two text encoders; the pipeline in this package runs one, so this record is listed and not run yet", "
|
|
8643
|
+
notes: ["two text encoders; the pipeline in this package runs one, so this record is listed and not run yet", "the highest quality of the three image models"],
|
|
8640
8644
|
form: {
|
|
8641
8645
|
steps: {
|
|
8642
8646
|
min: 1,
|
|
@@ -8653,6 +8657,7 @@ Component that was made reactive: `, type);
|
|
|
8653
8657
|
}
|
|
8654
8658
|
}];
|
|
8655
8659
|
// packages/speak/src/records.ts
|
|
8660
|
+
/** Model records for the voices this package drives, for pickers and the models registry. */
|
|
8656
8661
|
const SPEAK_RECORDS = [
|
|
8657
8662
|
{
|
|
8658
8663
|
id: "kokoro-82m",
|
|
@@ -8677,7 +8682,7 @@ Component that was made reactive: `, type);
|
|
|
8677
8682
|
commercial: true,
|
|
8678
8683
|
place: "cpu-worker",
|
|
8679
8684
|
runtime: "kokoro-js@1.2.1",
|
|
8680
|
-
notes: ["webgpu with q8
|
|
8685
|
+
notes: ["webgpu with q8 has given garbled audio", "fp32 weights (about 330 MB, inferred) do not cache on file://, so webgpu needs http"]
|
|
8681
8686
|
},
|
|
8682
8687
|
{
|
|
8683
8688
|
id: "pocket-tts",
|
|
@@ -8745,8 +8750,7 @@ Component that was made reactive: `, type);
|
|
|
8745
8750
|
// packages/transcribe/src/records.ts
|
|
8746
8751
|
/**
|
|
8747
8752
|
* Speech to text records for the models hub. Ladders and dtypes are
|
|
8748
|
-
*
|
|
8749
|
-
* notes, except rows marked vendor: those sum the quantized encoder and
|
|
8753
|
+
* one per model table; sizes are inferred from the model notes, except rows marked vendor: those sum the quantized encoder and
|
|
8750
8754
|
* decoder in the hub listing (no download, 2026-11-25), in MiB. Licences are the model cards' as of 2026-11-22.
|
|
8751
8755
|
*/
|
|
8752
8756
|
const asr = (r) => ({
|
|
@@ -8758,6 +8762,7 @@ Component that was made reactive: `, type);
|
|
|
8758
8762
|
runtime: "@huggingface/transformers@4.3.2",
|
|
8759
8763
|
...r
|
|
8760
8764
|
});
|
|
8765
|
+
/** The Whisper and Moonshine model records for the models hub. */
|
|
8761
8766
|
const TRANSCRIBE_RECORDS = [
|
|
8762
8767
|
asr({
|
|
8763
8768
|
id: "whisper-large-v3-turbo",
|
|
@@ -8771,7 +8776,7 @@ Component that was made reactive: `, type);
|
|
|
8771
8776
|
ladder: LADDERS.whisperTurbo(),
|
|
8772
8777
|
licence: "MIT",
|
|
8773
8778
|
place: "gpu",
|
|
8774
|
-
notes: ["best accuracy, multilingual, wants webgpu
|
|
8779
|
+
notes: ["best accuracy, multilingual, wants webgpu", "download per rung: 1.5 gb fp16 encoder and q4 decoder, 2.7 gb fp32 encoder, 1.0 gb q8 on wasm (vendor)"]
|
|
8775
8780
|
}),
|
|
8776
8781
|
asr({
|
|
8777
8782
|
id: "whisper-base",
|
|
@@ -8808,7 +8813,7 @@ Component that was made reactive: `, type);
|
|
|
8808
8813
|
sizeMB: 90,
|
|
8809
8814
|
ladder: LADDERS.whisperSmall(false),
|
|
8810
8815
|
licence: "MIT (the OpenAI Whisper release; the Xenova ONNX card says apache-2.0)",
|
|
8811
|
-
notes: ["english only; the
|
|
8816
|
+
notes: ["english only; the default with no gpu"]
|
|
8812
8817
|
}),
|
|
8813
8818
|
asr({
|
|
8814
8819
|
id: "whisper-tiny.en",
|
|
@@ -8857,6 +8862,7 @@ Component that was made reactive: `, type);
|
|
|
8857
8862
|
* only for a URL the app supplies; YOLOv10 n, s and m, FastSAM and the face
|
|
8858
8863
|
* swap set sit in PICKER_RECORDS.
|
|
8859
8864
|
*/
|
|
8865
|
+
/** The MediaPipe model storage base URL the MediaPipe records load from. */
|
|
8860
8866
|
const MP_MODELS = "https://storage.googleapis.com/mediapipe-models/";
|
|
8861
8867
|
/** MediaPipe ladder: GPU delegate (webgl), then the CPU delegate (wasm). */
|
|
8862
8868
|
const mediapipeLadder = () => [{ device: "webgl" }, { device: "wasm" }];
|
|
@@ -8877,6 +8883,7 @@ Component that was made reactive: `, type);
|
|
|
8877
8883
|
place: "main",
|
|
8878
8884
|
runtime: "@mediapipe/tasks-vision@1.2.3"
|
|
8879
8885
|
});
|
|
8886
|
+
/** The vision records registered by `attachVision`: Depth Anything V2 small, MediaPipe detection, segmentation and landmarks, SlimSAM, SmolVLM 256M and LFM2-VL 450M. */
|
|
8880
8887
|
const VISION_RECORDS = [
|
|
8881
8888
|
{
|
|
8882
8889
|
id: "depth-anything-v2-small",
|
|
@@ -8894,7 +8901,7 @@ Component that was made reactive: `, type);
|
|
|
8894
8901
|
commercial: true,
|
|
8895
8902
|
place: "cpu-worker",
|
|
8896
8903
|
runtime: "@huggingface/transformers@4.3.2",
|
|
8897
|
-
notes: ["
|
|
8904
|
+
notes: ["fp16 on webgpu, fp32 on the same device after a failure"]
|
|
8898
8905
|
},
|
|
8899
8906
|
mp("efficientdet-lite0", "detect", "object_detector/efficientdet_lite0/float16/1/efficientdet_lite0.tflite", 7, "mediapipe efficientdet lite0 (coco, 80 classes)", "light, 80 things"),
|
|
8900
8907
|
mp("selfie-segmenter", "segment.person", "image_segmenter/selfie_segmenter/float16/latest/selfie_segmenter.tflite", 1, "mediapipe selfie segmenter"),
|
|
@@ -8926,7 +8933,7 @@ Component that was made reactive: `, type);
|
|
|
8926
8933
|
commercial: true,
|
|
8927
8934
|
place: "cpu-worker",
|
|
8928
8935
|
runtime: "@huggingface/transformers@4.3.2",
|
|
8929
|
-
notes: ["
|
|
8936
|
+
notes: ["one image embedding, then any number of point prompts"]
|
|
8930
8937
|
},
|
|
8931
8938
|
{
|
|
8932
8939
|
id: "smolvlm-256m-instruct",
|
|
@@ -8969,13 +8976,12 @@ Component that was made reactive: `, type);
|
|
|
8969
8976
|
commercial: "unknown",
|
|
8970
8977
|
place: "gpu",
|
|
8971
8978
|
runtime: "@huggingface/transformers@4.3.2",
|
|
8972
|
-
notes: ["
|
|
8979
|
+
notes: ["q4f16 on webgpu only; the licence limits commercial use by revenue, read it before shipping"]
|
|
8973
8980
|
}
|
|
8974
8981
|
];
|
|
8975
8982
|
/**
|
|
8976
8983
|
* Records listed for pickers and never registered by default, so a hub's
|
|
8977
|
-
* routing by capability keeps its small defaults: larger alternates
|
|
8978
|
-
* earlier tools offered (smolvlm 500m and 2 video, gemma 4 e2b, two more
|
|
8984
|
+
* routing by capability keeps its small defaults: larger alternates (smolvlm 500m and 2 video, gemma 4 e2b, two more
|
|
8979
8985
|
* depth models), and records under licences that limit use (YOLOv10 and
|
|
8980
8986
|
* FastSAM are AGPL-3.0 upstream, Ultralytics; the face swap set is
|
|
8981
8987
|
* InsightFace, non-commercial). A hub that runs one adds it itself. Sizes
|
|
@@ -9009,8 +9015,9 @@ Component that was made reactive: `, type);
|
|
|
9009
9015
|
licence: "AGPL-3.0 (Ultralytics weights, the model card's licence field)",
|
|
9010
9016
|
commercial: false,
|
|
9011
9017
|
place: "gpu",
|
|
9012
|
-
notes: ["output [1, 300, 6] after the model's own selection, so no nms pass (vendor, the yolov10 paper)", "
|
|
9018
|
+
notes: ["output [1, 300, 6] after the model's own selection, so no nms pass (vendor, the yolov10 paper)", "comes in nano, small and medium"]
|
|
9013
9019
|
});
|
|
9020
|
+
/** Records listed for pickers and never registered by default: larger alternates, and records under licences that limit use (YOLOv10, FastSAM, the face swap set). */
|
|
9014
9021
|
const PICKER_RECORDS = [
|
|
9015
9022
|
{
|
|
9016
9023
|
id: "smolvlm-500m-instruct",
|
|
@@ -9053,7 +9060,7 @@ Component that was made reactive: `, type);
|
|
|
9053
9060
|
commercial: true,
|
|
9054
9061
|
place: "cpu-worker",
|
|
9055
9062
|
runtime: "@huggingface/transformers@4.3.2",
|
|
9056
|
-
notes: ["an
|
|
9063
|
+
notes: ["an option beside smolvlm 256m and 500m"]
|
|
9057
9064
|
},
|
|
9058
9065
|
{
|
|
9059
9066
|
id: "depth-anything-v2-base",
|
|
@@ -9110,7 +9117,7 @@ Component that was made reactive: `, type);
|
|
|
9110
9117
|
commercial: true,
|
|
9111
9118
|
place: "gpu",
|
|
9112
9119
|
runtime: "@huggingface/transformers@4.3.2",
|
|
9113
|
-
notes: ["
|
|
9120
|
+
notes: ["about 3.3 GB (vendor)"]
|
|
9114
9121
|
},
|
|
9115
9122
|
yolo10("n", 9, "instant", "nano, quick"),
|
|
9116
9123
|
yolo10("s", 28, "fast", "small, sharper"),
|
|
@@ -9139,7 +9146,7 @@ Component that was made reactive: `, type);
|
|
|
9139
9146
|
licence: "AGPL-3.0 upstream (Ultralytics FastSAM); the export's card says apache-2.0",
|
|
9140
9147
|
commercial: false,
|
|
9141
9148
|
place: "cpu-worker",
|
|
9142
|
-
notes: ["
|
|
9149
|
+
notes: ["finds every mask in one pass on onnxruntime-web (93 MB, vendor)", "segment everything: prototype masks, nms, then a pick by click"]
|
|
9143
9150
|
},
|
|
9144
9151
|
{
|
|
9145
9152
|
id: "scrfd-10g",
|
|
@@ -9212,7 +9219,7 @@ Component that was made reactive: `, type);
|
|
|
9212
9219
|
licence: "InsightFace: non-commercial research only; the mirror's card says gpl-3.0",
|
|
9213
9220
|
commercial: false,
|
|
9214
9221
|
place: "gpu",
|
|
9215
|
-
notes: ["128 px faces;
|
|
9222
|
+
notes: ["128 px faces; paste the result back with a feathered mask"]
|
|
9216
9223
|
}
|
|
9217
9224
|
];
|
|
9218
9225
|
/** A face landmark fallback record over face-api.js tiny nets (code MIT; weights MIT from @vladmandic/face-api). */
|
|
@@ -9241,9 +9248,10 @@ Component that was made reactive: `, type);
|
|
|
9241
9248
|
* records come from the packages that run them; a record listed in more
|
|
9242
9249
|
* than one place counts once, the running package's copy first.
|
|
9243
9250
|
*/
|
|
9244
|
-
/** face-api weights (MIT)
|
|
9251
|
+
/** Base URL of the face-api weights (MIT) on the package CDN. */
|
|
9245
9252
|
const FACE_API_BASE = "https://cdn.jsdelivr.net/npm/@vladmandic/face-api@1.7.12/model/";
|
|
9246
9253
|
const has = (...want) => (caps) => caps.some((c) => want.includes(c));
|
|
9254
|
+
/** The words and capability test of every job. */
|
|
9247
9255
|
const JOBS = {
|
|
9248
9256
|
chat: {
|
|
9249
9257
|
label: "brain",
|
|
@@ -9352,9 +9360,11 @@ Component that was made reactive: `, type);
|
|
|
9352
9360
|
"no download": "none",
|
|
9353
9361
|
own: "own"
|
|
9354
9362
|
};
|
|
9363
|
+
/** Whether a record has nothing to download: a built in, system or zero size model. */
|
|
9355
9364
|
function isNoDownload(r) {
|
|
9356
9365
|
return !!r.noDownload || r.sizeMB === 0 || r.provider === "prompt-api" || r.provider === "system";
|
|
9357
9366
|
}
|
|
9367
|
+
/** Whether a record's censorship is "uncensored" or "abliterated". */
|
|
9358
9368
|
function isUncensored(r) {
|
|
9359
9369
|
return r.censorship === "uncensored" || r.censorship === "abliterated";
|
|
9360
9370
|
}
|
|
@@ -9587,6 +9597,7 @@ Component that was made reactive: `, type);
|
|
|
9587
9597
|
}).unfit === void 0);
|
|
9588
9598
|
return (fits.find((r) => r.group === "start here") ?? fits.find((r) => r.speed === "fast" || r.speed === "steady") ?? fits[0] ?? records[0])?.id ?? "";
|
|
9589
9599
|
}
|
|
9600
|
+
/** Creates a model picker for a job, with rows that say whether each model fits this machine. */
|
|
9590
9601
|
function useModelPick(job, o = {}) {
|
|
9591
9602
|
const def = JOBS[job];
|
|
9592
9603
|
let records = jobRecords(job, o.records ?? ALL_RECORDS);
|
|
@@ -9932,13 +9943,14 @@ Component that was made reactive: `, type);
|
|
|
9932
9943
|
}
|
|
9933
9944
|
// packages/ai-views/src/mount-chat.ts
|
|
9934
9945
|
/**
|
|
9935
|
-
* ChatPane and Composer in the DOM
|
|
9946
|
+
* ChatPane and Composer in the DOM: the
|
|
9936
9947
|
* thread as hackbuild-ui messages, the reasoning in a fold that is open
|
|
9937
9948
|
* while it streams, the memory a reply used in a fold under it, copy and
|
|
9938
9949
|
* redo on the last reply only, and a composer whose send is the one pink
|
|
9939
9950
|
* action and turns into stop while a reply streams.
|
|
9940
9951
|
*/
|
|
9941
9952
|
const paras = (t) => t.split(/\n{2,}/).map((p) => p.trim()).filter(Boolean).map((p) => `<div class="hb-msg-text">${esc(p).replace(/\n/g, "<br>")}</div>`).join("");
|
|
9953
|
+
/** The HTML of one chat turn, with its reasoning fold, memory used and stats. */
|
|
9942
9954
|
function turnHtml(t, o) {
|
|
9943
9955
|
if (t.role === "user") return `<div class="hb-msg is-user" data-turn="${t.id}"><span class="hb-msg-who"><span class="hb-msg-name">you</span></span><div class="hb-msg-parts">${paras(t.text)}</div></div>`;
|
|
9944
9956
|
const live = !t.done;
|
|
@@ -10077,11 +10089,11 @@ Component that was made reactive: `, type);
|
|
|
10077
10089
|
}
|
|
10078
10090
|
// packages/ai-views/src/mount-transcribe.ts
|
|
10079
10091
|
/**
|
|
10080
|
-
* TranscribeDrop, TranscriptView and their rack parts in the DOM
|
|
10081
|
-
* earlier transcription tool: the drop zone is the page until a file is in
|
|
10092
|
+
* TranscribeDrop, TranscriptView and their rack parts in the DOM: the drop zone is the page until a file is in
|
|
10082
10093
|
* it, then the transcript is. Lines carry their time, edit in place (one
|
|
10083
10094
|
* undo step each), and export as txt, srt, vtt and json once there is text.
|
|
10084
10095
|
*/
|
|
10096
|
+
/** The HTML of one channel's transcript, or an empty note when there is none. */
|
|
10085
10097
|
function transcriptHtml(c, o = {}) {
|
|
10086
10098
|
if (!c) return `<p class="hb-lay-empty-note">nothing yet. drop a file.</p>`;
|
|
10087
10099
|
const st = di(c.status);
|
|
@@ -10238,7 +10250,7 @@ Component that was made reactive: `, type);
|
|
|
10238
10250
|
}
|
|
10239
10251
|
// packages/ai-views/src/mount-mask.ts
|
|
10240
10252
|
/**
|
|
10241
|
-
* MaskStudio
|
|
10253
|
+
* MaskStudio: drop an image, press a thing
|
|
10242
10254
|
* to cut it out (a click segment model such as SlimSAM), fix the mask by
|
|
10243
10255
|
* hand with the wand, brush and lasso of hackbuild-ui maskEditor (x swaps
|
|
10244
10256
|
* add and erase, [ and ] size the brush, ctrl z undoes), zoom and fit, and
|
|
@@ -10282,6 +10294,10 @@ Component that was made reactive: `, type);
|
|
|
10282
10294
|
t.getContext("2d")?.drawImage(c, 0, 0, t.width, t.height);
|
|
10283
10295
|
return t.toDataURL("image/png");
|
|
10284
10296
|
}
|
|
10297
|
+
/**
|
|
10298
|
+
* Mounts a mask studio on a host: drop or open an image, then cut masks with the point, wand, brush
|
|
10299
|
+
* and lasso tools or a segment model.
|
|
10300
|
+
*/
|
|
10285
10301
|
function mountMaskStudio(host, o = {}) {
|
|
10286
10302
|
let models = o.models ?? {};
|
|
10287
10303
|
const l = listeners();
|
|
@@ -10633,6 +10649,7 @@ Component that was made reactive: `, type);
|
|
|
10633
10649
|
// packages/ai-views/src/memory.ts
|
|
10634
10650
|
const n3 = (x) => Number.isFinite(x) ? x.toFixed(3) : "none";
|
|
10635
10651
|
const rank = (r) => r >= 0 ? `#${r + 1}` : "none";
|
|
10652
|
+
/** The rows of a recall trace as text, marking the hits handed to the model. */
|
|
10636
10653
|
function traceRows(r, maxText = 80) {
|
|
10637
10654
|
const used = new Set(r.hits.map((h) => h.item.id));
|
|
10638
10655
|
return r.trace.map((t, i) => ({
|
|
@@ -10647,11 +10664,13 @@ Component that was made reactive: `, type);
|
|
|
10647
10664
|
used: used.has(t.id)
|
|
10648
10665
|
}));
|
|
10649
10666
|
}
|
|
10667
|
+
/** The HTML of a recall trace table, or an empty note before any recall. */
|
|
10650
10668
|
function inspectorHtml(rec) {
|
|
10651
10669
|
if (!rec) return `<p class="hb-lay-empty-note">no recall yet. ask something to see what memory finds.</p>`;
|
|
10652
10670
|
const rows = traceRows(rec);
|
|
10653
10671
|
return `<p class="hb-lay-empty-note" role="status">"${esc(rec.query)}", ${esc(rec.mode)} recall, ${rows.length} found, ${rows.filter((x) => x.used).length} used.</p><div class="hb-scroll-x" data-ux="detail"><table class="hb-table"><thead><tr><th class="num">#</th><th>kind</th><th>text</th><th>bm25</th><th>cosine</th><th class="num">rrf</th><th class="num">score</th></tr></thead><tbody>` + rows.map((x) => `<tr class="${x.used ? "is-mark" : ""}" data-used="${x.used}"><td class="num">${x.rank}</td><td>${esc(x.kind)}</td><td>${esc(x.text)}</td><td>${esc(x.bm25)}</td><td>${esc(x.cos)}</td><td class="num">${x.rrf}</td><td class="num">${x.score}</td></tr>`).join("") + `</tbody></table></div>`;
|
|
10654
10672
|
}
|
|
10673
|
+
/** Shows a recall trace as a table on a host. */
|
|
10655
10674
|
function mountMemoryInspector(host, rec = null) {
|
|
10656
10675
|
host.innerHTML = inspectorHtml(rec);
|
|
10657
10676
|
return {
|
|
@@ -10707,7 +10726,7 @@ Component that was made reactive: `, type);
|
|
|
10707
10726
|
}
|
|
10708
10727
|
// packages/ai-views/src/mount-frame.ts
|
|
10709
10728
|
/**
|
|
10710
|
-
* FrameView and CameraFeed
|
|
10729
|
+
* FrameView and CameraFeed: a
|
|
10711
10730
|
* frame in a hackbuild-ui camera tile with what the models found drawn
|
|
10712
10731
|
* over it (boxes with their word and score, landmark points and lines),
|
|
10713
10732
|
* a count in the corner and the caption under it. CameraFeed opens the
|
|
@@ -10720,6 +10739,7 @@ Component that was made reactive: `, type);
|
|
|
10720
10739
|
return fb;
|
|
10721
10740
|
}
|
|
10722
10741
|
};
|
|
10742
|
+
/** Draws a frame in a camera tile on a host, with boxes, landmarks, a corner tag and a caption over it. */
|
|
10723
10743
|
function mountFrameView(host, o = {}) {
|
|
10724
10744
|
host.innerHTML = `<div class="hb-frameview"><figure class="hb-camtile" aria-label="frame"><div class="hb-camtile-none" role="status">${esc(o.empty ?? "no frame yet")}</div><canvas aria-hidden="true"></canvas><span class="hb-camtile-tag is-tl" hidden></span></figure><p class="hb-frameview-cap" data-caption aria-live="polite" hidden></p></div>`;
|
|
10725
10745
|
const fig = host.querySelector("figure");
|
|
@@ -10875,6 +10895,7 @@ Component that was made reactive: `, type);
|
|
|
10875
10895
|
dispose: () => l.off()
|
|
10876
10896
|
};
|
|
10877
10897
|
}
|
|
10898
|
+
/** Opens the camera into a host and hands the video to `onFrame` at the set rate while it is live. */
|
|
10878
10899
|
function mountCameraFeed(host, o = {}) {
|
|
10879
10900
|
const video = document.createElement("video");
|
|
10880
10901
|
video.autoplay = true;
|
|
@@ -10978,6 +10999,7 @@ Component that was made reactive: `, type);
|
|
|
10978
10999
|
});
|
|
10979
11000
|
};
|
|
10980
11001
|
}
|
|
11002
|
+
/** Vue component for a model picker of one job; emits `pick`, `choose`, `loaded` and `failed`. */
|
|
10981
11003
|
const ModelSelect = /* @__PURE__ */ defineComponent({
|
|
10982
11004
|
name: "ModelSelect",
|
|
10983
11005
|
props: {
|
|
@@ -11039,6 +11061,7 @@ Component that was made reactive: `, type);
|
|
|
11039
11061
|
p.go
|
|
11040
11062
|
])
|
|
11041
11063
|
});
|
|
11064
|
+
/** Vue component for the turns of a chat thread. */
|
|
11042
11065
|
const ChatPane = /* @__PURE__ */ defineComponent({
|
|
11043
11066
|
name: "ChatPane",
|
|
11044
11067
|
props: {
|
|
@@ -11065,6 +11088,7 @@ Component that was made reactive: `, type);
|
|
|
11065
11088
|
emptyNote: p.emptyNote
|
|
11066
11089
|
}), (p) => [p.thread])
|
|
11067
11090
|
});
|
|
11091
|
+
/** Vue component for the message box of a chat thread. */
|
|
11068
11092
|
const Composer = /* @__PURE__ */ defineComponent({
|
|
11069
11093
|
name: "Composer",
|
|
11070
11094
|
props: {
|
|
@@ -11079,6 +11103,7 @@ Component that was made reactive: `, type);
|
|
|
11079
11103
|
},
|
|
11080
11104
|
setup: hosted((host, p) => mountComposer(host, p.thread, { placeholder: p.placeholder }), (p) => [p.thread])
|
|
11081
11105
|
});
|
|
11106
|
+
/** Vue component for the drop zone that becomes the transcript; emits `sample`. */
|
|
11082
11107
|
const TranscribeDrop = /* @__PURE__ */ defineComponent({
|
|
11083
11108
|
name: "TranscribeDrop",
|
|
11084
11109
|
props: {
|
|
@@ -11104,6 +11129,7 @@ Component that was made reactive: `, type);
|
|
|
11104
11129
|
} : {}
|
|
11105
11130
|
}), (p) => [p.queue])
|
|
11106
11131
|
});
|
|
11132
|
+
/** Vue component for the selected transcript, or its export buttons when `exports` is set. */
|
|
11107
11133
|
const TranscriptView = /* @__PURE__ */ defineComponent({
|
|
11108
11134
|
name: "TranscriptView",
|
|
11109
11135
|
props: {
|
|
@@ -11118,6 +11144,10 @@ Component that was made reactive: `, type);
|
|
|
11118
11144
|
},
|
|
11119
11145
|
setup: hosted((host, p) => p.exports ? mountTranscriptExports(host, p.queue) : mountTranscriptView(host, p.queue), (p) => [p.queue, p.exports])
|
|
11120
11146
|
});
|
|
11147
|
+
/**
|
|
11148
|
+
* Vue component for a mask studio; emits `studio` with the mounted studio and `sample` when the
|
|
11149
|
+
* sample button is pressed.
|
|
11150
|
+
*/
|
|
11121
11151
|
const MaskStudio = /* @__PURE__ */ defineComponent({
|
|
11122
11152
|
name: "MaskStudio",
|
|
11123
11153
|
props: {
|
|
@@ -11154,6 +11184,7 @@ Component that was made reactive: `, type);
|
|
|
11154
11184
|
});
|
|
11155
11185
|
}
|
|
11156
11186
|
});
|
|
11187
|
+
/** Vue component for the tool rail of a mask studio. */
|
|
11157
11188
|
const MaskTools = /* @__PURE__ */ defineComponent({
|
|
11158
11189
|
name: "MaskTools",
|
|
11159
11190
|
props: { studio: {
|
|
@@ -11162,6 +11193,7 @@ Component that was made reactive: `, type);
|
|
|
11162
11193
|
} },
|
|
11163
11194
|
setup: hosted((host, p) => mountMaskTools(host, p.studio), (p) => [p.studio])
|
|
11164
11195
|
});
|
|
11196
|
+
/** Vue component for the undo, redo and zoom row of a mask studio. */
|
|
11165
11197
|
const MaskVerbs = /* @__PURE__ */ defineComponent({
|
|
11166
11198
|
name: "MaskVerbs",
|
|
11167
11199
|
props: { studio: {
|
|
@@ -11170,6 +11202,7 @@ Component that was made reactive: `, type);
|
|
|
11170
11202
|
} },
|
|
11171
11203
|
setup: hosted((host, p) => mountMaskVerbs(host, p.studio), (p) => [p.studio])
|
|
11172
11204
|
});
|
|
11205
|
+
/** Vue component for one rack part of a mask studio: found, mask, saved or export. */
|
|
11173
11206
|
const MaskRack = /* @__PURE__ */ defineComponent({
|
|
11174
11207
|
name: "MaskRack",
|
|
11175
11208
|
props: {
|
|
@@ -11188,6 +11221,7 @@ Component that was made reactive: `, type);
|
|
|
11188
11221
|
},
|
|
11189
11222
|
setup: hosted((host, p) => mountMaskRack(host, p.studio, p.part, { name: p.name }), (p) => [p.studio, p.part])
|
|
11190
11223
|
});
|
|
11224
|
+
/** Vue component for a jobs rack: a line per job, presets and load all. */
|
|
11191
11225
|
const ModelJobs = /* @__PURE__ */ defineComponent({
|
|
11192
11226
|
name: "ModelJobs",
|
|
11193
11227
|
props: {
|
|
@@ -11202,6 +11236,7 @@ Component that was made reactive: `, type);
|
|
|
11202
11236
|
},
|
|
11203
11237
|
setup: hosted((host, p) => mountModelJobs(host, p.jobs, { go: p.go }), (p) => [p.jobs, p.go])
|
|
11204
11238
|
});
|
|
11239
|
+
/** Vue component for the file list of a transcribe queue. */
|
|
11205
11240
|
const TranscribeQueue = /* @__PURE__ */ defineComponent({
|
|
11206
11241
|
name: "TranscribeQueue",
|
|
11207
11242
|
props: { queue: {
|
|
@@ -11210,6 +11245,7 @@ Component that was made reactive: `, type);
|
|
|
11210
11245
|
} },
|
|
11211
11246
|
setup: hosted((host, p) => mountTranscribeQueue(host, p.queue), (p) => [p.queue])
|
|
11212
11247
|
});
|
|
11248
|
+
/** Vue component that shows a recall trace as a table. */
|
|
11213
11249
|
const MemoryInspector = /* @__PURE__ */ defineComponent({
|
|
11214
11250
|
name: "MemoryInspector",
|
|
11215
11251
|
props: { recall: {
|
|
@@ -11228,6 +11264,7 @@ Component that was made reactive: `, type);
|
|
|
11228
11264
|
});
|
|
11229
11265
|
}
|
|
11230
11266
|
});
|
|
11267
|
+
/** Vue component for the chat list rail of a `chatList`. */
|
|
11231
11268
|
const ChatList = /* @__PURE__ */ defineComponent({
|
|
11232
11269
|
name: "ChatList",
|
|
11233
11270
|
props: {
|
|
@@ -11242,6 +11279,7 @@ Component that was made reactive: `, type);
|
|
|
11242
11279
|
},
|
|
11243
11280
|
setup: hosted((host, p) => mountChatList(host, p.list, { label: p.label }), (p) => [p.list])
|
|
11244
11281
|
});
|
|
11282
|
+
/** Vue component that shows what the next request carries against the context budget. */
|
|
11245
11283
|
const ContextMeter = /* @__PURE__ */ defineComponent({
|
|
11246
11284
|
name: "ContextMeter",
|
|
11247
11285
|
props: {
|
|
@@ -11263,6 +11301,10 @@ Component that was made reactive: `, type);
|
|
|
11263
11301
|
system: () => p.system
|
|
11264
11302
|
}), (p) => [p.thread])
|
|
11265
11303
|
});
|
|
11304
|
+
/**
|
|
11305
|
+
* Vue component that draws a frame with boxes, landmarks and a caption; emits `view` with the
|
|
11306
|
+
* mounted view.
|
|
11307
|
+
*/
|
|
11266
11308
|
const FrameView = /* @__PURE__ */ defineComponent({
|
|
11267
11309
|
name: "FrameView",
|
|
11268
11310
|
props: {
|