brumate 0.1.1 → 0.3.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.
Files changed (136) hide show
  1. package/dist/{boot-DN1ZU8Hg.d.ts → boot-C25Sa6vq.d.ts} +27 -2
  2. package/dist/cli.js +2 -2
  3. package/dist/client-BD6XT-s5.js +1968 -0
  4. package/dist/client-BD6XT-s5.js.map +1 -0
  5. package/dist/{client-DwJInP_a.d.ts → client-D0CqSxoO.d.ts} +211 -30
  6. package/dist/{client-routes-DakuM32C.js → client-routes-JTbGtukf.js} +28 -15
  7. package/dist/client-routes-JTbGtukf.js.map +1 -0
  8. package/dist/context-CTiSzQRc.js +27 -0
  9. package/dist/context-CTiSzQRc.js.map +1 -0
  10. package/dist/context-btHuB01Z.d.ts +42 -0
  11. package/dist/{cookies-Av5WFmcf.js → cookies-BzllthiF.js} +2 -1
  12. package/dist/cookies-BzllthiF.js.map +1 -0
  13. package/dist/defer-BbD7JQhj.js +56 -0
  14. package/dist/defer-BbD7JQhj.js.map +1 -0
  15. package/dist/devtools-CQgD7NPB.js +623 -0
  16. package/dist/devtools-CQgD7NPB.js.map +1 -0
  17. package/dist/devtools-panel-BVB-W5q4.js +1930 -0
  18. package/dist/devtools-panel-BVB-W5q4.js.map +1 -0
  19. package/dist/events-CSs7OwIC.js +85 -0
  20. package/dist/events-CSs7OwIC.js.map +1 -0
  21. package/dist/{files-DdT84mPy.js → files-BXSSrQgc.js} +34 -6
  22. package/dist/files-BXSSrQgc.js.map +1 -0
  23. package/dist/forms-Bg-CwGqX.js +406 -0
  24. package/dist/forms-Bg-CwGqX.js.map +1 -0
  25. package/dist/forms-Cl21hkHt.d.ts +281 -0
  26. package/dist/highlight.d.ts +17 -0
  27. package/dist/highlight.js +269 -0
  28. package/dist/highlight.js.map +1 -0
  29. package/dist/html-Bq1rFxX_.d.ts +92 -0
  30. package/dist/html-mNTKzaDD.js +241 -0
  31. package/dist/html-mNTKzaDD.js.map +1 -0
  32. package/dist/index.d.ts +123 -30
  33. package/dist/index.js +14 -6
  34. package/dist/index.js.map +1 -1
  35. package/dist/{inspect-BPchdWbU.js → inspect-BHpOw1LF.js} +1400 -121
  36. package/dist/inspect-BHpOw1LF.js.map +1 -0
  37. package/dist/{loader-Dc9OwY5I.js → loader-Dos_3NP0.js} +47 -11
  38. package/dist/loader-Dos_3NP0.js.map +1 -0
  39. package/dist/{navigate-CzLjnoPH.js → navigate-O78d_zGN.js} +115 -13
  40. package/dist/navigate-O78d_zGN.js.map +1 -0
  41. package/dist/produce-D0V0ICkz.d.ts +114 -0
  42. package/dist/produce-Doc91GkX.js +274 -0
  43. package/dist/produce-Doc91GkX.js.map +1 -0
  44. package/dist/routes-BZNt7DSZ.d.ts +38 -0
  45. package/dist/{rpc-9fSqL_YK.js → rpc-ygMRPmN4.js} +39 -23
  46. package/dist/rpc-ygMRPmN4.js.map +1 -0
  47. package/dist/runtime/batch.d.ts +23 -0
  48. package/dist/runtime/batch.js +69 -0
  49. package/dist/runtime/batch.js.map +1 -0
  50. package/dist/runtime/client.d.ts +5 -5
  51. package/dist/runtime/client.js +5 -1345
  52. package/dist/runtime/context.d.ts +2 -2
  53. package/dist/runtime/context.js +1 -1
  54. package/dist/runtime/devtools.d.ts +191 -5
  55. package/dist/runtime/devtools.js +1 -1
  56. package/dist/runtime/env.d.ts +44 -0
  57. package/dist/runtime/env.js +61 -0
  58. package/dist/runtime/env.js.map +1 -0
  59. package/dist/runtime/events.d.ts +42 -0
  60. package/dist/runtime/events.js +1 -0
  61. package/dist/runtime/forms.d.ts +2 -0
  62. package/dist/runtime/forms.js +1 -0
  63. package/dist/runtime/gather.d.ts +25 -0
  64. package/dist/runtime/gather.js +33 -0
  65. package/dist/runtime/gather.js.map +1 -0
  66. package/dist/runtime/hot.d.ts +1 -1
  67. package/dist/runtime/html.d.ts +2 -2
  68. package/dist/runtime/html.js +1 -1
  69. package/dist/runtime/loader.d.ts +2 -2
  70. package/dist/runtime/loader.js +2 -2
  71. package/dist/runtime/routes.d.ts +2 -21
  72. package/dist/runtime/routes.js +31 -1
  73. package/dist/runtime/routes.js.map +1 -1
  74. package/dist/runtime/server.d.ts +7 -5
  75. package/dist/runtime/server.js +6 -7
  76. package/dist/runtime/signals.d.ts +60 -3
  77. package/dist/runtime/signals.js +40 -2
  78. package/dist/runtime/signals.js.map +1 -1
  79. package/dist/runtime/static-loader.d.ts +2 -2
  80. package/dist/runtime/static-loader.js +1 -1
  81. package/dist/runtime/testing.d.ts +46 -5
  82. package/dist/runtime/testing.js +240 -33
  83. package/dist/runtime/testing.js.map +1 -1
  84. package/dist/runtime/values.d.ts +2 -0
  85. package/dist/runtime/values.js +24 -0
  86. package/dist/runtime/values.js.map +1 -0
  87. package/dist/secrets-BxagsJxJ.js +23 -0
  88. package/dist/secrets-BxagsJxJ.js.map +1 -0
  89. package/dist/server-CxVDYE_V.js +3417 -0
  90. package/dist/server-CxVDYE_V.js.map +1 -0
  91. package/dist/server-DuFYRXrd.d.ts +1460 -0
  92. package/dist/skew-FRmAy9iy.js +49 -0
  93. package/dist/skew-FRmAy9iy.js.map +1 -0
  94. package/dist/standard-schema-BNY82yX3.d.ts +63 -0
  95. package/dist/{static-loader-BcFh4ebX.d.ts → static-loader-Drpr0AzI.d.ts} +2 -2
  96. package/dist/static-loader-nZssh66R.js +333 -0
  97. package/dist/static-loader-nZssh66R.js.map +1 -0
  98. package/dist/stream-DCYZO4IF.js +424 -0
  99. package/dist/stream-DCYZO4IF.js.map +1 -0
  100. package/dist/values-B8C7CLvG.d.ts +63 -0
  101. package/dist/vite.d.ts +49 -1
  102. package/dist/vite.js +598 -68
  103. package/dist/vite.js.map +1 -1
  104. package/forms/forms.brm.ts +141 -0
  105. package/package.json +45 -3
  106. package/types.d.ts +9 -1
  107. package/dist/client-routes-DakuM32C.js.map +0 -1
  108. package/dist/context-BG8KCF3v.js +0 -15
  109. package/dist/context-BG8KCF3v.js.map +0 -1
  110. package/dist/context-aeo9esY9.d.ts +0 -16
  111. package/dist/cookies-Av5WFmcf.js.map +0 -1
  112. package/dist/devtools-BKjnHrnv.js +0 -113
  113. package/dist/devtools-BKjnHrnv.js.map +0 -1
  114. package/dist/devtools-panel-AWOn0VK2.js +0 -434
  115. package/dist/devtools-panel-AWOn0VK2.js.map +0 -1
  116. package/dist/files-DdT84mPy.js.map +0 -1
  117. package/dist/html-DEeoepg3.js +0 -152
  118. package/dist/html-DEeoepg3.js.map +0 -1
  119. package/dist/html-Du8jY2Cc.d.ts +0 -53
  120. package/dist/inspect-BPchdWbU.js.map +0 -1
  121. package/dist/loader-Dc9OwY5I.js.map +0 -1
  122. package/dist/navigate-CzLjnoPH.js.map +0 -1
  123. package/dist/produce-BRGHP7e0.js +0 -126
  124. package/dist/produce-BRGHP7e0.js.map +0 -1
  125. package/dist/produce-CtZ32UGG.d.ts +0 -60
  126. package/dist/rpc-9fSqL_YK.js.map +0 -1
  127. package/dist/runtime/client.js.map +0 -1
  128. package/dist/server-BxqjLUnV.d.ts +0 -753
  129. package/dist/server-DZsgnPKS.js +0 -1615
  130. package/dist/server-DZsgnPKS.js.map +0 -1
  131. package/dist/shared-CWYOd0H3.js +0 -40
  132. package/dist/shared-CWYOd0H3.js.map +0 -1
  133. package/dist/static-loader-ClNkHZGn.js +0 -185
  134. package/dist/static-loader-ClNkHZGn.js.map +0 -1
  135. package/dist/stream-bgNCMcaA.js +0 -280
  136. package/dist/stream-bgNCMcaA.js.map +0 -1
@@ -1,152 +0,0 @@
1
- //#region src/runtime/html.ts
2
- const RAW = Symbol.for("brumate.raw");
3
- var RawHTML = class {
4
- [RAW];
5
- constructor(html) {
6
- this[RAW] = html;
7
- }
8
- };
9
- function raw(html) {
10
- return new RawHTML(html);
11
- }
12
- function isRaw(value) {
13
- return typeof value === "object" && value !== null && RAW in value;
14
- }
15
- function rawHTML(value) {
16
- return value[RAW];
17
- }
18
- const ESCAPES = {
19
- "&": "&",
20
- "<": "&lt;",
21
- ">": "&gt;",
22
- "\"": "&quot;"
23
- };
24
- const toEscape = (char) => ESCAPES[char];
25
- function escape(value) {
26
- return /[&<>]/.test(value) ? value.replace(/[&<>]/g, toEscape) : value;
27
- }
28
- function escapeAttribute(value) {
29
- return /[&<"]/.test(value) ? value.replace(/[&<"]/g, toEscape) : value;
30
- }
31
- /** Renders a value inserted in markup. Promises are not awaited. */
32
- function insertValue(value) {
33
- if (isRaw(value)) return value[RAW];
34
- if (value === null || value === void 0 || typeof value === "boolean") return "";
35
- if (Array.isArray(value)) return value.map(insertValue).join("");
36
- return escape(String(value));
37
- }
38
- /**
39
- * Renders a value as the text of an element whose content is text, such as
40
- * a `<textarea>`, as `insertValue` does but without escaping.
41
- */
42
- function textValue(value) {
43
- if (isRaw(value)) return value[RAW];
44
- if (value === null || value === void 0 || typeof value === "boolean") return "";
45
- if (Array.isArray(value)) return value.map(textValue).join("");
46
- return String(value);
47
- }
48
- function toKebabCase(name) {
49
- return name.startsWith("--") ? name : name.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`);
50
- }
51
- function classValue(value) {
52
- if (typeof value !== "object" || value === null) return value ? String(value) : "";
53
- let text = "";
54
- if (Array.isArray(value)) {
55
- for (const item of value) {
56
- const part = classValue(item);
57
- if (part !== "") text = text === "" ? part : `${text} ${part}`;
58
- }
59
- return text;
60
- }
61
- let first = true;
62
- for (const name in value) if (Object.hasOwn(value, name) && value[name]) {
63
- text = first ? name : `${text} ${name}`;
64
- first = false;
65
- }
66
- return text;
67
- }
68
- /**
69
- * Renders a `class` attribute from classes that each have a space before
70
- * them, which the compiler builds from a literal class value. The classes
71
- * are escaped already. No class renders nothing.
72
- */
73
- function classAttribute(classes) {
74
- return classes === "" ? "" : ` class="${classes.slice(1)}"`;
75
- }
76
- function styleValue(value) {
77
- if (typeof value === "object" && value !== null) return Object.entries(value).filter(([, item]) => item !== null && item !== void 0 && item !== false).map(([name, item]) => `${toKebabCase(name)}:${String(item)}`).join(";");
78
- return String(value);
79
- }
80
- /**
81
- * Returns the text of an attribute, or undefined if the attribute is not
82
- * rendered. `true` renders as an empty value.
83
- */
84
- function attributeText(name, value) {
85
- if (value === null || value === void 0 || value === false || typeof value === "function") return;
86
- if (value === true) return "";
87
- if (name === "class") {
88
- const text = classValue(value);
89
- return text === "" ? void 0 : text;
90
- }
91
- return name === "style" ? styleValue(value) : String(value);
92
- }
93
- /** Renders one attribute, with a leading space. */
94
- function attribute(name, value) {
95
- const text = attributeText(name, value);
96
- if (text === void 0) return "";
97
- return value === true ? ` ${name}` : ` ${name}="${escapeAttribute(text)}"`;
98
- }
99
- /**
100
- * Returns the value of a style variable with text around it, such as `12px`
101
- * for `${size}px`. A value that sets no variable stays as it is.
102
- */
103
- function affix(prefix, value, suffix) {
104
- return value === null || value === void 0 || value === false ? value : `${prefix}${String(value)}${suffix}`;
105
- }
106
- /** Returns a style with custom properties before an element's own style. */
107
- function vars(variables, own) {
108
- const parts = [];
109
- for (const [name, value] of Object.entries(variables)) if (value !== null && value !== void 0 && value !== false) parts.push(`${name}:${String(value)}`);
110
- const rest = own === null || own === void 0 || own === false ? "" : styleValue(own);
111
- if (rest) parts.push(rest);
112
- return parts.join(";");
113
- }
114
- /** Returns a `<style>` element for a component's stylesheet. */
115
- function styleElement(id, css) {
116
- return `<style b-style="${escapeAttribute(id)}">${css.replace(/<\/style/gi, "<\\/style")}</style>`;
117
- }
118
- /** Renders an object of attributes. */
119
- function spread(attributes) {
120
- let result = "";
121
- for (const [name, value] of Object.entries(attributes)) if (name !== "children" && !/^on[A-Z]/.test(name)) result += attribute(name, value);
122
- return result;
123
- }
124
- const VOID_ELEMENTS = /* @__PURE__ */ new Set([
125
- "area",
126
- "base",
127
- "br",
128
- "col",
129
- "embed",
130
- "hr",
131
- "img",
132
- "input",
133
- "link",
134
- "meta",
135
- "source",
136
- "track",
137
- "wbr"
138
- ]);
139
- /**
140
- * Renders the attributes of a form that posts to a server function, such as
141
- * ` action="/_brumate/App_1abc%23save" method="post"`. `method` is the name of
142
- * the method attribute to add, if the element has none.
143
- */
144
- function actionAttributes(prefix, name, id, method, result) {
145
- const methodText = method ? ` ${method}="post"` : "";
146
- if (result !== void 0) return ` ${name}="?__action=${encodeURIComponent(id)}"${methodText} b-action="${escapeAttribute(id)}" b-result="${escapeAttribute(result)}"`;
147
- return ` ${name}="${escapeAttribute(`${prefix}/${encodeURIComponent(id)}`)}"${methodText}`;
148
- }
149
- //#endregion
150
- export { vars as _, attributeText as a, escape as c, isRaw as d, raw as f, textValue as g, styleElement as h, attribute as i, escapeAttribute as l, spread as m, actionAttributes as n, classAttribute as o, rawHTML as p, affix as r, classValue as s, VOID_ELEMENTS as t, insertValue as u };
151
-
152
- //# sourceMappingURL=html-DEeoepg3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html-DEeoepg3.js","names":[],"sources":["../src/runtime/html.ts"],"sourcesContent":["// HTML string helpers that the server and the client both use.\n\nconst RAW: unique symbol = Symbol.for('brumate.raw');\n\n/** HTML that is inserted as it is, such as the output of a template. */\nexport interface Raw {\n [RAW]: string;\n}\n\n// A class, not an object literal, so serializers can skip their test for raw HTML on plain objects.\nclass RawHTML implements Raw {\n readonly [RAW]: string;\n\n constructor(html: string) {\n this[RAW] = html;\n }\n}\n\nexport function raw(html: string): Raw {\n return new RawHTML(html);\n}\n\nexport function isRaw(value: unknown): value is Raw {\n return typeof value === 'object' && value !== null && RAW in value;\n}\n\nexport function rawHTML(value: Raw): string {\n return value[RAW];\n}\n\nconst ESCAPES: Record<string, string> = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;' };\n\nconst toEscape = (char: string): string => ESCAPES[char]!;\n\n// Most text has nothing to escape, so a test without the global flag skips the replace.\nexport function escape(value: string): string {\n return /[&<>]/.test(value) ? value.replace(/[&<>]/g, toEscape) : value;\n}\n\nexport function escapeAttribute(value: string): string {\n return /[&<\"]/.test(value) ? value.replace(/[&<\"]/g, toEscape) : value;\n}\n\n/** Renders a value inserted in markup. Promises are not awaited. */\nexport function insertValue(value: unknown): string {\n if (isRaw(value)) {\n return value[RAW];\n }\n if (value === null || value === undefined || typeof value === 'boolean') {\n return '';\n }\n if (Array.isArray(value)) {\n return value.map(insertValue).join('');\n }\n return escape(String(value));\n}\n\n/**\n * Renders a value as the text of an element whose content is text, such as\n * a `<textarea>`, as `insertValue` does but without escaping.\n */\nexport function textValue(value: unknown): string {\n if (isRaw(value)) {\n return value[RAW];\n }\n if (value === null || value === undefined || typeof value === 'boolean') {\n return '';\n }\n if (Array.isArray(value)) {\n return value.map(textValue).join('');\n }\n return String(value);\n}\n\nfunction toKebabCase(name: string): string {\n return name.startsWith('--') ? name : name.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`);\n}\n\nexport function classValue(value: unknown): string {\n if (typeof value !== 'object' || value === null) {\n return value ? String(value) : '';\n }\n let text = '';\n if (Array.isArray(value)) {\n for (const item of value) {\n const part = classValue(item);\n if (part !== '') {\n text = text === '' ? part : `${text} ${part}`;\n }\n }\n return text;\n }\n // An empty name still adds a space between its neighbours, as in a join.\n let first = true;\n for (const name in value) {\n if (Object.hasOwn(value, name) && (value as Record<string, unknown>)[name]) {\n text = first ? name : `${text} ${name}`;\n first = false;\n }\n }\n return text;\n}\n\n/**\n * Renders a `class` attribute from classes that each have a space before\n * them, which the compiler builds from a literal class value. The classes\n * are escaped already. No class renders nothing.\n */\nexport function classAttribute(classes: string): string {\n return classes === '' ? '' : ` class=\"${classes.slice(1)}\"`;\n}\n\nfunction styleValue(value: unknown): string {\n if (typeof value === 'object' && value !== null) {\n return Object.entries(value)\n .filter(([, item]) => item !== null && item !== undefined && item !== false)\n .map(([name, item]) => `${toKebabCase(name)}:${String(item)}`)\n .join(';');\n }\n return String(value);\n}\n\n/**\n * Returns the text of an attribute, or undefined if the attribute is not\n * rendered. `true` renders as an empty value.\n */\nexport function attributeText(name: string, value: unknown): string | undefined {\n if (value === null || value === undefined || value === false || typeof value === 'function') {\n return undefined;\n }\n if (value === true) {\n return '';\n }\n if (name === 'class') {\n const text = classValue(value);\n return text === '' ? undefined : text;\n }\n return name === 'style' ? styleValue(value) : String(value);\n}\n\n/** Renders one attribute, with a leading space. */\nexport function attribute(name: string, value: unknown): string {\n const text = attributeText(name, value);\n if (text === undefined) {\n return '';\n }\n return value === true ? ` ${name}` : ` ${name}=\"${escapeAttribute(text)}\"`;\n}\n\n/**\n * Returns the value of a style variable with text around it, such as `12px`\n * for `${size}px`. A value that sets no variable stays as it is.\n */\nexport function affix(prefix: string, value: unknown, suffix: string): unknown {\n return value === null || value === undefined || value === false\n ? value\n : `${prefix}${String(value)}${suffix}`;\n}\n\n/** Returns a style with custom properties before an element's own style. */\nexport function vars(variables: Record<string, unknown>, own: unknown): string {\n const parts: string[] = [];\n for (const [name, value] of Object.entries(variables)) {\n if (value !== null && value !== undefined && value !== false) {\n parts.push(`${name}:${String(value)}`);\n }\n }\n const rest = own === null || own === undefined || own === false ? '' : styleValue(own);\n if (rest) {\n parts.push(rest);\n }\n return parts.join(';');\n}\n\n/** Returns a `<style>` element for a component's stylesheet. */\nexport function styleElement(id: string, css: string): string {\n return `<style b-style=\"${escapeAttribute(id)}\">${css.replace(/<\\/style/gi, '<\\\\/style')}</style>`;\n}\n\n/** Renders an object of attributes. */\nexport function spread(attributes: Record<string, unknown>): string {\n let result = '';\n for (const [name, value] of Object.entries(attributes)) {\n if (name !== 'children' && !/^on[A-Z]/.test(name)) {\n result += attribute(name, value);\n }\n }\n return result;\n}\n\nexport const VOID_ELEMENTS: Set<string> = new Set([\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'source',\n 'track',\n 'wbr',\n]);\n\n/**\n * Renders the attributes of a form that posts to a server function, such as\n * ` action=\"/_brumate/App_1abc%23save\" method=\"post\"`. `method` is the name of\n * the method attribute to add, if the element has none.\n */\nexport function actionAttributes(\n prefix: string,\n name: string,\n id: string,\n method?: string,\n result?: string,\n): string {\n const methodText = method ? ` ${method}=\"post\"` : '';\n if (result !== undefined) {\n // The form posts to its page, which renders with the result. With the\n // loader, the result is written into the `$action` at `result` instead.\n return ` ${name}=\"?__action=${encodeURIComponent(id)}\"${methodText} b-action=\"${escapeAttribute(id)}\" b-result=\"${escapeAttribute(result)}\"`;\n }\n const url = `${prefix}/${encodeURIComponent(id)}`;\n return ` ${name}=\"${escapeAttribute(url)}\"${methodText}`;\n}\n"],"mappings":";AAEA,MAAM,MAAqB,OAAO,IAAI,aAAa;AAQnD,IAAM,UAAN,MAA6B;CAC3B,CAAU;CAEV,YAAY,MAAc;EACxB,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,IAAI,MAAmB;CACrC,OAAO,IAAI,QAAQ,IAAI;AACzB;AAEA,SAAgB,MAAM,OAA8B;CAClD,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,OAAO;AAC/D;AAEA,SAAgB,QAAQ,OAAoB;CAC1C,OAAO,MAAM;AACf;AAEA,MAAM,UAAkC;CAAE,KAAK;CAAS,KAAK;CAAQ,KAAK;CAAQ,MAAK;AAAS;AAEhG,MAAM,YAAY,SAAyB,QAAQ;AAGnD,SAAgB,OAAO,OAAuB;CAC5C,OAAO,QAAQ,KAAK,KAAK,IAAI,MAAM,QAAQ,UAAU,QAAQ,IAAI;AACnE;AAEA,SAAgB,gBAAgB,OAAuB;CACrD,OAAO,QAAQ,KAAK,KAAK,IAAI,MAAM,QAAQ,UAAU,QAAQ,IAAI;AACnE;;AAGA,SAAgB,YAAY,OAAwB;CAClD,IAAI,MAAM,KAAK,GACb,OAAO,MAAM;CAEf,IAAI,UAAU,QAAQ,UAAU,KAAA,KAAa,OAAO,UAAU,WAC5D,OAAO;CAET,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,MAAM,IAAI,WAAW,CAAC,CAAC,KAAK,EAAE;CAEvC,OAAO,OAAO,OAAO,KAAK,CAAC;AAC7B;;;;;AAMA,SAAgB,UAAU,OAAwB;CAChD,IAAI,MAAM,KAAK,GACb,OAAO,MAAM;CAEf,I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AAI,GAC9C,UAAU,UAAU,MAAM,KAAK;CAGnC,OAAO;AACT;AAEA,MAAa,gCAA6B,IAAI,IAAI;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;;AAOD,SAAgB,iBACd,QACA,MACA,IACA,QACA,QACQ;CACR,MAAM,aAAa,SAAS,IAAI,OAAO,WAAW;CAClD,IAAI,WAAW,KAAA,GAGb,OAAO,IAAI,KAAK,cAAc,mBAAmB,EAAE,EAAE,GAAG,WAAW,aAAa,gBAAgB,EAAE,EAAE,cAAc,gBAAgB,MAAM,EAAE;CAG5I,OAAO,IAAI,KAAK,IAAI,gBAAgB,GADrB,OAAO,GAAG,mBAAmB,EAAE,GACP,EAAE,GAAG;AAC9C"}
@@ -1,53 +0,0 @@
1
- //#region src/runtime/html.d.ts
2
- declare const RAW: unique symbol;
3
- /** HTML that is inserted as it is, such as the output of a template. */
4
- interface Raw {
5
- [RAW]: string;
6
- }
7
- declare function raw(html: string): Raw;
8
- declare function isRaw(value: unknown): value is Raw;
9
- declare function rawHTML(value: Raw): string;
10
- declare function escape(value: string): string;
11
- declare function escapeAttribute(value: string): string;
12
- /** Renders a value inserted in markup. Promises are not awaited. */
13
- declare function insertValue(value: unknown): string;
14
- /**
15
- * Renders a value as the text of an element whose content is text, such as
16
- * a `<textarea>`, as `insertValue` does but without escaping.
17
- */
18
- declare function textValue(value: unknown): string;
19
- declare function classValue(value: unknown): string;
20
- /**
21
- * Renders a `class` attribute from classes that each have a space before
22
- * them, which the compiler builds from a literal class value. The classes
23
- * are escaped already. No class renders nothing.
24
- */
25
- declare function classAttribute(classes: string): string;
26
- /**
27
- * Returns the text of an attribute, or undefined if the attribute is not
28
- * rendered. `true` renders as an empty value.
29
- */
30
- declare function attributeText(name: string, value: unknown): string | undefined;
31
- /** Renders one attribute, with a leading space. */
32
- declare function attribute(name: string, value: unknown): string;
33
- /**
34
- * Returns the value of a style variable with text around it, such as `12px`
35
- * for `${size}px`. A value that sets no variable stays as it is.
36
- */
37
- declare function affix(prefix: string, value: unknown, suffix: string): unknown;
38
- /** Returns a style with custom properties before an element's own style. */
39
- declare function vars(variables: Record<string, unknown>, own: unknown): string;
40
- /** Returns a `<style>` element for a component's stylesheet. */
41
- declare function styleElement(id: string, css: string): string;
42
- /** Renders an object of attributes. */
43
- declare function spread(attributes: Record<string, unknown>): string;
44
- declare const VOID_ELEMENTS: Set<string>;
45
- /**
46
- * Renders the attributes of a form that posts to a server function, such as
47
- * ` action="/_brumate/App_1abc%23save" method="post"`. `method` is the name of
48
- * the method attribute to add, if the element has none.
49
- */
50
- declare function actionAttributes(prefix: string, name: string, id: string, method?: string, result?: string): string;
51
- //#endregion
52
- export { textValue as _, attribute as a, classValue as c, insertValue as d, isRaw as f, styleElement as g, spread as h, affix as i, escape as l, rawHTML as m, VOID_ELEMENTS as n, attributeText as o, raw as p, actionAttributes as r, classAttribute as s, Raw as t, escapeAttribute as u, vars as v };
53
- //# sourceMappingURL=html-Du8jY2Cc.d.ts.map