@symbo.ls/brender 3.6.7 → 3.7.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.
@@ -508,8 +508,8 @@ const generateGlobalCSS = async (ds, config) => {
508
508
  const result = {
509
509
  CSS_VARS: conf.CSS_VARS || {},
510
510
  CSS_MEDIA_VARS: conf.CSS_MEDIA_VARS || {},
511
- RESET: conf.RESET || conf.reset || {},
512
- ANIMATION: conf.animation || conf.ANIMATION || {}
511
+ reset: conf.reset || {},
512
+ animation: conf.animation || {}
513
513
  }
514
514
  // Export as globalThis so we can read it
515
515
  globalThis.__BR_GLOBAL_CSS__ = result
@@ -471,8 +471,8 @@ const generateGlobalCSS = async (ds, config) => {
471
471
  const result = {
472
472
  CSS_VARS: conf.CSS_VARS || {},
473
473
  CSS_MEDIA_VARS: conf.CSS_MEDIA_VARS || {},
474
- RESET: conf.RESET || conf.reset || {},
475
- ANIMATION: conf.animation || conf.ANIMATION || {}
474
+ reset: conf.reset || {},
475
+ animation: conf.animation || {}
476
476
  }
477
477
  // Export as globalThis so we can read it
478
478
  globalThis.__BR_GLOBAL_CSS__ = result
package/env.js CHANGED
@@ -2,12 +2,12 @@ import { parseHTML } from 'linkedom'
2
2
 
3
3
  /**
4
4
  * Creates a virtual DOM environment for server-side rendering.
5
- * Returns window and document that DomQL can use as context.
5
+ * Returns window and document that DOMQL can use as context.
6
6
  */
7
7
  export const createEnv = (html = '<!DOCTYPE html><html><head></head><body></body></html>') => {
8
8
  const { window, document } = parseHTML(html)
9
9
 
10
- // Stub APIs that DomQL/smbls may call during rendering
10
+ // Stub APIs that DOMQL/smbls may call during rendering
11
11
  if (!window.requestAnimationFrame) {
12
12
  window.requestAnimationFrame = (fn) => setTimeout(fn, 0)
13
13
  }
package/hydrate.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Client-side hydration — reconnects pre-rendered HTML (with data-br keys)
3
- * to a live DomQL element tree, attaches events, and fires lifecycle hooks.
3
+ * to a live DOMQL element tree, attaches events, and fires lifecycle hooks.
4
4
  *
5
- * After hydration the DomQL tree owns every DOM node:
5
+ * After hydration the DOMQL tree owns every DOM node:
6
6
  * - el.node points to the real DOM element
7
- * - node.ref points back to the DomQL element
7
+ * - node.ref points back to the DOMQL element
8
8
  * - CSS classes are generated via emotion and applied
9
9
  * - DOM events (click, input, etc.) are bound
10
10
  * - on.render / on.renderRouter callbacks fire
@@ -25,11 +25,11 @@ export const collectBrNodes = (root) => {
25
25
  }
26
26
 
27
27
  /**
28
- * Walks a DomQL element tree that was created with onlyResolveExtends.
28
+ * Walks a DOMQL element tree that was created with onlyResolveExtends.
29
29
  * For each element with a __brKey, attaches the matching real DOM node,
30
30
  * renders CSS via emotion, binds DOM events, and fires lifecycle hooks.
31
31
  *
32
- * @param {object} element - Root DomQL element (from create with onlyResolveExtends)
32
+ * @param {object} element - Root DOMQL element (from create with onlyResolveExtends)
33
33
  * @param {object} [options]
34
34
  * @param {Element} [options.root] - Root DOM element to scan for data-br nodes
35
35
  * @param {boolean} [options.events=true] - Attach DOM events (click, input, etc.)
@@ -134,7 +134,7 @@ const renderCSS = (el, emotion, colorMap, mediaMap) => {
134
134
  continue
135
135
  }
136
136
 
137
- // Resolve DomQL shorthands (flexAlign, round, boxSize, etc.)
137
+ // Resolve DOMQL shorthands (flexAlign, round, boxSize, etc.)
138
138
  const expanded = resolveShorthand(key, val)
139
139
  if (expanded) {
140
140
  for (const ek in expanded) {
@@ -263,7 +263,7 @@ const getExtendsCSS = (el) => {
263
263
  return null
264
264
  }
265
265
 
266
- // DomQL shorthand props that expand to multiple CSS properties
266
+ // DOMQL shorthand props that expand to multiple CSS properties
267
267
  const resolveShorthand = (key, val) => {
268
268
  if (typeof val === 'undefined' || val === null) return null
269
269
 
@@ -438,7 +438,7 @@ const addListener = (node, eventName, handler, el) => {
438
438
 
439
439
  /**
440
440
  * Walks the tree and fires on.render, on.renderRouter, on.done, on.create
441
- * lifecycle events — the same ones that fire during normal DomQL create.
441
+ * lifecycle events — the same ones that fire during normal DOMQL create.
442
442
  */
443
443
  const fireLifecycle = (el) => {
444
444
  if (!el || !el.__ref || !el.node) return
package/keys.js CHANGED
@@ -6,7 +6,7 @@ export const resetKeys = () => {
6
6
 
7
7
  /**
8
8
  * Recursively assigns `data-br` attributes to all element nodes.
9
- * These keys allow qsql to remap static HTML back onto DomQL elements.
9
+ * These keys allow qsql to remap static HTML back onto DOMQL elements.
10
10
  */
11
11
  export const assignKeys = (node) => {
12
12
  if (!node) return
@@ -25,8 +25,8 @@ export const assignKeys = (node) => {
25
25
  }
26
26
 
27
27
  /**
28
- * Walks a DomQL element tree and builds a registry
29
- * mapping data-br keys to DomQL elements.
28
+ * Walks a DOMQL element tree and builds a registry
29
+ * mapping data-br keys to DOMQL elements.
30
30
  */
31
31
  export const mapKeysToElements = (element, registry = {}) => {
32
32
  if (!element) return registry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/brender",
3
- "version": "3.6.7",
3
+ "version": "3.7.0",
4
4
  "license": "CC-BY-NC-4.0",
5
5
  "type": "module",
6
6
  "module": "./dist/esm/index.js",
@@ -36,7 +36,7 @@
36
36
  "dev:rita": "node examples/serve-rita.js"
37
37
  },
38
38
  "dependencies": {
39
- "@symbo.ls/helmet": "^3.6.7",
39
+ "@symbo.ls/helmet": "^3.7.0",
40
40
  "linkedom": "^0.16.8"
41
41
  },
42
42
  "devDependencies": {
package/render.js CHANGED
@@ -291,10 +291,10 @@ const UIKIT_STUBS = {
291
291
  }
292
292
 
293
293
  /**
294
- * Renders a Symbols/DomQL project to HTML on the server.
294
+ * Renders a Symbols/DOMQL project to HTML on the server.
295
295
  *
296
296
  * Accepts project data as a plain object (matching what ProjectDataService provides)
297
- * or as a pre-loaded smbls context. Runs DomQL in a linkedom virtual DOM,
297
+ * or as a pre-loaded smbls context. Runs DOMQL in a linkedom virtual DOM,
298
298
  * assigns data-br keys for hydration, and extracts page metadata for SEO.
299
299
  *
300
300
  * @param {object} data - Project data object with: pages, components, designSystem,
@@ -456,12 +456,12 @@ export const render = async (data, options = {}) => {
456
456
  }
457
457
 
458
458
  /**
459
- * Renders a single DomQL element definition to HTML.
459
+ * Renders a single DOMQL element definition to HTML.
460
460
  * Useful for rendering individual components without a full project.
461
461
  *
462
- * @param {object} elementDef - DomQL element definition
462
+ * @param {object} elementDef - DOMQL element definition
463
463
  * @param {object} [options]
464
- * @param {object} [options.context] - DomQL context (components, designSystem, etc.)
464
+ * @param {object} [options.context] - DOMQL context (components, designSystem, etc.)
465
465
  * @returns {Promise<{ html: string, registry: object, element: object }>}
466
466
  */
467
467
  export const renderElement = async (elementDef, options = {}) => {
@@ -585,8 +585,8 @@ const generateGlobalCSS = async (ds, config) => {
585
585
  const result = {
586
586
  CSS_VARS: conf.CSS_VARS || {},
587
587
  CSS_MEDIA_VARS: conf.CSS_MEDIA_VARS || {},
588
- RESET: conf.RESET || conf.reset || {},
589
- ANIMATION: conf.animation || conf.ANIMATION || {}
588
+ reset: conf.reset || {},
589
+ animation: conf.animation || {}
590
590
  }
591
591
  // Export as globalThis so we can read it
592
592
  globalThis.__BR_GLOBAL_CSS__ = result