@contentrain/types 1.58.0 → 1.60.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/README.md +60 -0
- package/dist/index.d.mts +291 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +340 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1387,6 +1387,7 @@ function validateProjectPlan(plan) {
|
|
|
1387
1387
|
if (chrome?.titleLinks !== void 0 && typeof chrome.titleLinks !== "boolean") errors.push("site.chrome.titleLinks is not a boolean");
|
|
1388
1388
|
if (chrome?.navLinks !== void 0 && typeof chrome.navLinks !== "boolean") errors.push("site.chrome.navLinks is not a boolean");
|
|
1389
1389
|
if (chrome?.parts !== void 0 && chrome.parts !== true) errors.push("site.chrome.parts is not true");
|
|
1390
|
+
if (chrome?.breadcrumbs !== void 0 && chrome.breadcrumbs !== "always") errors.push(`site.chrome.breadcrumbs ${String(chrome.breadcrumbs)} is not always`);
|
|
1390
1391
|
const header = chrome?.header;
|
|
1391
1392
|
if (header !== void 0) if (header === null || typeof header !== "object" || Array.isArray(header)) errors.push("site.chrome.header is not an object");
|
|
1392
1393
|
else {
|
|
@@ -1539,6 +1540,9 @@ function validateProjectPlan(plan) {
|
|
|
1539
1540
|
};
|
|
1540
1541
|
if (plan.layout?.header) placement(plan.layout.header, "layout header");
|
|
1541
1542
|
if (plan.layout?.footer) placement(plan.layout.footer, "layout footer");
|
|
1543
|
+
const overlays = plan.layout?.overlays;
|
|
1544
|
+
if (overlays !== void 0 && !Array.isArray(overlays)) errors.push("layout overlays is not a list");
|
|
1545
|
+
else overlays?.forEach((s, i) => placement(s, `layout overlay ${i}`));
|
|
1542
1546
|
const routeIds = /* @__PURE__ */ new Set();
|
|
1543
1547
|
const byModel = /* @__PURE__ */ new Map();
|
|
1544
1548
|
for (const r of plan.routes ?? []) {
|
|
@@ -1611,6 +1615,341 @@ function validateProjectPlan(plan) {
|
|
|
1611
1615
|
};
|
|
1612
1616
|
}
|
|
1613
1617
|
//#endregion
|
|
1618
|
+
//#region src/understand.ts
|
|
1619
|
+
/** The widths every template is rendered at; the widest is the reference outline. */
|
|
1620
|
+
const UNDERSTAND_WIDTHS = [
|
|
1621
|
+
390,
|
|
1622
|
+
768,
|
|
1623
|
+
1280
|
|
1624
|
+
];
|
|
1625
|
+
/** The width whose outline numbers the nodes (see `SlotRef.node`). */
|
|
1626
|
+
const UNDERSTAND_REFERENCE_WIDTH = 1280;
|
|
1627
|
+
const BAND_LANDMARKS = [
|
|
1628
|
+
"header",
|
|
1629
|
+
"nav",
|
|
1630
|
+
"main",
|
|
1631
|
+
"footer"
|
|
1632
|
+
];
|
|
1633
|
+
/**
|
|
1634
|
+
* What the capture did to a band before measuring it, so the still shows a settled state: a slider held at its first
|
|
1635
|
+
* slide, a counter at its final value, a lazy background loaded, a preloader removed, closed panels (accordion, tabs)
|
|
1636
|
+
* opened. A difference from the live page in such a band is a difference of state, and is reported as one.
|
|
1637
|
+
*/
|
|
1638
|
+
const SETTLED_STATES = [
|
|
1639
|
+
"slide0",
|
|
1640
|
+
"counter-final",
|
|
1641
|
+
"lazy-bg",
|
|
1642
|
+
"preloader-off",
|
|
1643
|
+
"panels-open"
|
|
1644
|
+
];
|
|
1645
|
+
const ARCHETYPES = [
|
|
1646
|
+
"header",
|
|
1647
|
+
"footer",
|
|
1648
|
+
"hero",
|
|
1649
|
+
"card-grid",
|
|
1650
|
+
"feature-split",
|
|
1651
|
+
"logo-strip",
|
|
1652
|
+
"stats",
|
|
1653
|
+
"testimonial",
|
|
1654
|
+
"faq",
|
|
1655
|
+
"cta-band",
|
|
1656
|
+
"pricing",
|
|
1657
|
+
"team",
|
|
1658
|
+
"gallery",
|
|
1659
|
+
"slider",
|
|
1660
|
+
"post-list",
|
|
1661
|
+
"contact-form",
|
|
1662
|
+
"timeline",
|
|
1663
|
+
"text",
|
|
1664
|
+
"other"
|
|
1665
|
+
];
|
|
1666
|
+
/** Archetypes that are nothing without their repeated items. */
|
|
1667
|
+
const ITEM_ARCHETYPES = [
|
|
1668
|
+
"card-grid",
|
|
1669
|
+
"logo-strip",
|
|
1670
|
+
"stats",
|
|
1671
|
+
"testimonial",
|
|
1672
|
+
"faq",
|
|
1673
|
+
"pricing",
|
|
1674
|
+
"team",
|
|
1675
|
+
"gallery",
|
|
1676
|
+
"slider",
|
|
1677
|
+
"timeline"
|
|
1678
|
+
];
|
|
1679
|
+
/**
|
|
1680
|
+
* Archetypes whose content is not in the band's nodes, so a region may hold no slot at all: `post-list` reads a
|
|
1681
|
+
* collection (its rendered cards only show which card fields the source uses), `contact-form` reads the detected
|
|
1682
|
+
* form, and `other` is the fallback.
|
|
1683
|
+
*/
|
|
1684
|
+
const SLOTLESS_ARCHETYPES = [
|
|
1685
|
+
"post-list",
|
|
1686
|
+
"contact-form",
|
|
1687
|
+
"other"
|
|
1688
|
+
];
|
|
1689
|
+
const one = (kind) => ({
|
|
1690
|
+
kind,
|
|
1691
|
+
many: false
|
|
1692
|
+
});
|
|
1693
|
+
const many = (kind) => ({
|
|
1694
|
+
kind,
|
|
1695
|
+
many: true
|
|
1696
|
+
});
|
|
1697
|
+
/** The slot vocabulary as data: a prompt, a schema and the validator all read these, so they cannot drift apart. */
|
|
1698
|
+
const REGION_SLOT_DEFS = {
|
|
1699
|
+
eyebrow: one("text"),
|
|
1700
|
+
heading: one("text"),
|
|
1701
|
+
lead: one("text"),
|
|
1702
|
+
body: many("text"),
|
|
1703
|
+
media: one("image"),
|
|
1704
|
+
actions: many("link"),
|
|
1705
|
+
logo: one("image"),
|
|
1706
|
+
nav: many("link"),
|
|
1707
|
+
utility: many("link"),
|
|
1708
|
+
social: many("link"),
|
|
1709
|
+
copyright: one("text")
|
|
1710
|
+
};
|
|
1711
|
+
const REGION_ITEM_SLOT_DEFS = {
|
|
1712
|
+
media: one("image"),
|
|
1713
|
+
icon: one("icon"),
|
|
1714
|
+
title: one("text"),
|
|
1715
|
+
text: one("text"),
|
|
1716
|
+
meta: one("text"),
|
|
1717
|
+
value: one("text"),
|
|
1718
|
+
link: one("link"),
|
|
1719
|
+
points: many("text"),
|
|
1720
|
+
links: many("link")
|
|
1721
|
+
};
|
|
1722
|
+
const REGION_GROUP_SLOT_DEFS = {
|
|
1723
|
+
title: one("text"),
|
|
1724
|
+
text: many("text"),
|
|
1725
|
+
links: many("link")
|
|
1726
|
+
};
|
|
1727
|
+
/** What a still capture cannot hold: the region shows one state of something that moves or opens. */
|
|
1728
|
+
const DYNAMIC_STATES = [
|
|
1729
|
+
"slider",
|
|
1730
|
+
"tabs",
|
|
1731
|
+
"accordion",
|
|
1732
|
+
"counter",
|
|
1733
|
+
"hover",
|
|
1734
|
+
"animation",
|
|
1735
|
+
"video",
|
|
1736
|
+
"embed"
|
|
1737
|
+
];
|
|
1738
|
+
/** A region's id: unique in a run, the value `sameAs` and `continues` hold. */
|
|
1739
|
+
function regionId(spec) {
|
|
1740
|
+
return `${spec.band}#${spec.part}`;
|
|
1741
|
+
}
|
|
1742
|
+
/** Below this confidence a region is not trusted to be its archetype. */
|
|
1743
|
+
const UNDERSTAND_MIN_CONFIDENCE = .5;
|
|
1744
|
+
/** The region is built as the styled fallback section (never as unstyled prose). */
|
|
1745
|
+
function needsFallback(spec) {
|
|
1746
|
+
return spec.archetype === "other" || !(spec.confidence >= .5);
|
|
1747
|
+
}
|
|
1748
|
+
const FIDELITIES = [
|
|
1749
|
+
"modern",
|
|
1750
|
+
"middle",
|
|
1751
|
+
"faithful"
|
|
1752
|
+
];
|
|
1753
|
+
const UNDERSTAND_ISSUE_CODES = [
|
|
1754
|
+
"bad_band",
|
|
1755
|
+
"unknown_band",
|
|
1756
|
+
"duplicate_region",
|
|
1757
|
+
"unknown_archetype",
|
|
1758
|
+
"bad_confidence",
|
|
1759
|
+
"unknown_slot",
|
|
1760
|
+
"bad_slot",
|
|
1761
|
+
"node_outside_band",
|
|
1762
|
+
"background_not_image",
|
|
1763
|
+
"slot_unresolved",
|
|
1764
|
+
"missing_items",
|
|
1765
|
+
"empty_region",
|
|
1766
|
+
"bad_ungrounded",
|
|
1767
|
+
"bad_dynamic",
|
|
1768
|
+
"bad_same_as",
|
|
1769
|
+
"bad_continues"
|
|
1770
|
+
];
|
|
1771
|
+
function isRecord(value) {
|
|
1772
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1773
|
+
}
|
|
1774
|
+
function isIndex(value) {
|
|
1775
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
1776
|
+
}
|
|
1777
|
+
function isBox(value) {
|
|
1778
|
+
return isRecord(value) && [value["x"], value["y"]].every((n) => typeof n === "number" && Number.isFinite(n)) && [value["w"], value["h"]].every((n) => typeof n === "number" && Number.isFinite(n) && n >= 0);
|
|
1779
|
+
}
|
|
1780
|
+
/**
|
|
1781
|
+
* Checks the facts side of the contract: unique ids, a box at the reference width, one order per band and node ranges
|
|
1782
|
+
* that do not overlap inside a template. Empty result: the bands are safe to hand to the understanding stage.
|
|
1783
|
+
*/
|
|
1784
|
+
function validateBands(bands) {
|
|
1785
|
+
const issues = [];
|
|
1786
|
+
const bad = (band, message) => issues.push({
|
|
1787
|
+
code: "bad_band",
|
|
1788
|
+
band,
|
|
1789
|
+
message
|
|
1790
|
+
});
|
|
1791
|
+
const ids = /* @__PURE__ */ new Set();
|
|
1792
|
+
const byTemplate = /* @__PURE__ */ new Map();
|
|
1793
|
+
for (const band of bands) {
|
|
1794
|
+
const id = typeof band.id === "string" ? band.id : "";
|
|
1795
|
+
if (!id || id.includes("#")) bad(id, "A band id is a non-empty string without \"#\".");
|
|
1796
|
+
else if (ids.has(id)) bad(id, "Two bands share this id.");
|
|
1797
|
+
ids.add(id);
|
|
1798
|
+
if (typeof band.template !== "string" || !band.template) bad(id, "A band names its template.");
|
|
1799
|
+
if (!isIndex(band.order)) bad(id, "A band's order is a whole number from 0.");
|
|
1800
|
+
if (!isRecord(band.boxes) || !isBox(band.boxes[1280])) bad(id, `A band has a box at ${UNDERSTAND_REFERENCE_WIDTH}.`);
|
|
1801
|
+
else if (Object.entries(band.boxes).some(([width, box]) => !UNDERSTAND_WIDTHS.includes(Number(width)) || !isBox(box))) bad(id, `A band's boxes are keyed by ${UNDERSTAND_WIDTHS.join(", ")}.`);
|
|
1802
|
+
if (!isRecord(band.nodes) || !isIndex(band.nodes.first) || !isIndex(band.nodes.last) || band.nodes.first > band.nodes.last) {
|
|
1803
|
+
bad(id, "A band's node range is two whole numbers, first ≤ last.");
|
|
1804
|
+
continue;
|
|
1805
|
+
}
|
|
1806
|
+
if (!isRecord(band.style)) bad(id, "A band carries its measured style (an empty object when nothing was measured).");
|
|
1807
|
+
if (band.settled !== void 0 && !(Array.isArray(band.settled) && band.settled.every((state) => SETTLED_STATES.includes(state)))) bad(id, `settled is a list of: ${SETTLED_STATES.join(", ")}.`);
|
|
1808
|
+
byTemplate.set(band.template, [...byTemplate.get(band.template) ?? [], band]);
|
|
1809
|
+
}
|
|
1810
|
+
for (const group of byTemplate.values()) {
|
|
1811
|
+
const orders = /* @__PURE__ */ new Map();
|
|
1812
|
+
for (const band of group) {
|
|
1813
|
+
const same = orders.get(band.order);
|
|
1814
|
+
if (same) bad(band.id, `Bands ${same.id} and ${band.id} share an order.`);
|
|
1815
|
+
else orders.set(band.order, band);
|
|
1816
|
+
}
|
|
1817
|
+
const byNodes = group.toSorted((a, b) => a.nodes.first - b.nodes.first);
|
|
1818
|
+
for (let i = 1; i < byNodes.length; i++) {
|
|
1819
|
+
const [prev, band] = [byNodes[i - 1], byNodes[i]];
|
|
1820
|
+
if (band.nodes.first <= prev.nodes.last) bad(band.id, `The node range overlaps band ${prev.id}'s.`);
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
return issues;
|
|
1824
|
+
}
|
|
1825
|
+
function isSlotRef(value) {
|
|
1826
|
+
return isRecord(value) && isIndex(value["node"]) && Object.keys(value).every((key) => key === "node" || key === "background" && (value[key] === true || value[key] === void 0));
|
|
1827
|
+
}
|
|
1828
|
+
/** Walks one slot holder in the table's order, so the visiting order never depends on the input's key order. */
|
|
1829
|
+
function walkHolder(holder, defs, prefix, nested, visit, problem) {
|
|
1830
|
+
const visitRef = (value, kind, path) => {
|
|
1831
|
+
if (isSlotRef(value)) visit(value, kind, path);
|
|
1832
|
+
else problem("bad_slot", path, "A slot is { node } with a whole-number node id, and at most background: true.");
|
|
1833
|
+
};
|
|
1834
|
+
for (const [name, def] of Object.entries(defs)) {
|
|
1835
|
+
const value = holder[name];
|
|
1836
|
+
if (value === void 0) continue;
|
|
1837
|
+
const path = `${prefix}${name}`;
|
|
1838
|
+
if (!def.many) visitRef(value, def.kind, path);
|
|
1839
|
+
else if (!Array.isArray(value)) problem("bad_slot", path, "This slot holds a list of refs.");
|
|
1840
|
+
else value.forEach((ref, i) => visitRef(ref, def.kind, `${path}.${i}`));
|
|
1841
|
+
}
|
|
1842
|
+
for (const name of Object.keys(holder)) if (!(name in defs) && !nested.includes(name) && holder[name] !== void 0) problem("unknown_slot", `${prefix}${name}`, "No such slot.");
|
|
1843
|
+
}
|
|
1844
|
+
function walkSlots(slots, visit, problem) {
|
|
1845
|
+
if (!isRecord(slots)) {
|
|
1846
|
+
problem("bad_slot", "slots", "A region's slots are an object.");
|
|
1847
|
+
return;
|
|
1848
|
+
}
|
|
1849
|
+
walkHolder(slots, REGION_SLOT_DEFS, "", ["items", "groups"], visit, problem);
|
|
1850
|
+
const lists = [["items", REGION_ITEM_SLOT_DEFS], ["groups", REGION_GROUP_SLOT_DEFS]];
|
|
1851
|
+
for (const [name, defs] of lists) {
|
|
1852
|
+
const list = slots[name];
|
|
1853
|
+
if (list === void 0) continue;
|
|
1854
|
+
if (!Array.isArray(list)) {
|
|
1855
|
+
problem("bad_slot", name, "This slot holds a list.");
|
|
1856
|
+
continue;
|
|
1857
|
+
}
|
|
1858
|
+
list.forEach((entry, i) => {
|
|
1859
|
+
if (!isRecord(entry) || Object.values(entry).every((value) => value === void 0)) problem("bad_slot", `${name}.${i}`, "An entry holds at least one slot.");
|
|
1860
|
+
else walkHolder(entry, defs, `${name}.${i}.`, [], visit, problem);
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
* Visits every ref of a region with its kind and its path (`heading`, `items.2.title`), in a fixed order: the region's
|
|
1866
|
+
* own slots, then its items, then its groups. Malformed slots are skipped; `validateRegionSpecs` reports them.
|
|
1867
|
+
*/
|
|
1868
|
+
function forEachSlot(spec, visit) {
|
|
1869
|
+
walkSlots(spec.slots, visit, () => {});
|
|
1870
|
+
}
|
|
1871
|
+
const SLOT_PATHS = new Set([
|
|
1872
|
+
...Object.keys(REGION_SLOT_DEFS),
|
|
1873
|
+
"items",
|
|
1874
|
+
...Object.keys(REGION_ITEM_SLOT_DEFS).map((name) => `items.${name}`),
|
|
1875
|
+
"groups",
|
|
1876
|
+
...Object.keys(REGION_GROUP_SLOT_DEFS).map((name) => `groups.${name}`)
|
|
1877
|
+
]);
|
|
1878
|
+
/** `items.2.icon` → `items.icon`. */
|
|
1879
|
+
function slotPathOf(path) {
|
|
1880
|
+
return path.split(".").filter((part) => !/^\d+$/.test(part)).join(".");
|
|
1881
|
+
}
|
|
1882
|
+
/**
|
|
1883
|
+
* The gate between the model and the engine. Every region must name a known band, a known archetype and slots from
|
|
1884
|
+
* the vocabulary; every ref must lie inside its band's node range and, when `resolves` is given, hold content of its
|
|
1885
|
+
* kind. A region with an issue must not reach the plan: it goes to `UnderstandRun.issues`, not to `specs`.
|
|
1886
|
+
*
|
|
1887
|
+
* Empty result: every region is safe to build from.
|
|
1888
|
+
*/
|
|
1889
|
+
function validateRegionSpecs(specs, bands, options = {}) {
|
|
1890
|
+
const issues = [];
|
|
1891
|
+
const bandById = new Map(bands.map((band) => [band.id, band]));
|
|
1892
|
+
const specById = /* @__PURE__ */ new Map();
|
|
1893
|
+
for (const spec of specs) {
|
|
1894
|
+
const id = regionId(spec);
|
|
1895
|
+
if (!specById.has(id)) specById.set(id, spec);
|
|
1896
|
+
}
|
|
1897
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1898
|
+
for (const spec of specs) {
|
|
1899
|
+
const band = bandById.get(spec.band);
|
|
1900
|
+
const add = (code, message, slot) => issues.push({
|
|
1901
|
+
code,
|
|
1902
|
+
band: String(spec.band),
|
|
1903
|
+
...isIndex(spec.part) ? { part: spec.part } : {},
|
|
1904
|
+
...slot === void 0 ? {} : { slot },
|
|
1905
|
+
message
|
|
1906
|
+
});
|
|
1907
|
+
if (!band) {
|
|
1908
|
+
add("unknown_band", "The region names a band that is not in the run.");
|
|
1909
|
+
continue;
|
|
1910
|
+
}
|
|
1911
|
+
const id = regionId(spec);
|
|
1912
|
+
if (!isIndex(spec.part)) add("duplicate_region", "A region's part is a whole number from 0.");
|
|
1913
|
+
else if (seen.has(id)) add("duplicate_region", "Two regions share this band and part.");
|
|
1914
|
+
seen.add(id);
|
|
1915
|
+
const known = ARCHETYPES.includes(spec.archetype);
|
|
1916
|
+
if (!known) add("unknown_archetype", `"${String(spec.archetype)}" is not an archetype.`);
|
|
1917
|
+
if (typeof spec.confidence !== "number" || !(spec.confidence >= 0 && spec.confidence <= 1)) add("bad_confidence", "Confidence is a number from 0 to 1.");
|
|
1918
|
+
let refs = 0;
|
|
1919
|
+
walkSlots(spec.slots, (ref, kind, path) => {
|
|
1920
|
+
refs++;
|
|
1921
|
+
if (ref.background && kind !== "image") add("background_not_image", "Only an image slot can read a background.", path);
|
|
1922
|
+
if (ref.node < band.nodes.first || ref.node > band.nodes.last) add("node_outside_band", `Node ${ref.node} is outside the band's nodes (${band.nodes.first}–${band.nodes.last}).`, path);
|
|
1923
|
+
else if (options.resolves && !options.resolves(ref, kind, band)) add("slot_unresolved", `Node ${ref.node} holds no ${kind}.`, path);
|
|
1924
|
+
}, (code, path, message) => {
|
|
1925
|
+
refs++;
|
|
1926
|
+
add(code, message, path);
|
|
1927
|
+
});
|
|
1928
|
+
if (known) {
|
|
1929
|
+
const items = isRecord(spec.slots) ? spec.slots["items"] : void 0;
|
|
1930
|
+
if (ITEM_ARCHETYPES.includes(spec.archetype) && !(Array.isArray(items) && items.length > 0)) add("missing_items", `A ${spec.archetype} needs at least one item.`, "items");
|
|
1931
|
+
else if (refs === 0 && !SLOTLESS_ARCHETYPES.includes(spec.archetype)) add("empty_region", `A ${spec.archetype} needs at least one slot.`);
|
|
1932
|
+
}
|
|
1933
|
+
if (!Array.isArray(spec.ungrounded)) add("bad_ungrounded", "ungrounded is a list of slot paths (empty when everything is grounded).");
|
|
1934
|
+
else for (const path of spec.ungrounded) if (typeof path !== "string" || !SLOT_PATHS.has(slotPathOf(path))) add("bad_ungrounded", `"${String(path)}" is not a slot path.`);
|
|
1935
|
+
if (spec.dynamic !== void 0 && !(Array.isArray(spec.dynamic) && spec.dynamic.every((state) => DYNAMIC_STATES.includes(state)))) add("bad_dynamic", `dynamic is a list of: ${DYNAMIC_STATES.join(", ")}.`);
|
|
1936
|
+
if (spec.sameAs !== void 0) {
|
|
1937
|
+
const target = specById.get(spec.sameAs);
|
|
1938
|
+
if (!target || spec.sameAs === id) add("bad_same_as", "sameAs names another region of the run.");
|
|
1939
|
+
else if (target.archetype !== spec.archetype) add("bad_same_as", "sameAs joins regions of one archetype.");
|
|
1940
|
+
else if (target.sameAs !== void 0) add("bad_same_as", "sameAs points at a region that has no sameAs itself.");
|
|
1941
|
+
}
|
|
1942
|
+
if (spec.continues !== void 0) {
|
|
1943
|
+
const target = specById.get(spec.continues);
|
|
1944
|
+
const targetBand = target && bandById.get(target.band);
|
|
1945
|
+
if (!target || !targetBand) add("bad_continues", "continues names another region of the run.");
|
|
1946
|
+
else if (targetBand.template !== band.template || !(targetBand.order < band.order)) add("bad_continues", "continues points at a region in an earlier band of the same template.");
|
|
1947
|
+
else if (target.archetype !== spec.archetype && target.archetype !== "text") add("bad_continues", "continues joins regions of one archetype, or carries on a text introduction.");
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
return issues;
|
|
1951
|
+
}
|
|
1952
|
+
//#endregion
|
|
1614
1953
|
//#region src/provider.ts
|
|
1615
1954
|
/** Capability set for the LocalProvider (simple-git + worktree). */
|
|
1616
1955
|
const LOCAL_CAPABILITIES = {
|
|
@@ -2685,6 +3024,6 @@ function serializeMarkdownFrontmatter(data, body) {
|
|
|
2685
3024
|
return lines.join("\n");
|
|
2686
3025
|
}
|
|
2687
3026
|
//#endregion
|
|
2688
|
-
export { APPROVAL_GATES, APPROVAL_MODES, CANONICAL_JSON, CAPABILITY_KEYS, CHROME_BODY_SLOT, CHROME_COMPONENT_CLOSE, CHROME_COMPONENT_OPEN, CHROME_IF_CLOSE, CHROME_IF_OPEN, CHROME_REPEAT_CLOSE, CHROME_REPEAT_OPEN, COMMENTS_EXPORT_FORMAT, COMPONENT_TYPES, CONTENTRAIN_BRANCH, CONTENTRAIN_DIR, DEFAULT_APPROVAL_POLICY, DICTIONARY_TITLE_FIELD, ENTRY_ID_PATTERN, EXECUTION_CONTRACT_VERSION, INTEGRATION_CATEGORIES, INTEGRATION_EVIDENCE_KINDS, LEGACY_CSS_LAYER, LIST_ITEMS_SLOT, LOCALE_PATTERN, LOCAL_CAPABILITIES, MIGRATE_ACCOUNT_STATES, MIGRATE_GRANT_STATES, MIGRATE_REVOKE_REASONS, MIGRATE_STUDIO_CLAIM_ALG, MIGRATE_STUDIO_CLAIM_AUDIENCE, MIGRATE_STUDIO_CLAIM_CLOCK_SKEW_SECONDS, MIGRATE_STUDIO_CLAIM_ISSUER, MIGRATE_STUDIO_CLAIM_MAX_TRIAL_DAYS, MIGRATE_STUDIO_CLAIM_MAX_TTL_SECONDS, MIGRATE_STUDIO_CLAIM_VERSION, MIGRATE_STUDIO_CLAIM_VERSION_2, MIGRATE_STUDIO_PLANS, MIGRATION_CONTRACT_VERSION, MIGRATION_HANDOFF_GOLDEN, MODEL_EXTENSION_KEYS, MODEL_FIELD_ORDER, PAGE_BODY_KINDS, PATH_PATTERNS, PLAN_BEHAVIOR_REASON, PLAN_SECTION_RULE, PLAN_STARTER_FEATURES, PLAN_TOKEN_ROLES, PLAN_VALUE_PATTERN, PROJECT_PLAN_FORMAT, RAW_MARK_SUFFIX, RESERVED_PATHS, RISK_CLASSES, RUN_STATUSES, SCHEDULE_KINDS, SECRET_PATTERNS, SEO_PROVIDERS, SLUG_PATTERN, SOURCE_ACCESS_LADDER, SOURCE_DELTA_OPS, TERMINAL_RUN_STATUSES, TEXT_CANDIDATE_KINDS, TEXT_EXCLUDE_REASONS, TITLE_FIELD_TYPES, approversFor, canonicalStringify, commentsExportSource, componentSlot, computePlanHash, conflictId, describeModelLocaleScope, detectSecrets, effectiveRisk, evaluateApproval, fieldDepth, footerMenusOf, generateEntryId, highestRisk, isMediaType, isMigrateStudioClaim, isRepoRelativePath, isReservedPath, isStoredMediaPath, isTerminalRunStatus, isTitleFieldType, looksLikeCredential, orderedFieldNames, parseFrontmatterScalar, parseFrontmatterScalarString, parseMarkdownFrontmatter, planHashPayload, requiredApprovals, resolveFieldLabel, resolveModelLocales, rewriteEntryMedia, rewriteFieldMedia, rewriteMarkdownMedia, rewriteMediaUrl, riskRank, sectionFieldName, serializeMarkdownFrontmatter, sortKeys, splitFrontmatterList, stableHash, titleFieldTarget, titleFieldValue, toDeliveryUrl, validateAccept, validateEntryId, validateFieldValue, validateHandoffCommentsExport, validateLocale, validateMigrateAccountStateRequest, validateMigrateAccountStateResponse, validateMigrateGrantStatusRequest, validateMigrateGrantStatusResponse, validateMigrateInstallUrlRequest, validateMigrateInstallUrlResponse, validateMigrateProvisionResponse, validateMigrateRevokeRequest, validateMigrateRevokeResponse, validateMigrateStudioClaim, validateMigrateStudioClaimAny, validateMigrateStudioClaimV2, validateModelLocales, validateProjectPlan, validateSemanticType, validateSlug };
|
|
3027
|
+
export { APPROVAL_GATES, APPROVAL_MODES, ARCHETYPES, BAND_LANDMARKS, CANONICAL_JSON, CAPABILITY_KEYS, CHROME_BODY_SLOT, CHROME_COMPONENT_CLOSE, CHROME_COMPONENT_OPEN, CHROME_IF_CLOSE, CHROME_IF_OPEN, CHROME_REPEAT_CLOSE, CHROME_REPEAT_OPEN, COMMENTS_EXPORT_FORMAT, COMPONENT_TYPES, CONTENTRAIN_BRANCH, CONTENTRAIN_DIR, DEFAULT_APPROVAL_POLICY, DICTIONARY_TITLE_FIELD, DYNAMIC_STATES, ENTRY_ID_PATTERN, EXECUTION_CONTRACT_VERSION, FIDELITIES, INTEGRATION_CATEGORIES, INTEGRATION_EVIDENCE_KINDS, ITEM_ARCHETYPES, LEGACY_CSS_LAYER, LIST_ITEMS_SLOT, LOCALE_PATTERN, LOCAL_CAPABILITIES, MIGRATE_ACCOUNT_STATES, MIGRATE_GRANT_STATES, MIGRATE_REVOKE_REASONS, MIGRATE_STUDIO_CLAIM_ALG, MIGRATE_STUDIO_CLAIM_AUDIENCE, MIGRATE_STUDIO_CLAIM_CLOCK_SKEW_SECONDS, MIGRATE_STUDIO_CLAIM_ISSUER, MIGRATE_STUDIO_CLAIM_MAX_TRIAL_DAYS, MIGRATE_STUDIO_CLAIM_MAX_TTL_SECONDS, MIGRATE_STUDIO_CLAIM_VERSION, MIGRATE_STUDIO_CLAIM_VERSION_2, MIGRATE_STUDIO_PLANS, MIGRATION_CONTRACT_VERSION, MIGRATION_HANDOFF_GOLDEN, MODEL_EXTENSION_KEYS, MODEL_FIELD_ORDER, PAGE_BODY_KINDS, PATH_PATTERNS, PLAN_BEHAVIOR_REASON, PLAN_SECTION_RULE, PLAN_STARTER_FEATURES, PLAN_TOKEN_ROLES, PLAN_VALUE_PATTERN, PROJECT_PLAN_FORMAT, RAW_MARK_SUFFIX, REGION_GROUP_SLOT_DEFS, REGION_ITEM_SLOT_DEFS, REGION_SLOT_DEFS, RESERVED_PATHS, RISK_CLASSES, RUN_STATUSES, SCHEDULE_KINDS, SECRET_PATTERNS, SEO_PROVIDERS, SETTLED_STATES, SLOTLESS_ARCHETYPES, SLUG_PATTERN, SOURCE_ACCESS_LADDER, SOURCE_DELTA_OPS, TERMINAL_RUN_STATUSES, TEXT_CANDIDATE_KINDS, TEXT_EXCLUDE_REASONS, TITLE_FIELD_TYPES, UNDERSTAND_ISSUE_CODES, UNDERSTAND_MIN_CONFIDENCE, UNDERSTAND_REFERENCE_WIDTH, UNDERSTAND_WIDTHS, approversFor, canonicalStringify, commentsExportSource, componentSlot, computePlanHash, conflictId, describeModelLocaleScope, detectSecrets, effectiveRisk, evaluateApproval, fieldDepth, footerMenusOf, forEachSlot, generateEntryId, highestRisk, isMediaType, isMigrateStudioClaim, isRepoRelativePath, isReservedPath, isStoredMediaPath, isTerminalRunStatus, isTitleFieldType, looksLikeCredential, needsFallback, orderedFieldNames, parseFrontmatterScalar, parseFrontmatterScalarString, parseMarkdownFrontmatter, planHashPayload, regionId, requiredApprovals, resolveFieldLabel, resolveModelLocales, rewriteEntryMedia, rewriteFieldMedia, rewriteMarkdownMedia, rewriteMediaUrl, riskRank, sectionFieldName, serializeMarkdownFrontmatter, sortKeys, splitFrontmatterList, stableHash, titleFieldTarget, titleFieldValue, toDeliveryUrl, validateAccept, validateBands, validateEntryId, validateFieldValue, validateHandoffCommentsExport, validateLocale, validateMigrateAccountStateRequest, validateMigrateAccountStateResponse, validateMigrateGrantStatusRequest, validateMigrateGrantStatusResponse, validateMigrateInstallUrlRequest, validateMigrateInstallUrlResponse, validateMigrateProvisionResponse, validateMigrateRevokeRequest, validateMigrateRevokeResponse, validateMigrateStudioClaim, validateMigrateStudioClaimAny, validateMigrateStudioClaimV2, validateModelLocales, validateProjectPlan, validateRegionSpecs, validateSemanticType, validateSlug };
|
|
2689
3028
|
|
|
2690
3029
|
//# sourceMappingURL=index.mjs.map
|