@valbuild/shared 0.87.5 → 0.88.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/README.md CHANGED
@@ -1,23 +1,9 @@
1
- # Shared types and utils
1
+ # Val Shared
2
2
 
3
- This package contains internal Val types and utils that are shared between other packages.
3
+ This package contains Val's shared types and utilities used across different runtimes and packages.
4
4
 
5
- Since Val has many runtimes (node, browser, QuickJS) and is bundled in different ways and executed different modes (client, SSR, RSC), we need to be careful about how code is bundled. This package gives us an extra place to put code that is shared between all platforms, but that can be run in all runtimes and bundlers.
5
+ NOTE: do not use this directly, use the package corresponding to your meta-framework (e.g. Next) instead.
6
6
 
7
- ## What is goes into this package?
7
+ ## Contributors
8
8
 
9
- Generally speaking, code that are shared between other packages belongs in this package. Specifically:
10
-
11
- - Types and utility functions that does **NOT** belong in core because they:
12
- 1. is not required to execute Val files; or
13
- 1. have dependency on a lib
14
- - Types and utility functions that does **NOT** semantically belong in any other package. Examples:
15
- 1. parser tools
16
- 1. API layer
17
-
18
- See the rules to what does NOT belong in this package below.
19
-
20
- ## What **DOES NOT** go into this package?
21
-
22
- - Any function / type that depends on a UI framework, even transitively (React, ProseMirror, NextJS, Vite...).
23
- - Any function that cannot execute both on server-side and client-side.
9
+ This package provides cross-platform types and utilities that work in all runtimes (node, browser, QuickJS) and bundlers, including API layer types, parser tools, and shared validation logic.
@@ -1 +1,2 @@
1
1
  export declare const VAL_CONFIG_SESSION_STORAGE_KEY = "val-config";
2
+ export declare const VAL_THEME_SESSION_STORAGE_KEY = "val-theme";
@@ -2214,6 +2214,7 @@ var urlOf = function urlOf() {
2214
2214
  };
2215
2215
 
2216
2216
  var VAL_CONFIG_SESSION_STORAGE_KEY = "val-config";
2217
+ var VAL_THEME_SESSION_STORAGE_KEY = "val-theme";
2217
2218
 
2218
2219
  var SharedValConfig = zod.z.object({
2219
2220
  contentHostUrl: zod.z.string().optional(),
@@ -2431,6 +2432,7 @@ exports.VAL_CONFIG_SESSION_STORAGE_KEY = VAL_CONFIG_SESSION_STORAGE_KEY;
2431
2432
  exports.VAL_ENABLE_COOKIE_NAME = VAL_ENABLE_COOKIE_NAME;
2432
2433
  exports.VAL_SESSION_COOKIE = VAL_SESSION_COOKIE;
2433
2434
  exports.VAL_STATE_COOKIE = VAL_STATE_COOKIE;
2435
+ exports.VAL_THEME_SESSION_STORAGE_KEY = VAL_THEME_SESSION_STORAGE_KEY;
2434
2436
  exports.ValCommit = ValCommit;
2435
2437
  exports.ValDeployment = ValDeployment;
2436
2438
  exports.createValClient = createValClient;
@@ -2214,6 +2214,7 @@ var urlOf = function urlOf() {
2214
2214
  };
2215
2215
 
2216
2216
  var VAL_CONFIG_SESSION_STORAGE_KEY = "val-config";
2217
+ var VAL_THEME_SESSION_STORAGE_KEY = "val-theme";
2217
2218
 
2218
2219
  var SharedValConfig = zod.z.object({
2219
2220
  contentHostUrl: zod.z.string().optional(),
@@ -2431,6 +2432,7 @@ exports.VAL_CONFIG_SESSION_STORAGE_KEY = VAL_CONFIG_SESSION_STORAGE_KEY;
2431
2432
  exports.VAL_ENABLE_COOKIE_NAME = VAL_ENABLE_COOKIE_NAME;
2432
2433
  exports.VAL_SESSION_COOKIE = VAL_SESSION_COOKIE;
2433
2434
  exports.VAL_STATE_COOKIE = VAL_STATE_COOKIE;
2435
+ exports.VAL_THEME_SESSION_STORAGE_KEY = VAL_THEME_SESSION_STORAGE_KEY;
2434
2436
  exports.ValCommit = ValCommit;
2435
2437
  exports.ValDeployment = ValDeployment;
2436
2438
  exports.createValClient = createValClient;
@@ -2210,6 +2210,7 @@ var urlOf = function urlOf() {
2210
2210
  };
2211
2211
 
2212
2212
  var VAL_CONFIG_SESSION_STORAGE_KEY = "val-config";
2213
+ var VAL_THEME_SESSION_STORAGE_KEY = "val-theme";
2213
2214
 
2214
2215
  var SharedValConfig = z.object({
2215
2216
  contentHostUrl: z.string().optional(),
@@ -2405,4 +2406,4 @@ function getNextAppRouterSourceFolder(moduleFilePath) {
2405
2406
  return null;
2406
2407
  }
2407
2408
 
2408
- export { Api, ParentRef$1 as ParentRef, Patch, PatchBlock, PatchId, PatchJSON, RemirrorBr, RemirrorBulletList, RemirrorHeading, RemirrorImage, RemirrorJSON, RemirrorLinkMark, RemirrorListItem, RemirrorOrderedList, RemirrorParagraph, RemirrorText, RemirrorTextMark, SharedValConfig, VAL_CONFIG_SESSION_STORAGE_KEY, VAL_ENABLE_COOKIE_NAME, VAL_SESSION_COOKIE, VAL_STATE_COOKIE, ValCommit, ValDeployment, createValClient, getNextAppRouterSitemapTree, getNextAppRouterSourceFolder, getPatternFromModuleFilePath, parseRoutePattern, remirrorToRichTextSource, richTextToRemirror, urlOf };
2409
+ export { Api, ParentRef$1 as ParentRef, Patch, PatchBlock, PatchId, PatchJSON, RemirrorBr, RemirrorBulletList, RemirrorHeading, RemirrorImage, RemirrorJSON, RemirrorLinkMark, RemirrorListItem, RemirrorOrderedList, RemirrorParagraph, RemirrorText, RemirrorTextMark, SharedValConfig, VAL_CONFIG_SESSION_STORAGE_KEY, VAL_ENABLE_COOKIE_NAME, VAL_SESSION_COOKIE, VAL_STATE_COOKIE, VAL_THEME_SESSION_STORAGE_KEY, ValCommit, ValDeployment, createValClient, getNextAppRouterSitemapTree, getNextAppRouterSourceFolder, getPatternFromModuleFilePath, parseRoutePattern, remirrorToRichTextSource, richTextToRemirror, urlOf };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@valbuild/shared",
3
- "version": "0.87.5",
3
+ "version": "0.88.0",
4
4
  "private": false,
5
5
  "description": "Val shared types and utilities",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/valbuild/val.git"
8
+ "url": "git+https://github.com/valbuild/val.git"
9
9
  },
10
10
  "scripts": {
11
11
  "typecheck": "tsc --noEmit",
@@ -33,7 +33,7 @@
33
33
  "exports": true
34
34
  },
35
35
  "dependencies": {
36
- "@valbuild/core": "~0.87.5",
36
+ "@valbuild/core": "~0.88.0",
37
37
  "zod": "^3.22.4",
38
38
  "zod-validation-error": "^3.3.0"
39
39
  },