@telepath-computer/television 0.1.161 → 0.1.162

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.
Files changed (2) hide show
  1. package/dist/cli.cjs +196 -13
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -49780,6 +49780,199 @@ function bridgeScriptSource() {
49780
49780
  return `(function(){const __name=(target)=>target;(${installBridge.toString()})(window);})();`;
49781
49781
  }
49782
49782
 
49783
+ // ../server/src/markdown-doc-style.ts
49784
+ var MARKDOWN_DOC_CSS = (
49785
+ /* css */
49786
+ `
49787
+ /*
49788
+ * The canonical stylesheet intentionally leaves page-level padding to each
49789
+ * artifact's own HTML. Server-rendered markdown has no authored wrapper, so
49790
+ * supply the editor's document padding here. The editor sets no
49791
+ * letter-spacing; the canonical body sets 0.015em \u2014 reset it to match.
49792
+ */
49793
+ body {
49794
+ padding: 1.5rem 1rem;
49795
+ letter-spacing: normal;
49796
+ }
49797
+
49798
+ /*
49799
+ * Headings: the editor renders heading bodies at the host line-height
49800
+ * (--leading-base), not the canonical 1.25. Markdown spacing is the normal
49801
+ * collapsed-blank-line rhythm; the canonical sheet already gives block
49802
+ * elements a top/bottom margin and an h*-adjacent-sibling top margin, so we
49803
+ * only add the heading's OWN top margin and zero the first child's so the doc
49804
+ * doesn't open with a gap.
49805
+ */
49806
+ h1, h2, h3, h4, h5, h6 {
49807
+ line-height: var(--leading-base);
49808
+ margin-top: var(--space-16);
49809
+ }
49810
+
49811
+ :is(h1, h2, h3, h4, h5, h6):first-child {
49812
+ margin-top: 0;
49813
+ }
49814
+
49815
+ /* Links: muted grey + underline, matching the editor's rendered link ink. */
49816
+ a {
49817
+ color: rgba(0, 0, 0, 0.55);
49818
+ text-decoration: underline;
49819
+ }
49820
+
49821
+ /* Bold text: the editor uses 600, not the browser-default 700. */
49822
+ strong, b {
49823
+ font-weight: 600;
49824
+ }
49825
+
49826
+ /*
49827
+ * List markers \u2014 a two-column layout. The editor draws bullets / numbers as
49828
+ * muted-grey glyphs and a task checkbox. Rupert's spec: render every list as a
49829
+ * fixed-width MARKER column (a left gutter) plus a single TEXT column, where
49830
+ * - bullets, ordered numbers AND task checkboxes all sit HORIZONTALLY CENTRED
49831
+ * within the gutter, forming one clean aligned column regardless of glyph
49832
+ * width (bullet vs 1. vs 10. vs a checkbox), and
49833
+ * - ALL item text starts at the same x \u2014 across bullet, numbered and task
49834
+ * lists, tight AND loose (blank-line-separated), incl. multi-digit numbers.
49835
+ *
49836
+ * Mechanism. Suppress native markers (list-style: none) and zero the engine's
49837
+ * list padding, then give each <li> a left padding of GUTTER (the marker
49838
+ * column width). The glyph markers are hand-drawn on li::before as an
49839
+ * inline-block of the FULL gutter width, pulled back into the gutter with an
49840
+ * equal negative left margin and centred (text-align: center). Because the
49841
+ * pseudo is the full column width, its glyph centres in the column no matter
49842
+ * how wide the glyph is; because it's inline it baseline-aligns with the first
49843
+ * text line for free (no vertical hack). The content always begins at the
49844
+ * padding edge \u2014 one shared x for every list type.
49845
+ *
49846
+ * Ordered numbers come from a CSS counter (counter-reset on the ol,
49847
+ * counter-increment per li) rather than native ::marker, so they obey the same
49848
+ * ::before centring. start=N is deliberately NOT honoured \u2014 a plain counter
49849
+ * renumbering from 1 is fine per spec; the simplicity is worth it.
49850
+ *
49851
+ * GUTTER is the --md-gutter custom property below; defined once and reused for
49852
+ * the li padding, the ::before column width and pull-back margin, and the
49853
+ * checkbox offset. 1.8em is wide enough for a checkbox plus its gap and a
49854
+ * two-digit number without overflow or collision.
49855
+ */
49856
+ ul, ol {
49857
+ --md-gutter: 1.8em;
49858
+ padding-left: 0;
49859
+ list-style: none;
49860
+ }
49861
+
49862
+ ol {
49863
+ counter-reset: md-ol;
49864
+ }
49865
+
49866
+ li {
49867
+ position: relative;
49868
+ padding-left: var(--md-gutter);
49869
+ }
49870
+
49871
+ li::before {
49872
+ content: "\u2022";
49873
+ display: inline-block;
49874
+ width: var(--md-gutter);
49875
+ margin-left: calc(-1 * var(--md-gutter));
49876
+ text-align: center;
49877
+ color: rgba(0, 0, 0, 0.4);
49878
+ }
49879
+
49880
+ ol > li {
49881
+ counter-increment: md-ol;
49882
+ }
49883
+
49884
+ ol > li::before {
49885
+ content: counter(md-ol) ".";
49886
+ }
49887
+
49888
+ /*
49889
+ * Loose lists: marked wraps each item's body in a <p>. Rendering that leading
49890
+ * <p> inline keeps the item's first line of text on the marker's baseline row
49891
+ * (a block <p> establishes its own line box that the inline ::before marker
49892
+ * would otherwise sit above, on its own line). Inlining it makes loose items
49893
+ * lay out exactly like tight ones. Only the first paragraph is inlined; a
49894
+ * genuinely multi-paragraph item keeps its later <p>s as blocks.
49895
+ */
49896
+ li > p:first-child {
49897
+ display: inline;
49898
+ }
49899
+
49900
+ /*
49901
+ * Inline code only (:not(pre) > code). The canonical sheet styles all
49902
+ * <code>; the editor tones inline code to a lighter wash at 0.92em. Fenced
49903
+ * pre code is handled below.
49904
+ */
49905
+ :not(pre) > code {
49906
+ background: rgba(0, 0, 0, 0.06);
49907
+ font-size: 0.92em;
49908
+ padding: 1px 4px;
49909
+ border-radius: 3px;
49910
+ }
49911
+
49912
+ /*
49913
+ * Fenced code. The editor renders code blocks on a faint wash. Keep it a
49914
+ * normal box (the editor doesn't render a bordered block, but a plain padded
49915
+ * box reads cleanly for the static doc). Reset pre code font-size to inherit
49916
+ * so the 0.92em on <pre> doesn't compound with the canonical <code> 0.9em.
49917
+ */
49918
+ pre {
49919
+ background: rgba(0, 0, 0, 0.04);
49920
+ font-size: 0.92em;
49921
+ }
49922
+
49923
+ pre code {
49924
+ font-size: inherit;
49925
+ }
49926
+
49927
+ /* Blockquote: editor's grey border + muted text, with its indent. */
49928
+ blockquote {
49929
+ border-left: 3px solid rgba(0, 0, 0, 0.2);
49930
+ color: rgba(0, 0, 0, 0.55);
49931
+ padding-left: 1rem;
49932
+ margin-left: 0.25rem;
49933
+ }
49934
+
49935
+ /* Horizontal rule: a single hairline in the same grey as the rest of the ink. */
49936
+ hr {
49937
+ border: none;
49938
+ border-top: 1px solid rgba(0, 0, 0, 0.2);
49939
+ }
49940
+
49941
+ /*
49942
+ * Task lists. marked 17 emits a disabled native checkbox with no class, so we
49943
+ * match on structure. The checkbox is the first child of the <li> when the list
49944
+ * is tight (<li><input>\u2026) and the first child of the wrapping <p> when it's
49945
+ * loose (<li><p><input>\u2026); the two :has() selectors cover both. Suppress the
49946
+ * hand-drawn ::before glyph on those items so only the checkbox shows in the
49947
+ * marker column.
49948
+ *
49949
+ * The checkbox is a REPLACED element, so the ::before inline-block trick (width
49950
+ * = full column, glyph centred) can't apply \u2014 sizing an <input> resizes the
49951
+ * box. Instead take it out of inline flow (position: absolute against the
49952
+ * relative <li>) and CENTRE it in the gutter geometrically: anchor its centre
49953
+ * at half the gutter width from the left (left: calc(var(--md-gutter) / 2)) and
49954
+ * at the vertical centre of the first text line (top: 0.5lh \u2014 half the actual
49955
+ * computed line box, so it tracks any line-height/theme change rather than
49956
+ * assuming the canonical 1.5), then pull it back onto those points with
49957
+ * translate(-50%, -50%). Out of flow, it never occupies the content box, so
49958
+ * task text still starts at the shared padding edge; its centre lands on the
49959
+ * same column as the bullet / number markers and on its own first text line.
49960
+ */
49961
+ li:has(> input[type="checkbox"])::before,
49962
+ li:has(> p > input[type="checkbox"])::before {
49963
+ content: none;
49964
+ }
49965
+
49966
+ li input[type="checkbox"] {
49967
+ position: absolute;
49968
+ left: calc(var(--md-gutter) / 2);
49969
+ top: 0.5lh;
49970
+ transform: translate(-50%, -50%);
49971
+ margin: 0;
49972
+ }
49973
+ `
49974
+ );
49975
+
49783
49976
  // ../server/src/artifact-proxy.ts
49784
49977
  var HTTP_OK2 = 200;
49785
49978
  var HTTP_MOVED_PERMANENTLY = 301;
@@ -49894,17 +50087,7 @@ function markdownDocument(renderedHTML) {
49894
50087
  <meta charset="utf-8">
49895
50088
  <meta name="viewport" content="width=device-width, initial-scale=1">
49896
50089
  <link rel="stylesheet" href="/canonical/v1/styles.css">
49897
- <style>
49898
- /*
49899
- * The canonical stylesheet intentionally leaves page-level padding to
49900
- * each artifact's own HTML. Server-rendered markdown has no authored
49901
- * wrapper, so supply that page padding here (token from the canonical
49902
- * stylesheet, with a px fallback matching the house examples).
49903
- */
49904
- body {
49905
- padding: var(--space-32, 32px);
49906
- }
49907
- </style>
50090
+ <style>${MARKDOWN_DOC_CSS}</style>
49908
50091
  </head>
49909
50092
  <body>
49910
50093
  ${renderedHTML}
@@ -52430,8 +52613,8 @@ function resolveVercelSkillsInstallerBin() {
52430
52613
  return localRequire.resolve("skills/bin/cli.mjs");
52431
52614
  }
52432
52615
  function readCLIVersion() {
52433
- if ("0.1.161".length > 0) {
52434
- return "0.1.161";
52616
+ if ("0.1.162".length > 0) {
52617
+ return "0.1.162";
52435
52618
  }
52436
52619
  const devPackageJsonPath = import_node_path12.default.join(getDevPackageDir(), "package.json");
52437
52620
  if (!(0, import_node_fs10.existsSync)(devPackageJsonPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telepath-computer/television",
3
- "version": "0.1.161",
3
+ "version": "0.1.162",
4
4
  "type": "module",
5
5
  "main": "dist/cli.cjs",
6
6
  "bin": {