@vyriy/html 0.5.6 → 0.6.5

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 (3) hide show
  1. package/README.md +1 -2
  2. package/html.js +2 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -25,7 +25,7 @@ The function returns a full `<!DOCTYPE html>` page and lets you inject common do
25
25
  - attributes for the `<body>` tag
26
26
  - body markup and footer-like script sections
27
27
 
28
- Missing sections default to empty strings, so the function always returns the same document shape.
28
+ Missing sections default to empty strings, except `meta`, which defaults to UTF-8 and responsive viewport tags. Pass `meta: ''` when a document should omit those defaults.
29
29
 
30
30
  `minify` can be used as an explicit wrapper when the rendered document should not contain line breaks. It removes line breaks from the whole document, including injected style and script sections, while preserving ordinary spaces.
31
31
 
@@ -58,7 +58,6 @@ import { html } from '@vyriy/html';
58
58
  const page = html({
59
59
  htmlAttributes: 'lang="en"',
60
60
  title: '<title>Vyriy</title>',
61
- meta: '<meta charset="utf-8" />',
62
61
  bodyAttributes: 'class="app"',
63
62
  body: '<div id="root"></div>',
64
63
  script: '<script src="/main.js"></script>',
package/html.js CHANGED
@@ -1,5 +1,6 @@
1
+ const defaultMeta = '<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />';
1
2
  export const html = (props = {}) => {
2
- const { htmlAttributes = '', title = '', meta = '', base = '', link = '', style = '', bodyAttributes = '', body = '', noscript = '', script = '', } = props;
3
+ const { htmlAttributes = '', title = '', meta = defaultMeta, base = '', link = '', style = '', bodyAttributes = '', body = '', noscript = '', script = '', } = props;
3
4
  return `
4
5
  <!DOCTYPE html>
5
6
  <html ${htmlAttributes}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyriy/html",
3
- "version": "0.5.6",
3
+ "version": "0.6.5",
4
4
  "description": "HTML document utility for Vyriy projects",
5
5
  "type": "module",
6
6
  "agents": "./AGENTS.md",