@valbuild/next 0.40.0 → 0.41.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.
@@ -16,7 +16,7 @@ var ValNextProvider = function ValNextProvider(props) {
16
16
  startTransition = _useTransition2[1];
17
17
  return /*#__PURE__*/jsxRuntime.jsx(internal.ValProvider, {
18
18
  onSubmit: function onSubmit(refreshRequired) {
19
- if (refreshRequired) {
19
+ if (refreshRequired && !props.disableRefresh) {
20
20
  startTransition(function () {
21
21
  router.refresh();
22
22
  });
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./ValNextProvider-7750e412.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./ValNextProvider-7750e412.cjs.dev.js");
7
+ }
@@ -16,7 +16,7 @@ var ValNextProvider = function ValNextProvider(props) {
16
16
  startTransition = _useTransition2[1];
17
17
  return /*#__PURE__*/jsxRuntime.jsx(internal.ValProvider, {
18
18
  onSubmit: function onSubmit(refreshRequired) {
19
- if (refreshRequired) {
19
+ if (refreshRequired && !props.disableRefresh) {
20
20
  startTransition(function () {
21
21
  router.refresh();
22
22
  });
@@ -12,7 +12,7 @@ var ValNextProvider = function ValNextProvider(props) {
12
12
  startTransition = _useTransition2[1];
13
13
  return /*#__PURE__*/jsx(ValProvider, {
14
14
  onSubmit: function onSubmit(refreshRequired) {
15
- if (refreshRequired) {
15
+ if (refreshRequired && !props.disableRefresh) {
16
16
  startTransition(function () {
17
17
  router.refresh();
18
18
  });
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const ValProvider: (props: {
3
3
  children: import("react").ReactNode | import("react").ReactNode[];
4
+ config: import("@valbuild/core").ValConfig;
5
+ disableRefresh?: boolean | undefined;
4
6
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,13 @@
1
1
  import { ValConfig, type InitVal } from "@valbuild/core";
2
- export declare const initVal: (config?: ValConfig) => InitVal;
2
+ import { ValEncodedString } from "@valbuild/react/stega";
3
+ export declare const initVal: (config?: ValConfig) => InitVal & {
4
+ val: {
5
+ content: typeof import("@valbuild/core/src/module").content;
6
+ getPath: typeof import("@valbuild/core/src/val").getValPath;
7
+ file: typeof import("@valbuild/core/src/source/file").file;
8
+ link: typeof import("@valbuild/core/src/source/link").link;
9
+ richtext: typeof import("@valbuild/core/src/source/richtext").richtext;
10
+ } & {
11
+ raw: (encodedString: ValEncodedString) => string;
12
+ };
13
+ };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@valbuild/core');
6
6
  var internal = require('@valbuild/react/internal');
7
- var ValNextProvider = require('./ValNextProvider-ae031b12.cjs.dev.js');
7
+ var ValNextProvider = require('./ValNextProvider-49d2bec1.cjs.dev.js');
8
8
  var stega = require('@valbuild/react/stega');
9
9
 
10
10
  function _interopNamespace(e) {
@@ -92,7 +92,11 @@ var initVal = function initVal(config) {
92
92
  });
93
93
  return {
94
94
  s: s,
95
- val: val,
95
+ val: _objectSpread2(_objectSpread2({}, val), {}, {
96
+ raw: function raw(encodedString) {
97
+ return stega.stegaClean(encodedString);
98
+ }
99
+ }),
96
100
  config: currentConfig
97
101
  };
98
102
  };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@valbuild/core');
6
6
  var internal = require('@valbuild/react/internal');
7
- var ValNextProvider = require('./ValNextProvider-fe84f6a9.cjs.prod.js');
7
+ var ValNextProvider = require('./ValNextProvider-7750e412.cjs.prod.js');
8
8
  var stega = require('@valbuild/react/stega');
9
9
 
10
10
  function _interopNamespace(e) {
@@ -92,7 +92,11 @@ var initVal = function initVal(config) {
92
92
  });
93
93
  return {
94
94
  s: s,
95
- val: val,
95
+ val: _objectSpread2(_objectSpread2({}, val), {}, {
96
+ raw: function raw(encodedString) {
97
+ return stega.stegaClean(encodedString);
98
+ }
99
+ }),
96
100
  config: currentConfig
97
101
  };
98
102
  };
@@ -3,8 +3,8 @@ import * as core from '@valbuild/core';
3
3
  export { core as expr };
4
4
  export { FILE_REF_PROP, GenericSelector, Schema, VAL_EXTENSION, derefPatch } from '@valbuild/core';
5
5
  export { ValRichText } from '@valbuild/react/internal';
6
- import { ValNextProvider } from './ValNextProvider-3676dacc.esm.js';
7
- import { autoTagJSX } from '@valbuild/react/stega';
6
+ import { ValNextProvider } from './ValNextProvider-c5c9fcb0.esm.js';
7
+ import { stegaClean, autoTagJSX } from '@valbuild/react/stega';
8
8
 
9
9
  var ValProvider = ValNextProvider;
10
10
 
@@ -71,7 +71,11 @@ var initVal = function initVal(config) {
71
71
  });
72
72
  return {
73
73
  s: s,
74
- val: val,
74
+ val: _objectSpread2(_objectSpread2({}, val), {}, {
75
+ raw: function raw(encodedString) {
76
+ return stegaClean(encodedString);
77
+ }
78
+ }),
75
79
  config: currentConfig
76
80
  };
77
81
  };
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "next",
9
9
  "react"
10
10
  ],
11
- "version": "0.40.0",
11
+ "version": "0.41.0",
12
12
  "scripts": {
13
13
  "typecheck": "tsc --noEmit",
14
14
  "test": "jest"
@@ -45,9 +45,9 @@
45
45
  "exports": true
46
46
  },
47
47
  "dependencies": {
48
- "@valbuild/core": "~0.40.0",
49
- "@valbuild/react": "~0.40.0",
50
- "@valbuild/server": "~0.40.0",
48
+ "@valbuild/core": "~0.41.0",
49
+ "@valbuild/react": "~0.41.0",
50
+ "@valbuild/server": "~0.41.0",
51
51
  "client-only": "^0.0.1",
52
52
  "server-only": "^0.0.1"
53
53
  },
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValNextProvider-fe84f6a9.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValNextProvider-fe84f6a9.cjs.dev.js");
7
- }