@barefootjs/shared 0.15.2 → 0.17.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, } 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_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 type { ProfilerEvent, ProfilerEventType, ProfilerSubscriberKind, } from './profiler-events.ts';
package/dist/index.js CHANGED
@@ -35,6 +35,7 @@ var BF_SEAM_HYDRATE = "__bf_hydrate";
35
35
  var BF_SEAM_HYDRATE_WITHIN = "__bf_hydrate_within";
36
36
  var BF_SEAM_DISPOSE_WITHIN = "__bf_dispose_within";
37
37
  var BF_SEAM_PUSH_SEARCH = "__bf_pushSearch";
38
+ var BF_SEAM_NAV_SEARCH = "__bf_navSearch";
38
39
  // src/dom-prop.ts
39
40
  var BOOLEAN_ATTRS = new Set([
40
41
  "checked",
@@ -212,6 +213,7 @@ export {
212
213
  BOOLEAN_ATTRS,
213
214
  BF_SLOT,
214
215
  BF_SEAM_PUSH_SEARCH,
216
+ BF_SEAM_NAV_SEARCH,
215
217
  BF_SEAM_HYDRATE_WITHIN,
216
218
  BF_SEAM_HYDRATE,
217
219
  BF_SEAM_DISPOSE_WITHIN,
package/dist/markers.d.ts CHANGED
@@ -143,5 +143,17 @@ export declare const BF_SEAM_HYDRATE = "__bf_hydrate";
143
143
  export declare const BF_SEAM_HYDRATE_WITHIN = "__bf_hydrate_within";
144
144
  /** Dispose the islands in a subtree. `window[BF_SEAM_DISPOSE_WITHIN](root)`. */
145
145
  export declare const BF_SEAM_DISPOSE_WITHIN = "__bf_dispose_within";
146
- /** Push a new query string into the `searchParams()` env signal. `window[BF_SEAM_PUSH_SEARCH](search)`. */
146
+ /** Push a new query string into the env-signal getter returned by
147
+ * `createSearchParams()`. `window[BF_SEAM_PUSH_SEARCH](search)`. */
147
148
  export declare const BF_SEAM_PUSH_SEARCH = "__bf_pushSearch";
149
+ /**
150
+ * Imperative query-only navigation for `setSearchParams(...)`
151
+ * (`createSearchParams()`, router v0.5). `window[BF_SEAM_NAV_SEARCH](search)`.
152
+ *
153
+ * The client's `setSearchParams` writes the new query through this seam so the
154
+ * router can perform a soft, same-route navigation (history push + region
155
+ * re-render) without `@barefootjs/client` importing the router. When no router
156
+ * has installed the seam, `setSearchParams` falls back to a hard navigation —
157
+ * "never worse than an MPA" — so the imperative write is correct standalone.
158
+ */
159
+ export declare const BF_SEAM_NAV_SEARCH = "__bf_navSearch";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/shared",
3
- "version": "0.15.2",
3
+ "version": "0.17.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
@@ -29,6 +29,7 @@ export {
29
29
  BF_SEAM_HYDRATE_WITHIN,
30
30
  BF_SEAM_DISPOSE_WITHIN,
31
31
  BF_SEAM_PUSH_SEARCH,
32
+ BF_SEAM_NAV_SEARCH,
32
33
  } from './markers.ts'
33
34
 
34
35
  export {
package/src/markers.ts CHANGED
@@ -213,7 +213,7 @@ export const BF_PARENT_SCOPE_PLACEHOLDER = '__BF_PARENT_SCOPE__'
213
213
  // The optional client router (`@barefootjs/router`) reaches the client runtime
214
214
  // through a few `window.__bf_*` function properties. The runtime *installs*
215
215
  // them (`@barefootjs/client/runtime/streaming.ts`, `@barefootjs/client`'s
216
- // `searchParams`) and the router *reads* them (`@barefootjs/router/seams.ts`),
216
+ // `createSearchParams`) and the router *reads* them (`@barefootjs/router/seams.ts`),
217
217
  // in different packages — so the names live here as the single source of truth.
218
218
  // A rename is then a compile error on both sides instead of a silently-broken
219
219
  // seam (the router would otherwise fall back to a dynamic import and mask the
@@ -225,5 +225,17 @@ export const BF_SEAM_HYDRATE = '__bf_hydrate'
225
225
  export const BF_SEAM_HYDRATE_WITHIN = '__bf_hydrate_within'
226
226
  /** Dispose the islands in a subtree. `window[BF_SEAM_DISPOSE_WITHIN](root)`. */
227
227
  export const BF_SEAM_DISPOSE_WITHIN = '__bf_dispose_within'
228
- /** Push a new query string into the `searchParams()` env signal. `window[BF_SEAM_PUSH_SEARCH](search)`. */
228
+ /** Push a new query string into the env-signal getter returned by
229
+ * `createSearchParams()`. `window[BF_SEAM_PUSH_SEARCH](search)`. */
229
230
  export const BF_SEAM_PUSH_SEARCH = '__bf_pushSearch'
231
+ /**
232
+ * Imperative query-only navigation for `setSearchParams(...)`
233
+ * (`createSearchParams()`, router v0.5). `window[BF_SEAM_NAV_SEARCH](search)`.
234
+ *
235
+ * The client's `setSearchParams` writes the new query through this seam so the
236
+ * router can perform a soft, same-route navigation (history push + region
237
+ * re-render) without `@barefootjs/client` importing the router. When no router
238
+ * has installed the seam, `setSearchParams` falls back to a hard navigation —
239
+ * "never worse than an MPA" — so the imperative write is correct standalone.
240
+ */
241
+ export const BF_SEAM_NAV_SEARCH = '__bf_navSearch'