@passui/tanstack 0.2.1 → 0.2.3

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.
@@ -1,26 +1,13 @@
1
1
  import { createComponent, getNextElement, getNextMarker, insert, template } from "solid-js/web";
2
- import { Show } from "solid-js";
3
- import { Outlet, useLocation } from "@tanstack/solid-router";
2
+ import { Outlet } from "@tanstack/solid-router";
4
3
  //#region src/solid/auth-shell/auth-shell.tsx
5
4
  /** @jsxImportSource solid-js */
6
- var _tmpl$ = /*#__PURE__*/ template(`<section class="relative isolate flex min-h-dvh flex-col items-center justify-center px-4 py-12"><div class="flex w-full max-w-[26rem] flex-col items-start gap-6"><!$><!/><!$><!/>`);
7
- var _tmpl$2 = /*#__PURE__*/ template(`<div class="w-full motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-right-4 motion-safe:duration-500">`);
5
+ var _tmpl$ = /*#__PURE__*/ template(`<section class="relative isolate flex min-h-dvh flex-col items-center justify-center px-4 py-12"><div class="flex w-full max-w-[26rem] flex-col items-start gap-6"><!$><!/><div class=w-full>`);
8
6
  function AuthShell(props) {
9
- const location = useLocation();
10
7
  return (() => {
11
- var _el$ = getNextElement(_tmpl$), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, [_el$4, _co$] = getNextMarker(_el$3.nextSibling), _el$5 = _el$4.nextSibling, [_el$6, _co$2] = getNextMarker(_el$5.nextSibling);
12
- insert(_el$2, () => props.brand, _el$4, _co$);
13
- insert(_el$2, createComponent(Show, {
14
- get when() {
15
- return location().pathname;
16
- },
17
- keyed: true,
18
- children: (_pathname) => (() => {
19
- var _el$7 = getNextElement(_tmpl$2);
20
- insert(_el$7, createComponent(Outlet, {}));
21
- return _el$7;
22
- })()
23
- }), _el$6, _co$2);
8
+ var _el$ = getNextElement(_tmpl$), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, [_el$5, _co$] = getNextMarker(_el$4.nextSibling), _el$3 = _el$5.nextSibling;
9
+ insert(_el$2, () => props.brand, _el$5, _co$);
10
+ insert(_el$3, createComponent(Outlet, {}));
24
11
  return _el$;
25
12
  })();
26
13
  }
@@ -1,28 +1,15 @@
1
1
  import { createComponent, escape, ssr, ssrHydrationKey } from "solid-js/web";
2
- import { Show } from "solid-js";
3
- import { Outlet, useLocation } from "@tanstack/solid-router";
2
+ import { Outlet } from "@tanstack/solid-router";
4
3
  //#region src/solid/auth-shell/auth-shell.tsx
5
4
  /** @jsxImportSource solid-js */
6
5
  var _tmpl$ = [
7
6
  "<section",
8
7
  " class=\"relative isolate flex min-h-dvh flex-col items-center justify-center px-4 py-12\"><div class=\"flex w-full max-w-[26rem] flex-col items-start gap-6\"><!--$-->",
9
- "<!--/--><!--$-->",
10
- "<!--/--></div></section>"
11
- ];
12
- var _tmpl$2 = [
13
- "<div",
14
- " class=\"w-full motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-right-4 motion-safe:duration-500\">",
15
- "</div>"
8
+ "<!--/--><div class=\"w-full\">",
9
+ "</div></div></section>"
16
10
  ];
17
11
  function AuthShell(props) {
18
- const location = useLocation();
19
- return ssr(_tmpl$, ssrHydrationKey(), escape(props.brand), escape(createComponent(Show, {
20
- get when() {
21
- return location().pathname;
22
- },
23
- keyed: true,
24
- children: (_pathname) => ssr(_tmpl$2, ssrHydrationKey(), escape(createComponent(Outlet, {})))
25
- })));
12
+ return ssr(_tmpl$, ssrHydrationKey(), escape(props.brand), escape(createComponent(Outlet, {})));
26
13
  }
27
14
  //#endregion
28
15
  export { AuthShell };
@@ -1,4 +1,4 @@
1
- import { type JSX } from "solid-js";
1
+ import type { JSX } from "solid-js";
2
2
  export declare function AuthShell(props: {
3
3
  brand: JSX.Element;
4
4
  }): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@passui/tanstack",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -65,8 +65,8 @@
65
65
  "@tanstack/react-router-devtools": "^1.167.2",
66
66
  "@tanstack/react-table": "^9.2.4",
67
67
  "motion": "^13.4.4",
68
- "@passui/react": "^0.1.15",
69
- "@passui/solid": "^0.1.1",
68
+ "@passui/react": "^0.1.17",
69
+ "@passui/solid": "^0.1.5",
70
70
  "solid-js": "1.9.17",
71
71
  "@tanstack/solid-form": "1.33.5",
72
72
  "@tanstack/solid-query": "5.104.5",
@@ -90,57 +90,65 @@
90
90
  "./react/forms": "./src/forms/index.ts",
91
91
  "./solid/forms": {
92
92
  "types": "./dist/types/src/solid/forms/index.d.ts",
93
- "browser": "./dist/client/src/solid/forms/index.js",
93
+ "workerd": "./dist/server/src/solid/forms/index.js",
94
94
  "node": "./dist/server/src/solid/forms/index.js",
95
+ "browser": "./dist/client/src/solid/forms/index.js",
95
96
  "default": "./dist/client/src/solid/forms/index.js"
96
97
  },
97
98
  "./react/form-fields": "./src/form-fields/index.ts",
98
99
  "./solid/form-fields": {
99
100
  "types": "./dist/types/src/solid/form-fields/index.d.ts",
100
- "browser": "./dist/client/src/solid/form-fields/index.js",
101
+ "workerd": "./dist/server/src/solid/form-fields/index.js",
101
102
  "node": "./dist/server/src/solid/form-fields/index.js",
103
+ "browser": "./dist/client/src/solid/form-fields/index.js",
102
104
  "default": "./dist/client/src/solid/form-fields/index.js"
103
105
  },
104
106
  "./react/tables": "./src/tables/index.ts",
105
107
  "./solid/tables": {
106
108
  "types": "./dist/types/src/solid/tables/index.d.ts",
107
- "browser": "./dist/client/src/solid/tables/index.js",
109
+ "workerd": "./dist/server/src/solid/tables/index.js",
108
110
  "node": "./dist/server/src/solid/tables/index.js",
111
+ "browser": "./dist/client/src/solid/tables/index.js",
109
112
  "default": "./dist/client/src/solid/tables/index.js"
110
113
  },
111
114
  "./react/document": "./src/document/index.ts",
112
115
  "./solid/document": {
113
116
  "types": "./dist/types/src/solid/document/index.d.ts",
114
- "browser": "./dist/client/src/solid/document/index.js",
117
+ "workerd": "./dist/server/src/solid/document/index.js",
115
118
  "node": "./dist/server/src/solid/document/index.js",
119
+ "browser": "./dist/client/src/solid/document/index.js",
116
120
  "default": "./dist/client/src/solid/document/index.js"
117
121
  },
118
122
  "./react/auth-shell": "./src/auth-shell/index.ts",
119
123
  "./solid/auth-shell": {
120
124
  "types": "./dist/types/src/solid/auth-shell/index.d.ts",
121
- "browser": "./dist/client/src/solid/auth-shell/index.js",
125
+ "workerd": "./dist/server/src/solid/auth-shell/index.js",
122
126
  "node": "./dist/server/src/solid/auth-shell/index.js",
127
+ "browser": "./dist/client/src/solid/auth-shell/index.js",
123
128
  "default": "./dist/client/src/solid/auth-shell/index.js"
124
129
  },
125
130
  "./react/settings": "./src/settings/index.ts",
126
131
  "./solid/settings": {
127
132
  "types": "./dist/types/src/solid/settings/index.d.ts",
128
- "browser": "./dist/client/src/solid/settings/index.js",
133
+ "workerd": "./dist/server/src/solid/settings/index.js",
129
134
  "node": "./dist/server/src/solid/settings/index.js",
135
+ "browser": "./dist/client/src/solid/settings/index.js",
130
136
  "default": "./dist/client/src/solid/settings/index.js"
131
137
  },
132
138
  "./react/mutation": "./src/mutation/index.ts",
133
139
  "./solid/mutation": {
134
140
  "types": "./dist/types/src/solid/mutation/index.d.ts",
135
- "browser": "./dist/client/src/solid/mutation/index.js",
141
+ "workerd": "./dist/server/src/solid/mutation/index.js",
136
142
  "node": "./dist/server/src/solid/mutation/index.js",
143
+ "browser": "./dist/client/src/solid/mutation/index.js",
137
144
  "default": "./dist/client/src/solid/mutation/index.js"
138
145
  },
139
146
  "./react/route-boundary": "./src/route-boundary/index.ts",
140
147
  "./solid/route-boundary": {
141
148
  "types": "./dist/types/src/solid/route-boundary/index.d.ts",
142
- "browser": "./dist/client/src/solid/route-boundary/index.js",
149
+ "workerd": "./dist/server/src/solid/route-boundary/index.js",
143
150
  "node": "./dist/server/src/solid/route-boundary/index.js",
151
+ "browser": "./dist/client/src/solid/route-boundary/index.js",
144
152
  "default": "./dist/client/src/solid/route-boundary/index.js"
145
153
  },
146
154
  "./react/styles.css": "./src/styles.css",
@@ -1,23 +1,13 @@
1
- import { Outlet, useLocation } from "@tanstack/react-router"
1
+ import { Outlet } from "@tanstack/react-router"
2
2
  import type { ReactNode } from "react"
3
3
 
4
- /**
5
- * The frame for every page reached before or outside an app (sign in, create
6
- * account, recovery, consent): no card, a soft light behind the page, the
7
- * brand on top, content sliding in as you move through the flow. CSS
8
- * animations only, so the page is never hidden waiting on JavaScript.
9
- */
4
+ /** Auth routes share a stable frame; pages own their transitions. */
10
5
  export function AuthShell({ brand }: { brand: ReactNode }) {
11
- const { pathname } = useLocation()
12
-
13
6
  return (
14
7
  <section className="relative isolate flex min-h-dvh flex-col items-center justify-center px-4 py-12">
15
8
  <div className="flex w-full max-w-[26rem] flex-col items-start gap-6">
16
9
  {brand}
17
- <div
18
- key={pathname}
19
- className="w-full motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-right-4 motion-safe:duration-500 motion-safe:ease-out"
20
- >
10
+ <div className="w-full">
21
11
  <Outlet />
22
12
  </div>
23
13
  </div>
@@ -1,19 +1,15 @@
1
1
  /** @jsxImportSource solid-js */
2
- import { Outlet, useLocation } from "@tanstack/solid-router"
3
- import { Show, type JSX } from "solid-js"
2
+ import { Outlet } from "@tanstack/solid-router"
3
+ import type { JSX } from "solid-js"
4
+
4
5
  export function AuthShell(props: { brand: JSX.Element }) {
5
- const location = useLocation()
6
6
  return (
7
7
  <section class="relative isolate flex min-h-dvh flex-col items-center justify-center px-4 py-12">
8
8
  <div class="flex w-full max-w-[26rem] flex-col items-start gap-6">
9
9
  {props.brand}
10
- <Show when={location().pathname} keyed>
11
- {(_pathname) => (
12
- <div class="w-full motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-right-4 motion-safe:duration-500">
13
- <Outlet />
14
- </div>
15
- )}
16
- </Show>
10
+ <div class="w-full">
11
+ <Outlet />
12
+ </div>
17
13
  </div>
18
14
  </section>
19
15
  )