redweb 0.16.3 → 0.16.4
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 +5 -0
- package/README.md +3 -3
- package/docs/CLI.md +1 -1
- package/docs/DEVELOPMENT.md +1 -1
- package/docs/GETTING_STARTED.md +4 -4
- package/docs/LIVE_HTML.md +1 -1
- package/docs/MIGRATION.md +1 -1
- package/docs/RELEASE_TRUST.md +4 -4
- package/docs/SOCKET_CONTRACTS.md +1 -1
- package/docs/generated.json +226 -222
- package/docs/reference.json +6 -2
- package/docs/releases/0.16.4.json +2290 -0
- package/index.d.ts +4 -1
- package/index.js +2 -1
- package/package.json +6 -2
- package/src/htmx/CodeHighlight.js +98 -0
- package/src/htmx/Html.js +4 -3
- package/src/htmx/index.js +2 -1
- package/styles/code-highlight.css +16 -0
package/docs/reference.json
CHANGED
|
@@ -955,7 +955,7 @@
|
|
|
955
955
|
"name": "html, attribute, url, each, codeBlock",
|
|
956
956
|
"type": "Live HTML",
|
|
957
957
|
"summary": "Safe composition primitives escape text and quoted primitive attributes by default. URL attributes additionally reject executable, protocol-relative, and malformed values. Arrays must contain trusted HtmlFragment values.",
|
|
958
|
-
"usage": "import { codeBlock, each, html } from 'redweb'\n\nconst links = sections.map(section => ({\n id: section.id,\n href: `#${section.id}`,\n label: section.name,\n}))\n\nconst navigation = each(links, link => html`\n <a id=\"${link.id}\" href=\"${link.href}\">${link.label}</a>\n`)\n\nconst example = codeBlock(source, {
|
|
958
|
+
"usage": "import { codeBlock, each, html } from 'redweb'\n\nconst links = sections.map(section => ({\n id: section.id,\n href: `#${section.id}`,\n label: section.name,\n}))\n\nconst navigation = each(links, link => html`\n <a id=\"${link.id}\" href=\"${link.href}\">${link.label}</a>\n`)\n\n// TS, TSX and JS highlight automatically, including rw-* action references.\nconst example = codeBlock(source, { language: 'tsx', label: 'TypeScript' })",
|
|
959
959
|
"methods": [
|
|
960
960
|
{
|
|
961
961
|
"name": "html`...`",
|
|
@@ -975,7 +975,11 @@
|
|
|
975
975
|
},
|
|
976
976
|
{
|
|
977
977
|
"name": "codeBlock(code, options?)",
|
|
978
|
-
"detail": "Builds an escaped figure/pre/code fragment
|
|
978
|
+
"detail": "Builds an escaped figure/pre/code fragment with automatic JS/TS/TSX highlighting; custom highlighters and opt-out remain available."
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"name": "highlightCode(source, language)",
|
|
982
|
+
"detail": "Returns safely escaped token markup, including identifiers inside rw-* JSX action expressions."
|
|
979
983
|
}
|
|
980
984
|
],
|
|
981
985
|
"article": {
|