@lovrozagar/flare 0.5.1 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrozagar/flare",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Solid meta-framework. Server-driven, NDJSON streaming, renderToStream.",
5
5
  "keywords": [
6
6
  "flare",
@@ -130,10 +130,10 @@
130
130
  "peerDependencies": {
131
131
  "@babel/parser": ">=8.0.0",
132
132
  "@formatjs/intl-localematcher": ">=0.6.0",
133
- "@solidjs/vite-plugin": ">=3.0.0-next.0",
134
- "@solidjs/web": ">=2.0.0-rc.0",
133
+ "@solidjs/vite-plugin": ">=3.0.0-next.47",
134
+ "@solidjs/web": ">=2.0.0-rc.13",
135
135
  "@tanstack/query-broadcast-client-experimental": ">=5.0.0",
136
- "@tanstack/solid-query": ">=6.0.0-rc.0",
136
+ "@tanstack/solid-query": ">=6.0.0-rc.5",
137
137
  "isbot": ">=5.0.0",
138
138
  "magic-string": ">=0.30.0",
139
139
  "negotiator": ">=1.0.0",
@@ -141,7 +141,7 @@
141
141
  "oxc-parser": ">=0.139.0",
142
142
  "oxc-resolver": ">=11.23.0",
143
143
  "sharp": ">=0.33.0",
144
- "solid-js": ">=2.0.0-rc.0",
144
+ "solid-js": ">=2.0.0-rc.13",
145
145
  "tailwindcss": ">=4.0.0",
146
146
  "vite": ">=8.0.0"
147
147
  },
@@ -11,7 +11,7 @@ export {
11
11
  } from "./await.tsx";
12
12
  export { DirectionScript, type DirectionScriptProps } from "./direction-script.tsx";
13
13
  export { ResetCSS } from "./reset-css.tsx";
14
- export { SSRContextProvider, type SSRContextValue, setSSRContext, useSSRContext } from "./ssr-context.tsx";
14
+ export { SSRContextProvider, type SSRContextValue, useSSRContext } from "./ssr-context.tsx";
15
15
  export { ThemeScript, type ThemeScriptProps } from "./theme-script.tsx";
16
16
  export { ViewTransitionCSS, type ViewTransitionCSSProps } from "./view-transition-css.tsx";
17
17
 
@@ -18,9 +18,6 @@ export interface SSRContextValue {
18
18
 
19
19
  const SSRCtx = createContext<SSRContextValue | null>(null);
20
20
 
21
- /** @deprecated Wrap the tree with SSRContextProvider. Solid 2 has no sharedConfig.context. */
22
- export function setSSRContext(_value: SSRContextValue): void {}
23
-
24
21
  export function useSSRContext(): SSRContextValue | undefined {
25
22
  return useContext(SSRCtx) ?? undefined;
26
23
  }
@@ -1,4 +1,4 @@
1
- import { createContext, createEffect, createSignal, onSettled, sharedConfig, untrack, useContext } from "solid-js";
1
+ import { createContext, createEffect, createSignal, isHydrating, onSettled, untrack, useContext } from "solid-js";
2
2
  import { isServer, type JSX } from "@solidjs/web";
3
3
 
4
4
  export type Direction = "ltr" | "rtl";
@@ -61,7 +61,7 @@ export function DirectionProvider(props: { children: JSX.Element; config?: Direc
61
61
  storageKey: props.config?.storageKey ?? DEFAULT_CONFIG.storageKey,
62
62
  };
63
63
 
64
- const hydrating = isServer || !!sharedConfig.hydrating;
64
+ const hydrating = isServer || isHydrating();
65
65
 
66
66
  /* During SSR + hydration, start from defaultDir so the tree matches.
67
67
  DirectionScript already applied localStorage to <html> before first paint. */
@@ -1,6 +1,6 @@
1
1
  import type { JSX } from "@solidjs/web";
2
2
  import { Dynamic, isServer } from "@solidjs/web";
3
- import { type Component, createSignal, onSettled, Show, sharedConfig, untrack } from "solid-js";
3
+ import { type Component, createSignal, isHydrating, onSettled, Show, untrack } from "solid-js";
4
4
  import { retryImport } from "../internal.ts";
5
5
  import { warn } from "../logger.ts";
6
6
  import { GLOBAL_LAZY_LOADED, GLOBAL_LAZY_PENDING } from "../protocol.ts";
@@ -56,7 +56,7 @@ export function lazy<P extends Record<string, unknown>>(options: LazyOptions<P>)
56
56
  getGlobalPending().add(loadPromise);
57
57
 
58
58
  return ((props: P) => {
59
- const isSSR = isServer || !!sharedConfig.hydrating;
59
+ const isSSR = isServer || isHydrating();
60
60
 
61
61
  /* Pre-known error at render time → throw from component body */
62
62
  if (loadError) throw loadError;
@@ -116,7 +116,7 @@ export function clientLazy<P extends Record<string, unknown>>(
116
116
  }
117
117
 
118
118
  return ((props: P & { pending?: Component<P> }) => {
119
- const isSSR = isServer || !!sharedConfig.hydrating;
119
+ const isSSR = isServer || isHydrating();
120
120
 
121
121
  /* Pre-known error at render time → throw from component body */
122
122
  if (loadError) throw loadError;
@@ -3,8 +3,8 @@ import {
3
3
  createEffect,
4
4
  createMemo,
5
5
  createSignal,
6
+ isHydrating,
6
7
  onSettled,
7
- sharedConfig,
8
8
  untrack,
9
9
  useContext,
10
10
  } from "solid-js";
@@ -68,7 +68,7 @@ export function ThemeProvider(props: { children: JSX.Element; config?: ThemeConf
68
68
  themes: props.config?.themes ?? DEFAULT_CONFIG.themes,
69
69
  };
70
70
 
71
- const hydrating = isServer || !!sharedConfig.hydrating;
71
+ const hydrating = isServer || isHydrating();
72
72
 
73
73
  /* During SSR + hydration, always start from defaultTheme so the tree matches.
74
74
  ThemeScript already applied localStorage to <html> before first paint.