@ovok/core 0.2.52 → 0.2.54

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,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
4
  if (k2 === undefined) k2 = k;
4
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -34,6 +35,19 @@ var __importStar = (this && this.__importStar) || (function () {
34
35
  })();
35
36
  Object.defineProperty(exports, "__esModule", { value: true });
36
37
  exports.OvokProvider = exports.useClient = exports.useCachedBinaryUrl = exports.reactContext = exports.useSubscription = exports.useSearchResources = exports.useSearchOne = exports.useSearch = exports.useResource = exports.usePrevious = exports.useMedplumProfile = exports.useMedplumNavigate = exports.useMedplumContext = void 0;
38
+ /*
39
+ * The only React-dependent module in the package.
40
+ *
41
+ * `@medplum/react-hooks` calls `createContext` at module scope, which does not
42
+ * exist in React's server build — so without this directive, importing
43
+ * anything from the package barrel crashes a React Server Component with
44
+ * `createContext is not a function`, including the plain, React-free
45
+ * `OvokClient` that most server-side callers actually want.
46
+ *
47
+ * The directive moves this module into the client graph. A server component
48
+ * may then import the barrel freely; only the hooks and provider below
49
+ * require a client component, which is where they were always usable.
50
+ */
37
51
  const react_hooks_1 = require("@medplum/react-hooks");
38
52
  const React = __importStar(require("react"));
39
53
  var react_hooks_2 = require("@medplum/react-hooks");
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@ovok/core",
3
- "version": "0.2.52",
3
+ "version": "0.2.54",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
- "type": "module",
8
7
  "files": [
9
8
  "dist"
10
9
  ],
@@ -12,6 +11,7 @@
12
11
  "test": "jest",
13
12
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
14
13
  "build": "rm -rf dist && tsc",
14
+ "verify:package": "node scripts/verify-package.mjs",
15
15
  "prepare": "yarn lint && yarn build",
16
16
  "release": "release-it"
17
17
  },