diff --git a/platform/docs/package.json b/platform/docs/package.json index 909105017..5ef98ed78 100644 --- a/platform/docs/package.json +++ b/platform/docs/package.json @@ -84,6 +84,10 @@ "typescript": "5.5.4", "url-loader": "4.1.1" }, + "devDependencies": { + "@ohif/core": "workspace:*", + "@ohif/ui-next": "workspace:*" + }, "browserslist": { "production": [ ">0.5%", diff --git a/platform/ui-next/src/contextProviders/ViewportGridProvider.tsx b/platform/ui-next/src/contextProviders/ViewportGridProvider.tsx index e88007c4e..845760811 100644 --- a/platform/ui-next/src/contextProviders/ViewportGridProvider.tsx +++ b/platform/ui-next/src/contextProviders/ViewportGridProvider.tsx @@ -9,6 +9,17 @@ import React, { import merge from 'lodash.merge'; import PropTypes from 'prop-types'; +// NOTE: `@ohif/core` is intentionally NOT declared in this package's +// package.json (neither as a dependency nor a peerDependency). It is treated as +// an implicit peer, satisfied by the consuming application via the monorepo +// workspace. Declaring it as `"@ohif/core": "workspace:*"` was tried and +// reverted: the release/publish process does not rewrite `workspace:*` ranges +// inside `peerDependencies`, so the published tarball shipped a literal +// `workspace:*` peer that non-pnpm package managers (npm/yarn) cannot resolve. +// A plain `"*"` range would be an acceptable workaround if we ever want it +// declared, but for now it stays undeclared. Note: the docs site (platform/docs) +// must therefore add `@ohif/core` as a devDependency itself, because pulling in +// the ui-next barrel reaches this module and nothing else anchors the import. import { ViewportGridService, utils } from '@ohif/core'; const DEFAULT_STATE: AppTypes.ViewportGrid.State = { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87b4770ba..7de0e9c38 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1795,6 +1795,13 @@ importers: url-loader: specifier: 4.1.1 version: 4.1.1(file-loader@6.2.0(webpack@5.105.0(@swc/core@1.15.13(@swc/helpers@0.5.21))))(webpack@5.105.0(@swc/core@1.15.13(@swc/helpers@0.5.21))) + devDependencies: + '@ohif/core': + specifier: workspace:* + version: link:../core + '@ohif/ui-next': + specifier: workspace:* + version: link:../ui-next platform/i18n: dependencies: