ovr 7.0.0-next.35 → 7.0.0-next.36

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # ovr
2
2
 
3
+ ## 7.0.0-next.36
4
+
5
+ ### Minor Changes
6
+
7
+ - 9c1bfab: `Render.raw` and `Render.escape` name markup `markup`, where it was `html`, like `Render.markup`: `Render.raw({ markup, markdown })` and `Render.escape({ markup })`.
8
+
3
9
  ## 7.0.0-next.35
4
10
 
5
11
  ### Minor Changes
@@ -22,32 +22,32 @@ export declare namespace Render {
22
22
  /** Text to escape, by where it goes: one of them */
23
23
  type Escape = {
24
24
  /** Text for an element's content */
25
- readonly html: string;
25
+ readonly markup: string;
26
26
  readonly attr?: never;
27
27
  readonly markdown?: never;
28
28
  } | {
29
29
  /** Text for an attribute's value */
30
30
  readonly attr: string;
31
- readonly html?: never;
31
+ readonly markup?: never;
32
32
  readonly markdown?: never;
33
33
  } | {
34
34
  /** Text for Markdown */
35
35
  readonly markdown: string;
36
- readonly html?: never;
36
+ readonly markup?: never;
37
37
  readonly attr?: never;
38
38
  };
39
39
  /**
40
40
  * What is written as it is, for people, agents, or both. With only
41
- * `html`, agents get the HTML too, which Markdown can contain.
41
+ * `markup`, agents get the markup too, which Markdown can contain.
42
42
  */
43
43
  type Raw = {
44
44
  /** Safe markup the page shows */
45
- readonly html: unknown;
45
+ readonly markup: unknown;
46
46
  /** What agents reading the page as Markdown get in its place, empty for nothing */
47
47
  readonly markdown?: unknown;
48
48
  } | {
49
49
  /** Safe markup the page shows, nothing when left out */
50
- readonly html?: unknown;
50
+ readonly markup?: unknown;
51
51
  /** What agents reading the page as Markdown get */
52
52
  readonly markdown: unknown;
53
53
  };
@@ -67,10 +67,10 @@ export declare class Render {
67
67
  * escaping, so both must be safe.
68
68
  *
69
69
  * ```tsx
70
- * Render.raw({ html: icon }); // the page and agents get the markup
71
- * Render.raw({ html: render(steps), markdown: steps }); // each its own
70
+ * Render.raw({ markup: icon }); // the page and agents get the markup
71
+ * Render.raw({ markup: render(steps), markdown: steps }); // each its own
72
72
  * Render.raw({ markdown: " · " }); // only agents
73
- * Render.raw({ html: button, markdown: "" }); // only the page
73
+ * Render.raw({ markup: button, markdown: "" }); // only the page
74
74
  * ```
75
75
  *
76
76
  * @param raw Safe markup for the page, and what agents get in its place
@@ -82,12 +82,12 @@ export declare class Render {
82
82
  * yourself, such as what `Render.raw` is given.
83
83
  *
84
84
  * ```ts
85
- * Render.escape({ html: "a < b" }); // "a &lt; b"
85
+ * Render.escape({ markup: "a < b" }); // "a &lt; b"
86
86
  * Render.escape({ attr: 'say "hi"' }); // "say &quot;hi&quot;"
87
87
  * Render.escape({ markdown: "2 * 3" }); // "2 \\* 3"
88
88
  * ```
89
89
  *
90
- * @param text Text to escape, by where it goes: `html` for an element's
90
+ * @param text Text to escape, by where it goes: `markup` for an element's
91
91
  * content, `attr` for an attribute's value, or `markdown`
92
92
  * @returns Escaped text
93
93
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/render/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EACN,KAAK,IAAI,UAAU,EACnB,MAAM,IAAI,YAAY,EAEtB,MAAM,oBAAoB,CAAC;AAE5B,yBAAiB,MAAM,CAAC;IACvB,qEAAqE;IACrE,UAAiB,KAAM,SAAQ,UAAU;KAAG;IAE5C,+EAA+E;IAC/E,UAAiB,MAAO,SAAQ,YAAY;KAAG;IAE/C,UAAiB,MAAM,CAAC;QACvB,qBAAqB;QACrB,KAAY,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;KAC3C;IAED,iFAAiF;IACjF,UAAiB,QAAS,SAAQ,cAAc;KAAG;IAEnD,UA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18
- * Render.raw({ html: icon }); // the page and agents get the markup
19
- * Render.raw({ html: render(steps), markdown: steps }); // each its own
18
+ * Render.raw({ markup: icon }); // the page and agents get the markup
19
+ * Render.raw({ markup: render(steps), markdown: steps }); // each its own
20
20
  * Render.raw({ markdown: " · " }); // only agents
21
- * Render.raw({ html: button, markdown: "" }); // only the page
21
+ * Render.raw({ markup: button, markdown: "" }); // only the page
22
22
  * ```
23
23
  *
24
24
  * @param raw Safe markup for the page, and what agents get in its place
@@ -26,20 +26,20 @@ export class Render {
26
26
  */
27
27
  static raw(raw) {
28
28
  return raw.markdown === undefined
29
- ? new ChunkClass(raw.html, true)
30
- : new Source(raw.markdown, raw.html);
29
+ ? new ChunkClass(raw.markup, true)
30
+ : new Source(raw.markdown, raw.markup);
31
31
  }
32
32
  /**
33
33
  * Escapes text, as a render does, to put in markup or Markdown you write
34
34
  * yourself, such as what `Render.raw` is given.
35
35
  *
36
36
  * ```ts
37
- * Render.escape({ html: "a < b" }); // "a &lt; b"
37
+ * Render.escape({ markup: "a < b" }); // "a &lt; b"
38
38
  * Render.escape({ attr: 'say "hi"' }); // "say &quot;hi&quot;"
39
39
  * Render.escape({ markdown: "2 * 3" }); // "2 \\* 3"
40
40
  * ```
41
41
  *
42
- * @param text Text to escape, by where it goes: `html` for an element's
42
+ * @param text Text to escape, by where it goes: `markup` for an element's
43
43
  * content, `attr` for an attribute's value, or `markdown`
44
44
  * @returns Escaped text
45
45
  */
@@ -48,7 +48,7 @@ export class Render {
48
48
  ? MarkdownRender.escape(text.markdown)
49
49
  : text.attr !== undefined
50
50
  ? MarkupRender.escape(text.attr, true)
51
- : MarkupRender.escape(text.html);
51
+ : MarkupRender.escape(text.markup);
52
52
  }
53
53
  /**
54
54
  * Renders an element to markup, such as HTML, SVG, or XML.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ovr",
3
3
  "description": "Web apps anyone can use. Each route serves people a page and agents Markdown and MCP tools, with forms, Postgres, and passkey sign-in built in.",
4
- "version": "7.0.0-next.35",
4
+ "version": "7.0.0-next.36",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -30,37 +30,37 @@ export namespace Render {
30
30
  export type Escape =
31
31
  | {
32
32
  /** Text for an element's content */
33
- readonly html: string;
33
+ readonly markup: string;
34
34
  readonly attr?: never;
35
35
  readonly markdown?: never;
36
36
  }
37
37
  | {
38
38
  /** Text for an attribute's value */
39
39
  readonly attr: string;
40
- readonly html?: never;
40
+ readonly markup?: never;
41
41
  readonly markdown?: never;
42
42
  }
43
43
  | {
44
44
  /** Text for Markdown */
45
45
  readonly markdown: string;
46
- readonly html?: never;
46
+ readonly markup?: never;
47
47
  readonly attr?: never;
48
48
  };
49
49
 
50
50
  /**
51
51
  * What is written as it is, for people, agents, or both. With only
52
- * `html`, agents get the HTML too, which Markdown can contain.
52
+ * `markup`, agents get the markup too, which Markdown can contain.
53
53
  */
54
54
  export type Raw =
55
55
  | {
56
56
  /** Safe markup the page shows */
57
- readonly html: unknown;
57
+ readonly markup: unknown;
58
58
  /** What agents reading the page as Markdown get in its place, empty for nothing */
59
59
  readonly markdown?: unknown;
60
60
  }
61
61
  | {
62
62
  /** Safe markup the page shows, nothing when left out */
63
- readonly html?: unknown;
63
+ readonly markup?: unknown;
64
64
  /** What agents reading the page as Markdown get */
65
65
  readonly markdown: unknown;
66
66
  };
@@ -81,10 +81,10 @@ export class Render {
81
81
  * escaping, so both must be safe.
82
82
  *
83
83
  * ```tsx
84
- * Render.raw({ html: icon }); // the page and agents get the markup
85
- * Render.raw({ html: render(steps), markdown: steps }); // each its own
84
+ * Render.raw({ markup: icon }); // the page and agents get the markup
85
+ * Render.raw({ markup: render(steps), markdown: steps }); // each its own
86
86
  * Render.raw({ markdown: " · " }); // only agents
87
- * Render.raw({ html: button, markdown: "" }); // only the page
87
+ * Render.raw({ markup: button, markdown: "" }); // only the page
88
88
  * ```
89
89
  *
90
90
  * @param raw Safe markup for the page, and what agents get in its place
@@ -92,8 +92,8 @@ export class Render {
92
92
  */
93
93
  static raw(raw: Render.Raw): Render.Chunk {
94
94
  return raw.markdown === undefined
95
- ? new ChunkClass(raw.html, true)
96
- : new Source(raw.markdown, raw.html);
95
+ ? new ChunkClass(raw.markup, true)
96
+ : new Source(raw.markdown, raw.markup);
97
97
  }
98
98
 
99
99
  /**
@@ -101,12 +101,12 @@ export class Render {
101
101
  * yourself, such as what `Render.raw` is given.
102
102
  *
103
103
  * ```ts
104
- * Render.escape({ html: "a < b" }); // "a &lt; b"
104
+ * Render.escape({ markup: "a < b" }); // "a &lt; b"
105
105
  * Render.escape({ attr: 'say "hi"' }); // "say &quot;hi&quot;"
106
106
  * Render.escape({ markdown: "2 * 3" }); // "2 \\* 3"
107
107
  * ```
108
108
  *
109
- * @param text Text to escape, by where it goes: `html` for an element's
109
+ * @param text Text to escape, by where it goes: `markup` for an element's
110
110
  * content, `attr` for an attribute's value, or `markdown`
111
111
  * @returns Escaped text
112
112
  */
@@ -115,7 +115,7 @@ export class Render {
115
115
  ? MarkdownRender.escape(text.markdown)
116
116
  : text.attr !== undefined
117
117
  ? MarkupRender.escape(text.attr, true)
118
- : MarkupRender.escape(text.html);
118
+ : MarkupRender.escape(text.markup);
119
119
  }
120
120
 
121
121
  /**