Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"prettier:check": "prettier --check ."
},
"peerDependencies": {
"@doenet/doenetml-iframe": "^0.7.20-dev.332",
"@doenet/doenetml-iframe": "^0.7.20-dev.334",
"react": "^19.2.3",
"react-dom": "^19.2.3"
},
Expand All @@ -49,7 +49,7 @@
"seedrandom": "^3.0.5"
},
"devDependencies": {
"@doenet/doenetml-iframe": "0.7.20-dev.332",
"@doenet/doenetml-iframe": "0.7.20-dev.334",
"@eslint/js": "^9.39.1",
"@types/object-hash": "^3.0.6",
"@types/react": "^19.2.7",
Expand Down
2 changes: 1 addition & 1 deletion src/Activity/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type ActivityCommonProps = {
/** URL the `<ref>` renderer uses to link to other Doenet activities. */
doenetViewerUrl?: string;
/** URL used to resolve `<image source="doenet:…">` media references. */
doenetMediaUrl?: string;
doenetImagesUrl?: string;
standaloneUrl?: string;
cssUrl?: string;
doenetmlVersion?: string;
Expand Down
4 changes: 2 additions & 2 deletions src/Activity/SingleDocActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const SingleDocActivity = memo(function SingleDocActivity({
forceShowSolution = false,
forceUnsuppressCheckwork = false,
doenetViewerUrl,
doenetMediaUrl,
doenetImagesUrl,
standaloneUrl,
cssUrl,
doenetmlVersion,
Expand Down Expand Up @@ -126,7 +126,7 @@ export const SingleDocActivity = memo(function SingleDocActivity({
forceShowSolution={forceShowSolution}
forceUnsuppressCheckwork={forceUnsuppressCheckwork}
doenetViewerUrl={doenetViewerUrl}
doenetMediaUrl={doenetMediaUrl}
doenetImagesUrl={doenetImagesUrl}
standaloneUrl={standaloneUrl}
cssUrl={cssUrl}
fetchExternalDoenetML={fetchExternalDoenetML}
Expand Down
6 changes: 3 additions & 3 deletions src/Viewer/Viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function Viewer({
addVirtualKeyboard: _addVirtualKeyboard = true,
externalVirtualKeyboardProvided: _externalVirtualKeyboardProvided = false,
doenetViewerUrl,
doenetMediaUrl,
doenetImagesUrl,
standaloneUrl,
cssUrl,
doenetmlVersion,
Expand Down Expand Up @@ -76,7 +76,7 @@ export function Viewer({
addVirtualKeyboard?: boolean;
externalVirtualKeyboardProvided?: boolean;
doenetViewerUrl?: string;
doenetMediaUrl?: string;
doenetImagesUrl?: string;
standaloneUrl?: string;
cssUrl?: string;
doenetmlVersion?: string;
Expand Down Expand Up @@ -580,7 +580,7 @@ export function Viewer({
forceShowSolution={forceShowSolution}
forceUnsuppressCheckwork={forceUnsuppressCheckwork}
doenetViewerUrl={doenetViewerUrl}
doenetMediaUrl={doenetMediaUrl}
doenetImagesUrl={doenetImagesUrl}
standaloneUrl={standaloneUrl}
cssUrl={cssUrl}
doenetmlVersion={doenetmlVersion}
Expand Down
6 changes: 3 additions & 3 deletions src/activity-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function ActivityViewer({
addVirtualKeyboard = true,
externalVirtualKeyboardProvided = false,
doenetViewerUrl,
doenetMediaUrl,
doenetImagesUrl,
standaloneUrl,
cssUrl,
doenetmlVersion,
Expand Down Expand Up @@ -124,7 +124,7 @@ export function ActivityViewer({
* Forwarded to each document's viewer, which defaults it to
* `https://doenet.org/api/media`.
*/
doenetMediaUrl?: string;
doenetImagesUrl?: string;
/**
* URL of a standalone DoenetML bundle to use for every document,
* instead of the CDN bundle for each document's `version`.
Expand Down Expand Up @@ -290,7 +290,7 @@ export function ActivityViewer({
externalVirtualKeyboardProvided
}
doenetViewerUrl={doenetViewerUrl}
doenetMediaUrl={doenetMediaUrl}
doenetImagesUrl={doenetImagesUrl}
standaloneUrl={standaloneUrl}
cssUrl={cssUrl}
doenetmlVersion={doenetmlVersion}
Expand Down
10 changes: 5 additions & 5 deletions test/cypress/component/ActivityViewer.viewerUrls.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import {
} from "./helpers";

// `doenetViewerUrl` (the `<ref>` renderer's activity-link base) and
// `doenetMediaUrl` (the `<image source="doenet:…">` base, DoenetML#1457) are
// `doenetImagesUrl` (the `<image source="doenet:…">` base, DoenetML#1457) are
// props of the inner DoenetViewer. ActivityViewer must thread them through
// Viewer → Activity → SingleDocActivity to each embedded `<DoenetViewer>`.
// The iframe wrapper bakes a booted viewer's props into the iframe `srcdoc`,
// so a forwarded URL shows up there — a stable check that does not depend on
// the bundle rendering a ref/image.

const VIEWER_URL = "https://viewer.example.test/activityViewer";
const MEDIA_URL = "https://media.example.test/api/media";
const IMAGES_URL = "https://images.example.test/api/media";

const SOURCE: ActivitySource = {
type: "singleDoc",
Expand All @@ -27,7 +27,7 @@ const SOURCE: ActivitySource = {
numVariants: 1,
} as ActivitySource;

describe("ActivityViewer — forwards doenetViewerUrl and doenetMediaUrl to the viewer", () => {
describe("ActivityViewer — forwards doenetViewerUrl and doenetImagesUrl to the viewer", () => {
it("bakes both URLs into the embedded DoenetViewer's iframe", () => {
cy.mount(
<ActivityViewer
Expand All @@ -37,13 +37,13 @@ describe("ActivityViewer — forwards doenetViewerUrl and doenetMediaUrl to the
standaloneUrl={STANDALONE_URL}
cssUrl={STANDALONE_CSS_URL}
doenetViewerUrl={VIEWER_URL}
doenetMediaUrl={MEDIA_URL}
doenetImagesUrl={IMAGES_URL}
/>,
);

cy.get("iframe", { timeout: IFRAME_READY_TIMEOUT })
.should("have.attr", "srcdoc")
.and("include", VIEWER_URL)
.and("include", MEDIA_URL);
.and("include", IMAGES_URL);
});
});