@valbuild/tanstack 0.146.3 → 0.147.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 +66 -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-d506fa5a.esm.js → asyncToGenerator-500f022f.esm.js} +1 -149
  15. package/dist/{version-2e1a465b.cjs.prod.js → asyncToGenerator-8e5c36c8.cjs.prod.js} +0 -151
  16. package/dist/{version-1226397e.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 +390 -43
  31. package/dist/valbuild-tanstack.cjs.prod.js +390 -43
  32. package/dist/valbuild-tanstack.esm.js +356 -9
  33. package/dist/version-1ae7092b.esm.js +174 -0
  34. package/dist/version-83d7f4b7.cjs.prod.js +179 -0
  35. package/dist/version-a820698f.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,179 @@
1
+ 'use strict';
2
+
3
+ var asyncToGenerator = require('./asyncToGenerator-8e5c36c8.cjs.prod.js');
4
+ var _typeof = require('./typeof-8998e126.cjs.prod.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.147.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;
@@ -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.147.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.3",
17
+ "version": "0.147.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.2",
47
- "@valbuild/mcp": "0.146.2",
48
- "@valbuild/react": "0.146.2",
49
- "@valbuild/server": "0.146.2",
50
- "@valbuild/shared": "0.146.2",
51
- "@valbuild/ui": "0.146.2"
50
+ "@valbuild/core": "0.147.0",
51
+ "@valbuild/language-server": "0.147.0",
52
+ "@valbuild/react": "0.147.0",
53
+ "@valbuild/server": "0.147.0",
54
+ "@valbuild/mcp": "0.147.0",
55
+ "@valbuild/ui": "0.147.0",
56
+ "@valbuild/shared": "0.147.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",