@barefootjs/shared 0.20.0 → 0.21.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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { BF_SCOPE, BF_SLOT, BF_HOST, BF_AT, BF_ROOT, BF_PROPS, BF_COND, BF_ITEM, BF_PORTAL_OWNER, BF_PORTAL_ID, BF_PORTAL_PLACEHOLDER, BF_PARENT_OWNED_PREFIX, BF_SCOPE_COMMENT_PREFIX, BF_LOOP_START, BF_LOOP_END, BF_LOOP_ITEM, loopItemMarker, loopStartMarker, loopEndMarker, BF_KEY, BF_KEY_PREFIX, BF_PLACEHOLDER, BF_ASYNC, BF_ASYNC_RESOLVE, BF_REGION, BF_PARENT_SCOPE_PLACEHOLDER, BF_SEAM_HYDRATE, BF_SEAM_HYDRATE_WITHIN, BF_SEAM_DISPOSE_WITHIN, BF_SEAM_PUSH_SEARCH, BF_SEAM_NAV_SEARCH, } from './markers.ts';
1
+ export { BF_SCOPE, BF_SLOT, BF_HOST, BF_AT, BF_ROOT, BF_PROPS, BF_COND, BF_ITEM, BF_PORTAL_OWNER, BF_PORTAL_ID, BF_PORTAL_PLACEHOLDER, BF_PARENT_OWNED_PREFIX, BF_SCOPE_COMMENT_PREFIX, BF_SCOPE_COMMENT_END_PREFIX, BF_LOOP_START, BF_LOOP_END, BF_LOOP_ITEM, loopItemMarker, loopStartMarker, loopEndMarker, BF_KEY, BF_KEY_PREFIX, BF_PLACEHOLDER, BF_ASYNC, BF_ASYNC_RESOLVE, BF_REGION, BF_PARENT_SCOPE_PLACEHOLDER, BF_SEAM_HYDRATE, BF_SEAM_HYDRATE_WITHIN, BF_SEAM_DISPOSE_WITHIN, BF_SEAM_PUSH_SEARCH, BF_SEAM_NAV_SEARCH, } from './markers.ts';
2
2
  export { classifyDOMProp, toHTMLAttrName, toHTMLAttrNameRuntime, isBooleanAttr, isEventProp, BOOLEAN_ATTRS, } from './dom-prop.ts';
3
3
  export type { DOMPropKind, DOMPropClassification } from './dom-prop.ts';
4
4
  export { decodeEntities, escapeHtml } from './html-entities.ts';
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ var BF_PORTAL_ID = "bf-pi";
12
12
  var BF_PORTAL_PLACEHOLDER = "bf-pp";
13
13
  var BF_PARENT_OWNED_PREFIX = "^";
14
14
  var BF_SCOPE_COMMENT_PREFIX = "bf-scope:";
15
+ var BF_SCOPE_COMMENT_END_PREFIX = "bf-/scope:";
15
16
  var BF_LOOP_START = "bf-loop";
16
17
  var BF_LOOP_END = "bf-/loop";
17
18
  var BF_LOOP_ITEM = "bf-loop-i";
@@ -353,6 +354,7 @@ export {
353
354
  BF_SEAM_HYDRATE,
354
355
  BF_SEAM_DISPOSE_WITHIN,
355
356
  BF_SCOPE_COMMENT_PREFIX,
357
+ BF_SCOPE_COMMENT_END_PREFIX,
356
358
  BF_SCOPE,
357
359
  BF_ROOT,
358
360
  BF_REGION,
package/dist/markers.d.ts CHANGED
@@ -71,6 +71,21 @@ export declare const BF_PORTAL_PLACEHOLDER = "bf-pp";
71
71
  export declare const BF_PARENT_OWNED_PREFIX = "^";
72
72
  /** Comment-based scope marker prefix: `<!--bf-scope:ComponentName_abc123-->` */
73
73
  export declare const BF_SCOPE_COMMENT_PREFIX = "bf-scope:";
74
+ /**
75
+ * Comment-based scope END marker prefix: `<!--bf-/scope:ComponentName_abc123-->`.
76
+ *
77
+ * Paired with BF_SCOPE_COMMENT_PREFIX: emitted after a fragment root's last
78
+ * top-level node, carrying the same scope id as the opening marker. Without
79
+ * it a fragment scope's DOM range has no lower bound — it runs to the next
80
+ * `bf-scope:` comment or the end of the parent element — so queries from a
81
+ * fragment-rooted child could match unrelated later siblings owned by the
82
+ * parent (#2289). Follows the `bf-loop` / `bf-/loop` pairing convention.
83
+ *
84
+ * The runtime treats the end marker as optional (SSR HTML rendered by an
85
+ * older adapter runtime falls back to the unbounded-range heuristic), so
86
+ * adapters can adopt it independently.
87
+ */
88
+ export declare const BF_SCOPE_COMMENT_END_PREFIX = "bf-/scope:";
74
89
  /** Loop boundary start prefix: comments are `<!--bf-loop:<markerId>-->`. */
75
90
  export declare const BF_LOOP_START = "bf-loop";
76
91
  /** Loop boundary end prefix: comments are `<!--bf-/loop:<markerId>-->`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/shared",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "Shared constants for BarefootJS compiler and runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -12,6 +12,7 @@ export {
12
12
  BF_PORTAL_PLACEHOLDER,
13
13
  BF_PARENT_OWNED_PREFIX,
14
14
  BF_SCOPE_COMMENT_PREFIX,
15
+ BF_SCOPE_COMMENT_END_PREFIX,
15
16
  BF_LOOP_START,
16
17
  BF_LOOP_END,
17
18
  BF_LOOP_ITEM,
package/src/markers.ts CHANGED
@@ -105,6 +105,22 @@ export const BF_PARENT_OWNED_PREFIX = '^'
105
105
  /** Comment-based scope marker prefix: `<!--bf-scope:ComponentName_abc123-->` */
106
106
  export const BF_SCOPE_COMMENT_PREFIX = 'bf-scope:'
107
107
 
108
+ /**
109
+ * Comment-based scope END marker prefix: `<!--bf-/scope:ComponentName_abc123-->`.
110
+ *
111
+ * Paired with BF_SCOPE_COMMENT_PREFIX: emitted after a fragment root's last
112
+ * top-level node, carrying the same scope id as the opening marker. Without
113
+ * it a fragment scope's DOM range has no lower bound — it runs to the next
114
+ * `bf-scope:` comment or the end of the parent element — so queries from a
115
+ * fragment-rooted child could match unrelated later siblings owned by the
116
+ * parent (#2289). Follows the `bf-loop` / `bf-/loop` pairing convention.
117
+ *
118
+ * The runtime treats the end marker as optional (SSR HTML rendered by an
119
+ * older adapter runtime falls back to the unbounded-range heuristic), so
120
+ * adapters can adopt it independently.
121
+ */
122
+ export const BF_SCOPE_COMMENT_END_PREFIX = 'bf-/scope:'
123
+
108
124
  /** Loop boundary start prefix: comments are `<!--bf-loop:<markerId>-->`. */
109
125
  export const BF_LOOP_START = 'bf-loop'
110
126