linegauge 0.0.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 ADDED
@@ -0,0 +1,22 @@
1
+ # linegauge
2
+
3
+ **Not yet released, and not yet on the roadmap.** This version reserves the name. The layer,
4
+ its incumbents and the measurements behind it are documented in
5
+ [`.sdlc/research/candidate-layers.md`](https://github.com/ofri-peretz/burgee/blob/main/.sdlc/research/candidate-layers.md).
6
+ An intent and a working release follow if and when the roadmap takes it up.
7
+
8
+ A **line gauge** is the printer's ruler — the steel rule marked in picas and points that a compositor uses to measure a line of type and check it fits the measure it was set to.
9
+
10
+ That is this package's whole job. Width, wrap, truncate and slice are one problem wearing four names: **cutting styled text without letting the edge come apart** — no dangling escape sequence, no half a grapheme, no severed emoji cluster.
11
+
12
+ ## What it will be
13
+
14
+ - **One package, not eleven.** `width` · `wrap` · `truncate` · `slice` · `strip` · `widest`. The incumbents split this across `string-width`, `wrap-ansi`, `strip-ansi`, `slice-ansi`, `cli-truncate`, `widest-line`, `string-length`, `wcwidth`, `eastasianwidth` and `get-east-asian-width`.
15
+ - **Grapheme-correct by construction.** ZWJ families, regional-indicator flags, skin-tone modifiers, keycaps, combining marks and East Asian wide characters, over the platform's own `Intl.Segmenter`.
16
+ - **Fast path for ASCII.** A byte scan when the string has no non-ASCII code unit; the segmenter only when it earns its cost.
17
+ - **Drop-in paths** for `string-width`, `wrap-ansi`, `strip-ansi` and `slice-ansi`, graded by their own suites.
18
+ - **Zero external dependencies.**
19
+
20
+ ## Licence
21
+
22
+ MIT
@@ -0,0 +1,7 @@
1
+ /**
2
+ * linegauge — name reserved, not yet on the roadmap. The layer and the measurements
3
+ * behind it are documented in .sdlc/research/candidate-layers.md in the burgee
4
+ * repository. Until an intent is opened this entry exports only its own name, so
5
+ * that importing it costs nothing and promises nothing.
6
+ */
7
+ export declare const name: "linegauge";
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * linegauge — name reserved, not yet on the roadmap. The layer and the measurements
3
+ * behind it are documented in .sdlc/research/candidate-layers.md in the burgee
4
+ * repository. Until an intent is opened this entry exports only its own name, so
5
+ * that importing it costs nothing and promises nothing.
6
+ */
7
+ export const name = 'linegauge';
8
+ //# sourceMappingURL=index.js.map
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "linegauge",
3
+ "version": "0.0.1",
4
+ "description": "The width of material a saw removes in a cut. Measuring, wrapping, truncating and slicing styled terminal text without the edge fraying \u2014 grapheme-correct over Intl.Segmenter. Drop-in paths for string-width, wrap-ansi, strip-ansi and slice-ansi. Zero dependencies.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=24"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "!dist/**/*.map",
20
+ "!dist/**/*.test.*"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.build.json",
24
+ "typecheck": "tsc -p tsconfig.json --noEmit",
25
+ "test": "vitest run --passWithNoTests",
26
+ "lint": "eslint src"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/ofri-peretz/burgee.git",
31
+ "directory": "packages/linegauge"
32
+ },
33
+ "homepage": "https://github.com/ofri-peretz/burgee/tree/main/packages/linegauge#readme",
34
+ "bugs": {
35
+ "url": "https://github.com/ofri-peretz/burgee/issues"
36
+ },
37
+ "keywords": [
38
+ "cli",
39
+ "terminal",
40
+ "string-width",
41
+ "wrap-ansi",
42
+ "strip-ansi",
43
+ "slice-ansi",
44
+ "truncate",
45
+ "wrap",
46
+ "width",
47
+ "grapheme",
48
+ "ansi",
49
+ "unicode"
50
+ ],
51
+ "devDependencies": {
52
+ "vitest": "^4.0.0"
53
+ }
54
+ }