@substrate-system/input 0.0.19 → 0.0.20

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/package.json CHANGED
@@ -1,23 +1,20 @@
1
1
  {
2
2
  "name": "@substrate-system/input",
3
- "version": "0.0.19",
4
3
  "type": "module",
5
- "description": "A minimal parent input component to inherit from",
4
+ "version": "0.0.20",
6
5
  "main": "dist/index.js",
7
6
  "files": [
8
7
  "./dist/*"
9
8
  ],
10
9
  "scripts": {
11
10
  "lint": "eslint \"./**/*.{ts,js}\"",
12
- "build-tests": "esbuild test/index.ts --target=es2020 --bundle --keep-names > test/test-bundle.js",
13
- "test": "npm run lint && npm run build && npm run build-tests && npm run test-tape-run",
14
- "test-tape-run": "cat test/index.html | tape-run --input=html --static=test | tap-spec",
15
- "build-css": "postcss src/index.css --use postcss-nesting > dist/index.css",
16
- "build-css:min": "postcss src/index.css --use cssnano postcss-nesting > dist/index.min.css",
11
+ "test": "esbuild --bundle ./test/index.ts | tapout",
12
+ "build-css": "lightningcss --nesting src/index.css -o dist/index.css",
13
+ "build-css:min": "lightningcss --nesting --minify src/index.css -o dist/index.min.css",
17
14
  "build-cjs": "esbuild src/*.ts --format=cjs --keep-names --tsconfig=tsconfig.build.json --outdir=./dist --out-extension:.js=.cjs --sourcemap",
18
15
  "build-esm": "esbuild src/*.ts --format=esm --metafile=dist/meta.json --keep-names --tsconfig=tsconfig.build.json --outdir=./dist --sourcemap && tsc --emitDeclarationOnly --project tsconfig.build.json --outDir dist",
19
16
  "build-esm:min": "esbuild ./src/*.ts --format=esm --keep-names --bundle --tsconfig=tsconfig.build.json --minify --out-extension:.js=.min.js --outdir=./dist --sourcemap",
20
- "build-example": "mkdir -p ./public && rm -rf ./public/* && VITE_DEBUG_MODE=staging vite --mode staging --base=\"/input\" build",
17
+ "build-example": "mkdir -p ./public && rm -rf ./public/* && NODE_ENV=development vite --mode development --base=\"/input\" build",
21
18
  "build-docs": "typedoc --tsconfig tsconfig.build.json ./src/index.ts",
22
19
  "build": "mkdir -p ./dist && rm -rf ./dist/* && npm run build-cjs && npm run build-esm && npm run build-esm:min && npm run build-css && npm run build-css:min",
23
20
  "start": "vite",
@@ -33,63 +30,42 @@
33
30
  "require": "./dist/index.cjs"
34
31
  },
35
32
  "./css": "./dist/index.css",
36
- "./css/min": "./dist/index.min.css",
33
+ "./min/css": "./dist/index.min.css",
34
+ "./min/*": {
35
+ "import": "./dist/*.min.js",
36
+ "require": "./dist/*.min.cjs"
37
+ },
37
38
  "./*": {
38
- "import": [
39
- "./dist/*.js",
40
- "./dist/*"
41
- ],
42
- "require": [
43
- "./dist/*.cjs",
44
- "./dist/*"
45
- ]
39
+ "import": "./dist/*.js",
40
+ "require": "./dist/*.cjs"
46
41
  }
47
42
  },
48
43
  "dependencies": {
49
- "@substrate-system/util": "^0.1.31"
44
+ "@substrate-system/web-component": "^0.0.46"
50
45
  },
51
46
  "devDependencies": {
52
- "@substrate-system/debug": "^0.9.0",
53
- "@substrate-system/dom": "^0.1.7",
54
- "@substrate-system/tapzero": "^0.10.13",
47
+ "@substrate-system/debug": "^0.9.32",
48
+ "@substrate-system/dom": "^0.1.13",
49
+ "@substrate-system/tapout": "^0.0.35",
50
+ "@substrate-system/tapzero": "^0.10.15",
55
51
  "@typescript-eslint/eslint-plugin": "^8.7.0",
56
52
  "@typescript-eslint/parser": "^8.7.0",
57
53
  "auto-changelog": "^2.4.0",
58
- "cssnano": "^7.0.3",
59
- "esbuild": "^0.25.0",
54
+ "browserslist": "^4.28.1",
55
+ "esbuild": "^0.27.2",
60
56
  "eslint": "^8.57.0",
61
57
  "eslint-config-standard": "^17.1.0",
58
+ "lightningcss": "^1.30.2",
59
+ "lightningcss-cli": "^1.30.2",
62
60
  "markdown-toc": "^1.2.0",
63
- "postcss": "^8.5.1",
64
- "postcss-cli": "^11.0.0",
65
- "postcss-nesting": "^13.0.1",
66
- "stylelint": "^16.9.0",
67
- "stylelint-config-standard": "^38.0.0",
61
+ "stylelint": "^17.0.0",
62
+ "stylelint-config-standard": "^40.0.0",
68
63
  "tap-spec": "^5.0.0",
69
64
  "tape-run": "^11.0.0",
70
65
  "typedoc": "^0.28.1",
71
66
  "typescript": "^5.7.3",
72
- "vite": "^6.0.11"
67
+ "vite": "^7.3.0"
73
68
  },
74
69
  "author": "nichoth <nichoth@nichoth.com> (https://nichoth.com)",
75
- "directories": {
76
- "example": "example",
77
- "test": "test"
78
- },
79
- "repository": {
80
- "type": "git",
81
- "url": "git+https://github.com/substrate-system/input.git"
82
- },
83
- "keywords": [
84
- "input",
85
- "web",
86
- "component",
87
- "parent"
88
- ],
89
- "types": "./dist/index.d.ts",
90
- "bugs": {
91
- "url": "https://github.com/substrate-system/input/issues"
92
- },
93
- "homepage": "https://github.com/substrate-system/input#readme",
94
70
  "license": "SEE LICENSE IN LICENSE"
95
71
  }
package/dist/html.cjs DELETED
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var html_exports = {};
21
- __export(html_exports, {
22
- html: () => html
23
- });
24
- module.exports = __toCommonJS(html_exports);
25
- var import_to_string = require("@substrate-system/util/to-string");
26
- function html(attrs) {
27
- return `<input ${(0, import_to_string.attributes)(attrs)} />`;
28
- }
29
- __name(html, "html");
30
- //# sourceMappingURL=html.cjs.map
package/dist/html.cjs.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/html.ts"],
4
- "sourcesContent": ["import { attributes } from '@substrate-system/util/to-string'\n\n/**\n * HTML attributes as object\n */\nexport type Attrs = Partial<{\n id:string;\n class:string;\n disabled:string|true;\n autofocus:string|true;\n type:string;\n tabindex:number|string;\n value:string;\n required:boolean;\n placeholder:string|string[];\n name:string;\n autocomplete:string;\n}>\n\nexport function html (attrs:Attrs):string {\n return `<input ${attributes(attrs)} />`\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA2B;AAmBpB,SAAS,KAAM,OAAoB;AACtC,SAAO,cAAU,6BAAW,KAAK,CAAC;AACtC;AAFgB;",
6
- "names": []
7
- }
package/dist/html.d.ts DELETED
@@ -1,18 +0,0 @@
1
- /**
2
- * HTML attributes as object
3
- */
4
- export type Attrs = Partial<{
5
- id: string;
6
- class: string;
7
- disabled: string | true;
8
- autofocus: string | true;
9
- type: string;
10
- tabindex: number | string;
11
- value: string;
12
- required: boolean;
13
- placeholder: string | string[];
14
- name: string;
15
- autocomplete: string;
16
- }>;
17
- export declare function html(attrs: Attrs): string;
18
- //# sourceMappingURL=html.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../src/html.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC;IACxB,EAAE,EAAC,MAAM,CAAC;IACV,KAAK,EAAC,MAAM,CAAC;IACb,QAAQ,EAAC,MAAM,GAAC,IAAI,CAAC;IACrB,SAAS,EAAC,MAAM,GAAC,IAAI,CAAC;IACtB,IAAI,EAAC,MAAM,CAAC;IACZ,QAAQ,EAAC,MAAM,GAAC,MAAM,CAAC;IACvB,KAAK,EAAC,MAAM,CAAC;IACb,QAAQ,EAAC,OAAO,CAAC;IACjB,WAAW,EAAC,MAAM,GAAC,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAC,MAAM,CAAC;IACZ,YAAY,EAAC,MAAM,CAAC;CACvB,CAAC,CAAA;AAEF,wBAAgB,IAAI,CAAE,KAAK,EAAC,KAAK,GAAE,MAAM,CAExC"}
package/dist/html.js DELETED
@@ -1,11 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { attributes } from "@substrate-system/util/to-string";
4
- function html(attrs) {
5
- return `<input ${attributes(attrs)} />`;
6
- }
7
- __name(html, "html");
8
- export {
9
- html
10
- };
11
- //# sourceMappingURL=html.js.map
package/dist/html.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/html.ts"],
4
- "sourcesContent": ["import { attributes } from '@substrate-system/util/to-string'\n\n/**\n * HTML attributes as object\n */\nexport type Attrs = Partial<{\n id:string;\n class:string;\n disabled:string|true;\n autofocus:string|true;\n type:string;\n tabindex:number|string;\n value:string;\n required:boolean;\n placeholder:string|string[];\n name:string;\n autocomplete:string;\n}>\n\nexport function html (attrs:Attrs):string {\n return `<input ${attributes(attrs)} />`\n}\n"],
5
- "mappings": ";;AAAA,SAAS,kBAAkB;AAmBpB,SAAS,KAAM,OAAoB;AACtC,SAAO,UAAU,WAAW,KAAK,CAAC;AACtC;AAFgB;",
6
- "names": []
7
- }
package/dist/html.min.js DELETED
@@ -1,2 +0,0 @@
1
- var s=Object.defineProperty;var n=(t,r)=>s(t,"name",{value:r,configurable:!0});var o=Object.defineProperty,a=n((t,r)=>o(t,"name",{value:r,configurable:!0}),"__name");function u(t){return Object.keys(t).reduce((r,i)=>{let e=t[i];return e?typeof e=="boolean"?e?(r+` ${i}`).trim():r:Array.isArray(e)?r+` ${i}="${e.join(" ")}"`:(r+` ${i}="${e}"`).trim():r},"")}n(u,"attributes");a(u,"attributes");function b(t){return`<input ${u(t)} />`}n(b,"html");export{b as html};
2
- //# sourceMappingURL=html.min.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../node_modules/@substrate-system/util/src/to-string.ts", "../src/html.ts"],
4
- "sourcesContent": ["/**\n * Transform an object into an HTML attributes string. The object should be\n * like `{ attributeName: value }`.\n *\n * @param attrs An object for the attributes.\n * @returns {string} A string suitable for use as HTML attributes.\n */\nexport function attributes (\n attrs:Record<string, undefined|null|string|number|boolean|(string|number)[]>\n):string {\n return Object.keys(attrs).reduce((acc, k) => {\n const value = attrs[k]\n if (!value) return acc\n\n if (typeof value === 'boolean') {\n if (value) return (acc + ` ${k}`).trim()\n return acc\n }\n\n if (Array.isArray(value)) {\n return (acc + ` ${k}=\"${value.join(' ')}\"`)\n }\n\n return (acc + ` ${k}=\"${value}\"`).trim()\n }, '')\n}\n", "import { attributes } from '@substrate-system/util/to-string'\n\n/**\n * HTML attributes as object\n */\nexport type Attrs = Partial<{\n id:string;\n class:string;\n disabled:string|true;\n autofocus:string|true;\n type:string;\n tabindex:number|string;\n value:string;\n required:boolean;\n placeholder:string|string[];\n name:string;\n autocomplete:string;\n}>\n\nexport function html (attrs:Attrs):string {\n return `<input ${attributes(attrs)} />`\n}\n"],
5
- "mappings": "sKAOO,SAASA,EACZC,EACK,CACL,OAAO,OAAO,KAAKA,CAAK,EAAE,OAAO,CAACC,EAAKC,IAAM,CACzC,IAAMC,EAAQH,EAAME,CAAC,EACrB,OAAKC,EAED,OAAOA,GAAU,UACbA,GAAeF,EAAM,IAAIC,CAAC,IAAI,KAAK,EAChCD,EAGP,MAAM,QAAQE,CAAK,EACXF,EAAM,IAAIC,CAAC,KAAKC,EAAM,KAAK,GAAG,CAAC,KAGnCF,EAAM,IAAIC,CAAC,KAAKC,CAAK,KAAK,KAAK,EAXpBF,CAYvB,EAAG,EAAE,CACT,CAlBgBG,EAAAL,EAAA,cAAAK,EAAAL,EAAA,YAAA,ECYT,SAASM,EAAMC,EAAoB,CACtC,MAAO,UAAUC,EAAWD,CAAK,CAAC,KACtC,CAFgBE,EAAAH,EAAA",
6
- "names": ["attributes", "attrs", "acc", "k", "value", "__name", "html", "attrs", "attributes", "__name"]
7
- }