routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
+104
View File
@@ -0,0 +1,104 @@
"use strict";
var __rest = this && this.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = align;
const primitives_js_1 = require("../primitives.cjs");
const util_js_1 = require("../util.cjs");
const zeroWidth = {
start: 0,
tag: 0,
type: 0,
name: 0
};
const getWidth = (markers = primitives_js_1.Markers) => (w, {
tokens: t
}) => ({
start: t.delimiter === markers.start ? t.start.length : w.start,
tag: Math.max(w.tag, t.tag.length),
type: Math.max(w.type, t.type.length),
name: Math.max(w.name, t.name.length)
});
const space = len => ''.padStart(len, ' ');
function align(markers = primitives_js_1.Markers) {
let intoTags = false;
let w;
function update(line) {
const tokens = Object.assign({}, line.tokens);
if (tokens.tag !== '') intoTags = true;
const isEmpty = tokens.tag === '' && tokens.name === '' && tokens.type === '' && tokens.description === '';
// dangling '*/'
if (tokens.end === markers.end && isEmpty) {
tokens.start = space(w.start + 1);
return Object.assign(Object.assign({}, line), {
tokens
});
}
switch (tokens.delimiter) {
case markers.start:
tokens.start = space(w.start);
break;
case markers.delim:
tokens.start = space(w.start + 1);
break;
default:
tokens.delimiter = '';
tokens.start = space(w.start + 2);
// compensate delimiter
}
if (!intoTags) {
tokens.postDelimiter = tokens.description === '' ? '' : ' ';
return Object.assign(Object.assign({}, line), {
tokens
});
}
const nothingAfter = {
delim: false,
tag: false,
type: false,
name: false
};
if (tokens.description === '') {
nothingAfter.name = true;
tokens.postName = '';
if (tokens.name === '') {
nothingAfter.type = true;
tokens.postType = '';
if (tokens.type === '') {
nothingAfter.tag = true;
tokens.postTag = '';
if (tokens.tag === '') {
nothingAfter.delim = true;
}
}
}
}
tokens.postDelimiter = nothingAfter.delim ? '' : ' ';
if (!nothingAfter.tag) tokens.postTag = space(w.tag - tokens.tag.length + 1);
if (!nothingAfter.type) tokens.postType = space(w.type - tokens.type.length + 1);
if (!nothingAfter.name) tokens.postName = space(w.name - tokens.name.length + 1);
return Object.assign(Object.assign({}, line), {
tokens
});
}
return _a => {
var {
source
} = _a,
fields = __rest(_a, ["source"]);
w = source.reduce(getWidth(markers), Object.assign({}, zeroWidth));
return (0, util_js_1.rewireSource)(Object.assign(Object.assign({}, fields), {
source: source.map(update)
}));
};
}
//# sourceMappingURL=align.cjs.map
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
import { Transform } from './index.js';
import { Markers } from '../primitives.js';
export default function align(markers?: typeof Markers): Transform;
+35
View File
@@ -0,0 +1,35 @@
"use strict";
var __rest = this && this.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = crlf;
const util_js_1 = require("../util.cjs");
const order = ['end', 'description', 'postType', 'type', 'postName', 'name', 'postTag', 'tag', 'postDelimiter', 'delimiter', 'start'];
function crlf(ending) {
function update(line) {
return Object.assign(Object.assign({}, line), {
tokens: Object.assign(Object.assign({}, line.tokens), {
lineEnd: ending === 'LF' ? '' : '\r'
})
});
}
return _a => {
var {
source
} = _a,
fields = __rest(_a, ["source"]);
return (0, util_js_1.rewireSource)(Object.assign(Object.assign({}, fields), {
source: source.map(update)
}));
};
}
//# sourceMappingURL=crlf.cjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"crlf.cjs","names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","defineProperty","exports","value","default","crlf","util_js_1","require","order","ending","update","line","assign","tokens","lineEnd","_a","source","fields","rewireSource","map"],"sources":["crlf.js"],"sourcesContent":["\"use strict\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = crlf;\nconst util_js_1 = require(\"../util.js\");\nconst order = [\n 'end',\n 'description',\n 'postType',\n 'type',\n 'postName',\n 'name',\n 'postTag',\n 'tag',\n 'postDelimiter',\n 'delimiter',\n 'start',\n];\nfunction crlf(ending) {\n function update(line) {\n return Object.assign(Object.assign({}, line), { tokens: Object.assign(Object.assign({}, line.tokens), { lineEnd: ending === 'LF' ? '' : '\\r' }) });\n }\n return (_a) => {\n var { source } = _a, fields = __rest(_a, [\"source\"]);\n return (0, util_js_1.rewireSource)(Object.assign(Object.assign({}, fields), { source: source.map(update) }));\n };\n}\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,MAAM,GAAI,IAAI,IAAI,IAAI,CAACA,MAAM,IAAK,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC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oB,MAAM,CAAC,CAAC,CAAC,EAAED,IAAI,CAACE,MAAM,CAAC,EAAE;QAAEC,OAAO,EAAEL,MAAM,KAAK,IAAI,GAAG,EAAE,GAAG;MAAK,CAAC;IAAE,CAAC,CAAC;EACtJ;EACA,OAAQM,EAAE,IAAK;IACX,IAAI;QAAEC;MAAO,CAAC,GAAGD,EAAE;MAAEE,MAAM,GAAG9B,MAAM,CAAC4B,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;IACpD,OAAO,CAAC,CAAC,EAAET,SAAS,CAACY,YAAY,EAAE1B,MAAM,CAACoB,MAAM,CAACpB,MAAM,CAACoB,MAAM,CAAC,CAAC,CAAC,EAAEK,MAAM,CAAC,EAAE;MAAED,MAAM,EAAEA,MAAM,CAACG,GAAG,CAACT,MAAM;IAAE,CAAC,CAAC,CAAC;EAChH,CAAC;AACL","ignoreList":[]}
+3
View File
@@ -0,0 +1,3 @@
import { Transform } from './index.js';
export type Ending = 'LF' | 'CRLF';
export default function crlf(ending: Ending): Transform;
+45
View File
@@ -0,0 +1,45 @@
"use strict";
var __rest = this && this.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = indent;
const util_js_1 = require("../util.cjs");
const pull = offset => str => str.slice(offset);
const push = offset => {
const space = ''.padStart(offset, ' ');
return str => str + space;
};
function indent(pos) {
let shift;
const pad = start => {
if (shift === undefined) {
const offset = pos - start.length;
shift = offset > 0 ? push(offset) : pull(-offset);
}
return shift(start);
};
const update = line => Object.assign(Object.assign({}, line), {
tokens: Object.assign(Object.assign({}, line.tokens), {
start: pad(line.tokens.start)
})
});
return _a => {
var {
source
} = _a,
fields = __rest(_a, ["source"]);
return (0, util_js_1.rewireSource)(Object.assign(Object.assign({}, fields), {
source: source.map(update)
}));
};
}
//# sourceMappingURL=indent.cjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"indent.cjs","names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","defineProperty","exports","value","default","indent","util_js_1","require","pull","offset","str","slice","push","space","padStart","pos","shift","pad","start","undefined","update","line","assign","tokens","_a","source","fields","rewireSource","map"],"sources":["indent.js"],"sourcesContent":["\"use strict\";\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = indent;\nconst util_js_1 = require(\"../util.js\");\nconst pull = (offset) => (str) => str.slice(offset);\nconst push = (offset) => {\n const space = ''.padStart(offset, ' ');\n return (str) => str + space;\n};\nfunction indent(pos) {\n let shift;\n const pad = (start) => {\n if (shift === undefined) {\n const offset = pos - start.length;\n shift = offset > 0 ? push(offset) : pull(-offset);\n }\n return shift(start);\n };\n const update = (line) => (Object.assign(Object.assign({}, line), { tokens: Object.assign(Object.assign({}, line.tokens), { start: pad(line.tokens.start) }) }));\n return (_a) => {\n var { source } = _a, fields = __rest(_a, [\"source\"]);\n return (0, util_js_1.rewireSource)(Object.assign(Object.assign({}, fields), { source: source.map(update) }));\n };\n}\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,MAAM,GAAI,IAAI,IAAI,IAAI,CAACA,MAAM,IAAK,UAAUC,CAAC,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AAQC,GAAG,IAAKA,GAAG,GAAGG,KAAK;AAC/B,CAAC;AACD,SAASR,MAAMA,CAACU,GAAG,EAAE;EACjB,IAAIC,KAAK;EACT,MAAMC,GAAG,GAAIC,KAAK,IAAK;IACnB,IAAIF,KAAK,KAAKG,SAAS,EAAE;MACrB,MAAMV,MAAM,GAAGM,GAAG,GAAGG,KAAK,CAACnB,MAAM;MACjCiB,KAAK,GAAGP,MAAM,GAAG,CAAC,GAAGG,IAAI,CAACH,MAAM,CAAC,GAAGD,IAAI,CAAC,CAACC,MAAM,CAAC;IACrD;IACA,OAAOO,KAAK,CAACE,KAAK,CAAC;EACvB,CAAC;EACD,MAAME,MAAM,GAAIC,IAAI,IAAM7B,MAAM,CAAC8B,MAAM,CAAC9B,MAAM,CAAC8B,MAAM,CAAC,CAAC,CAAC,EAAED,IAAI,CAAC,EAAE;IAAEE,MAAM,EAAE/B,MAAM,CAAC8B,MAAM,CAAC9B,MAAM,CAAC8B,MAAM,CAAC,CAAC,CAAC,EAAED,IAAI,CAACE,MAAM,CAAC,EAAE;MAAEL,KAAK,EAAED,GAAG,CAACI,IAAI,CAACE,MAAM,CAACL,KAAK;IAAE,CAAC;EAAE,CAAC,CAAE;EAC/J,OAAQM,EAAE,IAAK;IACX,IAAI;QAAEC;MAAO,CAAC,GAAGD,EAAE;MAAEE,MAAM,GAAGvC,MAAM,CAACqC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;IACpD,OAAO,CAAC,CAAC,EAAElB,SAAS,CAACqB,YAAY,EAAEnC,MAAM,CAAC8B,MAAM,CAAC9B,MAAM,CAAC8B,MAAM,CAAC,CAAC,CAAC,EAAEI,MAAM,CAAC,EAAE;MAAED,MAAM,EAAEA,MAAM,CAACG,GAAG,CAACR,MAAM;IAAE,CAAC,CAAC,CAAC;EAChH,CAAC;AACL","ignoreList":[]}
+2
View File
@@ -0,0 +1,2 @@
import { Transform } from './index.js';
export default function indent(pos: number): Transform;
+10
View File
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.flow = flow;
function flow(...transforms) {
return block => transforms.reduce((block, t) => t(block), block);
}
//# sourceMappingURL=index.cjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.cjs","names":["Object","defineProperty","exports","value","flow","transforms","block","reduce","t"],"sources":["index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flow = flow;\nfunction flow(...transforms) {\n return (block) => transforms.reduce((block, t) => t(block), block);\n}\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7DD,OAAO,CAACE,IAAI,GAAGA,IAAI;AACnB,SAASA,IAAIA,CAAC,GAAGC,UAAU,EAAE;EACzB,OAAQC,KAAK,IAAKD,UAAU,CAACE,MAAM,CAAC,CAACD,KAAK,EAAEE,CAAC,KAAKA,CAAC,CAACF,KAAK,CAAC,EAAEA,KAAK,CAAC;AACtE","ignoreList":[]}
+3
View File
@@ -0,0 +1,3 @@
import { Block } from '../primitives.js';
export type Transform = (Block: Block) => Block;
export declare function flow(...transforms: Transform[]): Transform;