@barefootjs/client 0.31.5 → 0.31.7

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.
@@ -169158,6 +169158,7 @@ var ErrorCodes = {
169158
169158
  COMPONENT_REQUIRED_PROP_MISSING: "BF046",
169159
169159
  JSX_BRANCH_LOCAL_IN_CALLBACK: "BF047",
169160
169160
  SIBLING_COMPONENT_NOT_COMPILED: "BF048",
169161
+ RICH_TYPE_PROP_NOT_HYDRATABLE: "BF049",
169161
169162
  SHARED_PROGRAM_REQUIRED: "BF050",
169162
169163
  WRONG_PACKAGE_IMPORT: "BF051",
169163
169164
  BUILTIN_REQUIRES_IMPORT: "BF054",
@@ -169188,6 +169189,7 @@ var errorMessages = {
169188
169189
  [ErrorCodes.COMPONENT_REQUIRED_PROP_MISSING]: "Built-in component is missing a required prop.",
169189
169190
  [ErrorCodes.JSX_BRANCH_LOCAL_IN_CALLBACK]: "JSX-typed local declared inside an `if`-block cannot be referenced from a callback body (ref / event handler). " + "Render it as a child instead: `<div ref={...}>{local}</div>`.",
169190
169191
  [ErrorCodes.SIBLING_COMPONENT_NOT_COMPILED]: "Referenced component did not compile to a template, so this reference would throw " + "`ReferenceError` at render time. Multi-return JSX dispatch (a `switch` or `if`/`else` " + "chain across multiple JSX-returning branches) cannot compile as a component in a " + `'use client' file. Extract it to a separate non-"use client" file (where it is preserved ` + "verbatim, see #932), or rewrite it as a single-return ternary/conditional chain so the " + "component pipeline can compile it.",
169192
+ [ErrorCodes.RICH_TYPE_PROP_NOT_HYDRATABLE]: "Rich-typed prop cannot cross the bf-p hydration boundary as JSON.",
169191
169193
  [ErrorCodes.SHARED_PROGRAM_REQUIRED]: "Shared ts.Program required for type-based reactivity classification. This source imports a Reactive<T>-branded library (e.g. @barefootjs/form) whose getters cannot be classified by regex alone. Pass `options.program` (built via `createProgramForCorpus`) so the analyzer can resolve the brand through the TypeChecker.",
169192
169194
  [ErrorCodes.WRONG_PACKAGE_IMPORT]: "Import from wrong package.",
169193
169195
  [ErrorCodes.BUILTIN_REQUIRES_IMPORT]: "Built-in <Async> / <Region> must be imported from '@barefootjs/client'. " + "The compiler recognises these tags by their import (not by tag name), " + "so an unimported tag with this name is treated as an undeclared component.",
@@ -169221,6 +169223,8 @@ var HOST_RICH_TYPE_NAMES = new Set([
169221
169223
  "BigInt",
169222
169224
  "Function"
169223
169225
  ]);
169226
+ var JSON_REVIVABLE_RICH_TYPE_NAMES = new Set(["Date", "URL"]);
169227
+ var JSON_UNSAFE_RICH_TYPE_NAMES = new Set([...HOST_RICH_TYPE_NAMES].filter((n) => !JSON_REVIVABLE_RICH_TYPE_NAMES.has(n)));
169224
169228
  function baseTypeName(raw) {
169225
169229
  const idx = raw.indexOf("<");
169226
169230
  return (idx === -1 ? raw : raw.slice(0, idx)).trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/client",
3
- "version": "0.31.5",
3
+ "version": "0.31.7",
4
4
  "description": "BarefootJS client package: reactive primitives (SSR-safe) plus browser runtime under the `/runtime` subpath (compiler target)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -55,7 +55,7 @@
55
55
  "directory": "packages/client"
56
56
  },
57
57
  "dependencies": {
58
- "@barefootjs/shared": "0.31.5"
58
+ "@barefootjs/shared": "0.31.7"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@barefootjs/jsx": ">=0.2.0"