@wcstack/state 3.4.0 → 3.5.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
@@ -799,6 +799,7 @@ interface IBindingErrorInfo {
799
799
  }
800
800
  interface IWritableConfig {
801
801
  bindAttributeName?: string;
802
+ /** @deprecated Removed in 4.0, whose `bootstrapState` throws on it (3.5 warns `wcs/v4-migration`). */
802
803
  commentTextPrefix?: string;
803
804
  commentForPrefix?: string;
804
805
  commentIfPrefix?: string;
@@ -806,11 +807,16 @@ interface IWritableConfig {
806
807
  commentElsePrefix?: string;
807
808
  tagNames?: IWritableTagNames;
808
809
  locale?: string;
810
+ /** @deprecated Removed in 4.0, whose `bootstrapState` throws on it (3.5 warns `wcs/v4-migration`). */
809
811
  debug?: boolean;
812
+ /** Moves to the state's `$behavior` in 4.0 (3.5 warns `wcs/v4-migration`); in 3.x, set it here. */
810
813
  enableMustache?: boolean;
814
+ /** Moves to the state's `$behavior` in 4.0 (3.5 warns `wcs/v4-migration`); in 3.x, set it here. */
811
815
  enableDirectionalInitialSync?: boolean;
816
+ /** @deprecated Removed in 4.0, whose `bootstrapState` throws on it (3.5 warns `wcs/v4-migration`). */
812
817
  enablePropagationContext?: boolean;
813
818
  enableContractAnalyzer?: boolean;
819
+ /** Moves to the state's `$behavior` in 4.0 (3.5 warns `wcs/v4-migration`); in 3.x, set it here. */
814
820
  sameValueGuard?: boolean;
815
821
  }
816
822
 
@@ -1670,7 +1676,23 @@ declare class State extends HTMLElementBase implements IStateElement {
1670
1676
  private set _state(value);
1671
1677
  attributeChangedCallback(_name: string, oldValue: string | null, newValue: string | null): void;
1672
1678
  private _loadFromSsrElement;
1673
- /** state / src / json / inner <script> / API set のソース解決(_initialize とボリュームで共用)。 */
1679
+ /**
1680
+ * state / src / json / inner <script> / API set のソース解決(_initialize とボリュームで共用)。
1681
+ *
1682
+ * A load failure is not wrapped, here or in the loaders: what was thrown propagates as is —
1683
+ * the SyntaxError of `JSON.parse` (`state=` / `json=`), the `import()` rejection or the
1684
+ * module's own throw (`src="*.js"`), the inline-script loader's Error (the import failure is
1685
+ * its `cause`), the unsupported-extension error, or a non-Error value. On a root,
1686
+ * `_failInitializeLoudly` logs it under the element's "failed to initialize" line and rejects
1687
+ * connectedCallbackPromise with that same value (the README contract); on a volume,
1688
+ * volumeLifecycle logs it under its "failed to load" line. The old wrappers
1689
+ * (`Failed to initialize state: ${e}` here, `Failed to load script file` /
1690
+ * `Failed to parse JSON from script element` in the loaders) were new Errors that kept the
1691
+ * original only as text, losing its type, stack and cause.
1692
+ *
1693
+ * Two sources do not fail at all in 3.x (README): `src="*.json"` that cannot be fetched or
1694
+ * parsed, and `state=` naming no JSON script. Both log and start with an empty state.
1695
+ */
1674
1696
  private _loadStateFromSource;
1675
1697
  /**
1676
1698
  * 初回マウントのロードと登録。戻り値は「この接続で初期化を**完了**したか」で、