@valbuild/tanstack 0.146.4 → 0.148.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/client/dist/valbuild-tanstack-client.cjs.dev.js +6 -6
  3. package/client/dist/valbuild-tanstack-client.cjs.prod.js +6 -6
  4. package/client/dist/valbuild-tanstack-client.esm.js +4 -4
  5. package/demo/dist/valbuild-tanstack-demo.cjs.d.ts +2 -0
  6. package/demo/dist/valbuild-tanstack-demo.cjs.dev.js +105 -0
  7. package/demo/dist/valbuild-tanstack-demo.cjs.js +7 -0
  8. package/demo/dist/valbuild-tanstack-demo.cjs.prod.js +105 -0
  9. package/demo/dist/valbuild-tanstack-demo.esm.js +101 -0
  10. package/demo/package.json +4 -0
  11. package/dist/{ValOverlayContext-3f080cce.cjs.dev.js → ValOverlayContext-510328ec.cjs.dev.js} +17 -17
  12. package/dist/{ValOverlayContext-59a0b19f.esm.js → ValOverlayContext-6278320b.esm.js} +1 -1
  13. package/dist/{ValOverlayContext-3e2c48a6.cjs.prod.js → ValOverlayContext-d3acd157.cjs.prod.js} +17 -17
  14. package/dist/{version-4da65f4f.esm.js → asyncToGenerator-500f022f.esm.js} +1 -149
  15. package/dist/{version-2cbea560.cjs.prod.js → asyncToGenerator-8e5c36c8.cjs.prod.js} +0 -151
  16. package/dist/{version-1f65da50.cjs.dev.js → asyncToGenerator-c3823d62.cjs.dev.js} +0 -151
  17. package/dist/declarations/src/ValApp.d.ts +15 -1
  18. package/dist/declarations/src/ValProvider.d.ts +1 -0
  19. package/dist/declarations/src/demo/index.d.ts +7 -0
  20. package/dist/declarations/src/demo/initValDemoServer.d.ts +27 -0
  21. package/dist/demoServiceWorker-382e1b63.cjs.dev.js +60 -0
  22. package/dist/demoServiceWorker-56fd96cf.esm.js +55 -0
  23. package/dist/demoServiceWorker-994710f7.cjs.prod.js +60 -0
  24. package/dist/{routeFromVal-385ee69c.cjs.dev.js → routeFromVal-0ea4586f.cjs.dev.js} +17 -24
  25. package/dist/{routeFromVal-ffa948ef.cjs.prod.js → routeFromVal-97a52f43.cjs.prod.js} +17 -24
  26. package/dist/{routeFromVal-ae54a17e.esm.js → routeFromVal-9f1f8725.esm.js} +7 -13
  27. package/dist/{createForOfIteratorHelper-93a62170.esm.js → typeof-66e2d869.esm.js} +11 -1
  28. package/dist/{createForOfIteratorHelper-9afd7d2d.cjs.prod.js → typeof-8998e126.cjs.prod.js} +11 -0
  29. package/dist/{createForOfIteratorHelper-4497beef.cjs.dev.js → typeof-dd0246a1.cjs.dev.js} +11 -0
  30. package/dist/valbuild-tanstack.cjs.dev.js +371 -42
  31. package/dist/valbuild-tanstack.cjs.prod.js +371 -42
  32. package/dist/valbuild-tanstack.esm.js +337 -8
  33. package/dist/version-32d982ef.cjs.prod.js +179 -0
  34. package/dist/version-c2d4fa07.esm.js +174 -0
  35. package/dist/version-e7d79f54.cjs.dev.js +179 -0
  36. package/package.json +16 -10
  37. package/server/dist/valbuild-tanstack-server.cjs.dev.js +60 -75
  38. package/server/dist/valbuild-tanstack-server.cjs.prod.js +60 -75
  39. package/server/dist/valbuild-tanstack-server.esm.js +4 -19
@@ -0,0 +1,174 @@
1
+ import { _ as _asyncToGenerator, a as _regenerator } from './asyncToGenerator-500f022f.esm.js';
2
+ import { d as _arrayLikeToArray, e as _unsupportedIterableToArray } from './typeof-66e2d869.esm.js';
3
+
4
+ /**
5
+ * How `initVal().isValEnabled()` reaches the server without importing it.
6
+ *
7
+ * EXPERIMENTAL — see VAL_PROMPT.md.
8
+ *
9
+ * The cookie can only be read through `@tanstack/react-start/server`, and that
10
+ * module is reachable from this package's ROOT entry, which every client
11
+ * component imports. `initVal.ts` used `await import()` for exactly that reason,
12
+ * and under Vite the dynamic form does keep it out of the client bundle.
13
+ *
14
+ * It does not everywhere. A host that bundles this package ahead of time and
15
+ * audits what each chunk imports sees a dynamically imported chunk as a chunk
16
+ * like any other, and this one reaches TanStack's SSR path and lands on
17
+ * `node:stream/web`. That is why `@valbuild/tanstack` could not be built for a
18
+ * Cloudflare Worker at all.
19
+ *
20
+ * So the edge is inverted. The root entry holds a slot; `@valbuild/tanstack/server`
21
+ * fills it on import with the implementation that was already there,
22
+ * `hasValEnableCookieOnServer`. Nothing about the behaviour changes for an app
23
+ * that imports `/server` — which every app with a Val API does — and the root
24
+ * entry no longer names TanStack's server module at all.
25
+ *
26
+ * Ordering: the slot is filled when `/server` is first imported. An
27
+ * `isValEnabled()` call that somehow happens before that returns false, which
28
+ * is what the old implementation's `catch` returned in the same situation.
29
+ */
30
+
31
+ var reader = null;
32
+ function setValEnableCookieReader(read) {
33
+ reader = read;
34
+ }
35
+ function readValEnableCookie() {
36
+ return _readValEnableCookie.apply(this, arguments);
37
+ }
38
+ function _readValEnableCookie() {
39
+ _readValEnableCookie = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
40
+ return _regenerator().w(function (_context) {
41
+ while (1) switch (_context.p = _context.n) {
42
+ case 0:
43
+ if (reader) {
44
+ _context.n = 1;
45
+ break;
46
+ }
47
+ return _context.a(2, false);
48
+ case 1:
49
+ _context.p = 1;
50
+ _context.n = 2;
51
+ return reader();
52
+ case 2:
53
+ return _context.a(2, _context.v);
54
+ case 3:
55
+ _context.p = 3;
56
+ _context.v;
57
+ return _context.a(2, false);
58
+ }
59
+ }, _callee, null, [[1, 3]]);
60
+ }));
61
+ return _readValEnableCookie.apply(this, arguments);
62
+ }
63
+
64
+ function _arrayWithoutHoles(r) {
65
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
66
+ }
67
+
68
+ function _iterableToArray(r) {
69
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
70
+ }
71
+
72
+ function _nonIterableSpread() {
73
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
74
+ }
75
+
76
+ function _toConsumableArray(r) {
77
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
78
+ }
79
+
80
+ var packageJson = {
81
+ name: "@valbuild/tanstack",
82
+ description: "Val for TanStack Start: hard-coded content - super-charged",
83
+ "private": false,
84
+ repository: {
85
+ type: "git",
86
+ url: "git+https://github.com/valbuild/val.git"
87
+ },
88
+ sideEffects: true,
89
+ keywords: [
90
+ "CMS",
91
+ "tanstack",
92
+ "tanstack-start",
93
+ "tanstack-router",
94
+ "react"
95
+ ],
96
+ version: "0.148.0",
97
+ scripts: {
98
+ typecheck: "tsc --noEmit",
99
+ test: "jest"
100
+ },
101
+ main: "dist/valbuild-tanstack.cjs.js",
102
+ module: "dist/valbuild-tanstack.esm.js",
103
+ exports: {
104
+ ".": {
105
+ module: "./dist/valbuild-tanstack.esm.js",
106
+ "default": "./dist/valbuild-tanstack.cjs.js"
107
+ },
108
+ "./demo": {
109
+ module: "./demo/dist/valbuild-tanstack-demo.esm.js",
110
+ "default": "./demo/dist/valbuild-tanstack-demo.cjs.js"
111
+ },
112
+ "./client": {
113
+ module: "./client/dist/valbuild-tanstack-client.esm.js",
114
+ "default": "./client/dist/valbuild-tanstack-client.cjs.js"
115
+ },
116
+ "./server": {
117
+ module: "./server/dist/valbuild-tanstack-server.esm.js",
118
+ "default": "./server/dist/valbuild-tanstack-server.cjs.js"
119
+ },
120
+ "./package.json": "./package.json"
121
+ },
122
+ types: "dist/valbuild-tanstack.cjs.d.ts",
123
+ preconstruct: {
124
+ entrypoints: [
125
+ "./index.ts",
126
+ "./server/index.ts",
127
+ "./client/index.ts",
128
+ "./demo/index.ts"
129
+ ],
130
+ exports: true
131
+ },
132
+ dependencies: {
133
+ "@valbuild/core": "workspace:*",
134
+ "@valbuild/language-server": "workspace:*",
135
+ "@valbuild/mcp": "workspace:*",
136
+ "@valbuild/react": "workspace:*",
137
+ "@valbuild/server": "workspace:*",
138
+ "@valbuild/shared": "workspace:*",
139
+ "@valbuild/ui": "workspace:*"
140
+ },
141
+ devDependencies: {
142
+ "@tanstack/react-router": "^1.170.41",
143
+ "@tanstack/react-start": "^1.168.60",
144
+ "@testing-library/react": "^16.3.3",
145
+ "@types/react": "^19.2.18",
146
+ "@types/react-dom": "^19.2.5",
147
+ "jest-environment-jsdom": "^30.5.0",
148
+ react: "^19.2.8",
149
+ "react-dom": "^19.2.8",
150
+ typescript: "^6.0.3"
151
+ },
152
+ peerDependencies: {
153
+ "@tanstack/react-router": ">=1.130.0",
154
+ "@tanstack/react-start": ">=1.130.0",
155
+ react: ">=19.0.0",
156
+ "react-dom": ">=19.0.0"
157
+ },
158
+ externals: [
159
+ "@tanstack/react-router",
160
+ "@tanstack/react-start"
161
+ ],
162
+ files: [
163
+ "CHANGELOG.md",
164
+ "dist",
165
+ "client",
166
+ "server",
167
+ "demo"
168
+ ]
169
+ };
170
+
171
+ var _packageJson$version;
172
+ var VERSION = (_packageJson$version = packageJson.version) !== null && _packageJson$version !== void 0 ? _packageJson$version : null;
173
+
174
+ export { VERSION as V, _toConsumableArray as _, readValEnableCookie as r, setValEnableCookieReader as s };
@@ -0,0 +1,179 @@
1
+ 'use strict';
2
+
3
+ var asyncToGenerator = require('./asyncToGenerator-c3823d62.cjs.dev.js');
4
+ var _typeof = require('./typeof-dd0246a1.cjs.dev.js');
5
+
6
+ /**
7
+ * How `initVal().isValEnabled()` reaches the server without importing it.
8
+ *
9
+ * EXPERIMENTAL — see VAL_PROMPT.md.
10
+ *
11
+ * The cookie can only be read through `@tanstack/react-start/server`, and that
12
+ * module is reachable from this package's ROOT entry, which every client
13
+ * component imports. `initVal.ts` used `await import()` for exactly that reason,
14
+ * and under Vite the dynamic form does keep it out of the client bundle.
15
+ *
16
+ * It does not everywhere. A host that bundles this package ahead of time and
17
+ * audits what each chunk imports sees a dynamically imported chunk as a chunk
18
+ * like any other, and this one reaches TanStack's SSR path and lands on
19
+ * `node:stream/web`. That is why `@valbuild/tanstack` could not be built for a
20
+ * Cloudflare Worker at all.
21
+ *
22
+ * So the edge is inverted. The root entry holds a slot; `@valbuild/tanstack/server`
23
+ * fills it on import with the implementation that was already there,
24
+ * `hasValEnableCookieOnServer`. Nothing about the behaviour changes for an app
25
+ * that imports `/server` — which every app with a Val API does — and the root
26
+ * entry no longer names TanStack's server module at all.
27
+ *
28
+ * Ordering: the slot is filled when `/server` is first imported. An
29
+ * `isValEnabled()` call that somehow happens before that returns false, which
30
+ * is what the old implementation's `catch` returned in the same situation.
31
+ */
32
+
33
+ var reader = null;
34
+ function setValEnableCookieReader(read) {
35
+ reader = read;
36
+ }
37
+ function readValEnableCookie() {
38
+ return _readValEnableCookie.apply(this, arguments);
39
+ }
40
+ function _readValEnableCookie() {
41
+ _readValEnableCookie = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee() {
42
+ return asyncToGenerator._regenerator().w(function (_context) {
43
+ while (1) switch (_context.p = _context.n) {
44
+ case 0:
45
+ if (reader) {
46
+ _context.n = 1;
47
+ break;
48
+ }
49
+ return _context.a(2, false);
50
+ case 1:
51
+ _context.p = 1;
52
+ _context.n = 2;
53
+ return reader();
54
+ case 2:
55
+ return _context.a(2, _context.v);
56
+ case 3:
57
+ _context.p = 3;
58
+ _context.v;
59
+ return _context.a(2, false);
60
+ }
61
+ }, _callee, null, [[1, 3]]);
62
+ }));
63
+ return _readValEnableCookie.apply(this, arguments);
64
+ }
65
+
66
+ function _arrayWithoutHoles(r) {
67
+ if (Array.isArray(r)) return _typeof._arrayLikeToArray(r);
68
+ }
69
+
70
+ function _iterableToArray(r) {
71
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
72
+ }
73
+
74
+ function _nonIterableSpread() {
75
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
76
+ }
77
+
78
+ function _toConsumableArray(r) {
79
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _typeof._unsupportedIterableToArray(r) || _nonIterableSpread();
80
+ }
81
+
82
+ var packageJson = {
83
+ name: "@valbuild/tanstack",
84
+ description: "Val for TanStack Start: hard-coded content - super-charged",
85
+ "private": false,
86
+ repository: {
87
+ type: "git",
88
+ url: "git+https://github.com/valbuild/val.git"
89
+ },
90
+ sideEffects: true,
91
+ keywords: [
92
+ "CMS",
93
+ "tanstack",
94
+ "tanstack-start",
95
+ "tanstack-router",
96
+ "react"
97
+ ],
98
+ version: "0.148.0",
99
+ scripts: {
100
+ typecheck: "tsc --noEmit",
101
+ test: "jest"
102
+ },
103
+ main: "dist/valbuild-tanstack.cjs.js",
104
+ module: "dist/valbuild-tanstack.esm.js",
105
+ exports: {
106
+ ".": {
107
+ module: "./dist/valbuild-tanstack.esm.js",
108
+ "default": "./dist/valbuild-tanstack.cjs.js"
109
+ },
110
+ "./demo": {
111
+ module: "./demo/dist/valbuild-tanstack-demo.esm.js",
112
+ "default": "./demo/dist/valbuild-tanstack-demo.cjs.js"
113
+ },
114
+ "./client": {
115
+ module: "./client/dist/valbuild-tanstack-client.esm.js",
116
+ "default": "./client/dist/valbuild-tanstack-client.cjs.js"
117
+ },
118
+ "./server": {
119
+ module: "./server/dist/valbuild-tanstack-server.esm.js",
120
+ "default": "./server/dist/valbuild-tanstack-server.cjs.js"
121
+ },
122
+ "./package.json": "./package.json"
123
+ },
124
+ types: "dist/valbuild-tanstack.cjs.d.ts",
125
+ preconstruct: {
126
+ entrypoints: [
127
+ "./index.ts",
128
+ "./server/index.ts",
129
+ "./client/index.ts",
130
+ "./demo/index.ts"
131
+ ],
132
+ exports: true
133
+ },
134
+ dependencies: {
135
+ "@valbuild/core": "workspace:*",
136
+ "@valbuild/language-server": "workspace:*",
137
+ "@valbuild/mcp": "workspace:*",
138
+ "@valbuild/react": "workspace:*",
139
+ "@valbuild/server": "workspace:*",
140
+ "@valbuild/shared": "workspace:*",
141
+ "@valbuild/ui": "workspace:*"
142
+ },
143
+ devDependencies: {
144
+ "@tanstack/react-router": "^1.170.41",
145
+ "@tanstack/react-start": "^1.168.60",
146
+ "@testing-library/react": "^16.3.3",
147
+ "@types/react": "^19.2.18",
148
+ "@types/react-dom": "^19.2.5",
149
+ "jest-environment-jsdom": "^30.5.0",
150
+ react: "^19.2.8",
151
+ "react-dom": "^19.2.8",
152
+ typescript: "^6.0.3"
153
+ },
154
+ peerDependencies: {
155
+ "@tanstack/react-router": ">=1.130.0",
156
+ "@tanstack/react-start": ">=1.130.0",
157
+ react: ">=19.0.0",
158
+ "react-dom": ">=19.0.0"
159
+ },
160
+ externals: [
161
+ "@tanstack/react-router",
162
+ "@tanstack/react-start"
163
+ ],
164
+ files: [
165
+ "CHANGELOG.md",
166
+ "dist",
167
+ "client",
168
+ "server",
169
+ "demo"
170
+ ]
171
+ };
172
+
173
+ var _packageJson$version;
174
+ var VERSION = (_packageJson$version = packageJson.version) !== null && _packageJson$version !== void 0 ? _packageJson$version : null;
175
+
176
+ exports.VERSION = VERSION;
177
+ exports._toConsumableArray = _toConsumableArray;
178
+ exports.readValEnableCookie = readValEnableCookie;
179
+ exports.setValEnableCookieReader = setValEnableCookieReader;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "tanstack-router",
15
15
  "react"
16
16
  ],
17
- "version": "0.146.4",
17
+ "version": "0.148.0",
18
18
  "main": "dist/valbuild-tanstack.cjs.js",
19
19
  "module": "dist/valbuild-tanstack.esm.js",
20
20
  "exports": {
@@ -22,6 +22,10 @@
22
22
  "module": "./dist/valbuild-tanstack.esm.js",
23
23
  "default": "./dist/valbuild-tanstack.cjs.js"
24
24
  },
25
+ "./demo": {
26
+ "module": "./demo/dist/valbuild-tanstack-demo.esm.js",
27
+ "default": "./demo/dist/valbuild-tanstack-demo.cjs.js"
28
+ },
25
29
  "./client": {
26
30
  "module": "./client/dist/valbuild-tanstack-client.esm.js",
27
31
  "default": "./client/dist/valbuild-tanstack-client.cjs.js"
@@ -37,18 +41,19 @@
37
41
  "entrypoints": [
38
42
  "./index.ts",
39
43
  "./server/index.ts",
40
- "./client/index.ts"
44
+ "./client/index.ts",
45
+ "./demo/index.ts"
41
46
  ],
42
47
  "exports": true
43
48
  },
44
49
  "dependencies": {
45
- "@valbuild/core": "0.146.2",
46
- "@valbuild/language-server": "0.146.4",
47
- "@valbuild/mcp": "0.146.4",
48
- "@valbuild/react": "0.146.4",
49
- "@valbuild/server": "0.146.4",
50
- "@valbuild/shared": "0.146.4",
51
- "@valbuild/ui": "0.146.4"
50
+ "@valbuild/core": "0.148.0",
51
+ "@valbuild/language-server": "0.148.0",
52
+ "@valbuild/mcp": "0.148.0",
53
+ "@valbuild/react": "0.148.0",
54
+ "@valbuild/server": "0.148.0",
55
+ "@valbuild/shared": "0.148.0",
56
+ "@valbuild/ui": "0.148.0"
52
57
  },
53
58
  "devDependencies": {
54
59
  "@tanstack/react-router": "^1.170.41",
@@ -75,7 +80,8 @@
75
80
  "CHANGELOG.md",
76
81
  "dist",
77
82
  "client",
78
- "server"
83
+ "server",
84
+ "demo"
79
85
  ],
80
86
  "scripts": {
81
87
  "typecheck": "tsc --noEmit",