human-machine-swapper 1.3.0 → 1.4.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/custom-elements.json +75 -0
- package/package.json +6 -3
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "2.1.0",
|
|
3
|
+
"readme": "README.md",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/human-machine-swapper.js",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"customElement": true,
|
|
12
|
+
"tagName": "human-machine-swapper",
|
|
13
|
+
"name": "HumanMachineSwapper",
|
|
14
|
+
"description": "A Human / Machine pill. Machine shows the site's llms.txt, the plain-text reading written for language models, rendered in place over the page. Renders nothing at all when the site has no llms.txt to offer.",
|
|
15
|
+
"attributes": [
|
|
16
|
+
{
|
|
17
|
+
"name": "data-position",
|
|
18
|
+
"description": "Which edge the pill is fixed to.",
|
|
19
|
+
"type": { "text": "'bottom-center' | 'top-center'" },
|
|
20
|
+
"default": "'bottom-center'"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "data-llms",
|
|
24
|
+
"description": "The machine reading to link to. 'auto' reads <link rel=\"llms\">, then probes /llms.txt and /llms-full.txt. When nothing answers, the component renders nothing and explains why in the console.",
|
|
25
|
+
"type": { "text": "'auto' | string" },
|
|
26
|
+
"default": "'auto'"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "data-accent",
|
|
30
|
+
"description": "Accent colour for the current dot and hover state.",
|
|
31
|
+
"type": { "text": "string" },
|
|
32
|
+
"default": "'#a8f326'"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "data-labels-human",
|
|
36
|
+
"description": "Overrides the Human label.",
|
|
37
|
+
"type": { "text": "string" },
|
|
38
|
+
"default": "'Human'"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "data-labels-machine",
|
|
42
|
+
"description": "Overrides the Machine label.",
|
|
43
|
+
"type": { "text": "string" },
|
|
44
|
+
"default": "'Machine'"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"cssProperties": [
|
|
48
|
+
{
|
|
49
|
+
"name": "--hms-top",
|
|
50
|
+
"description": "Distance from the top edge. Set this AND --hms-bottom together when overriding: a fixed box with both set and height auto stretches. Use when the site's own chrome occupies the default edge.",
|
|
51
|
+
"default": "calc(14px + env(safe-area-inset-top)) when data-position is top-center, otherwise auto"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "--hms-bottom",
|
|
55
|
+
"description": "Distance from the bottom edge. See --hms-top.",
|
|
56
|
+
"default": "calc(20px + env(safe-area-inset-bottom)) when data-position is bottom-center, otherwise auto"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"members": [],
|
|
60
|
+
"events": []
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"exports": [
|
|
64
|
+
{
|
|
65
|
+
"kind": "custom-element-definition",
|
|
66
|
+
"name": "human-machine-swapper",
|
|
67
|
+
"declaration": {
|
|
68
|
+
"name": "HumanMachineSwapper",
|
|
69
|
+
"module": "src/human-machine-swapper.js"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "human-machine-swapper",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A web component that adds a Human / Machine pill to any website. Machine shows the site's llms.txt, the plain-text reading written for language models, rendered in place. One file, about 6 KB gzipped, no dependencies and no build step.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"llms.txt",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"bin",
|
|
42
42
|
"src",
|
|
43
43
|
"agent",
|
|
44
|
+
"custom-elements.json",
|
|
44
45
|
"llms.txt",
|
|
45
46
|
"AGENTS.md",
|
|
46
47
|
"README.md",
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
],
|
|
49
50
|
"sideEffects": true,
|
|
50
51
|
"scripts": {
|
|
51
|
-
"test": "node --test test/*.test.mjs"
|
|
52
|
+
"test": "node --test test/*.test.mjs",
|
|
53
|
+
"test:wp": "php wordpress/test/generator-test.php"
|
|
52
54
|
},
|
|
53
55
|
"engines": {
|
|
54
56
|
"node": ">=18"
|
|
@@ -58,5 +60,6 @@
|
|
|
58
60
|
},
|
|
59
61
|
"bin": {
|
|
60
62
|
"human-machine-swapper": "bin/cli.mjs"
|
|
61
|
-
}
|
|
63
|
+
},
|
|
64
|
+
"customElements": "custom-elements.json"
|
|
62
65
|
}
|