@bpmn-io/form-js-viewer 1.26.0 → 2.0.0-alpha.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/dist/index.es.js CHANGED
@@ -675,7 +675,7 @@ function createInjector(bootstrapModules) {
675
675
  */
676
676
  function createFormContainer(prefix = 'fjs') {
677
677
  const container = document.createElement('div');
678
- container.classList.add(`${prefix}-container`);
678
+ container.classList.add(`${prefix}-container`, 'bio-theme-parent');
679
679
  return container;
680
680
  }
681
681
 
@@ -6316,7 +6316,13 @@ function PdfRenderer(props) {
6316
6316
  onError();
6317
6317
  return;
6318
6318
  }
6319
- const blob = await response.blob();
6319
+
6320
+ // Re-type the response instead of trusting its content type. An object URL
6321
+ // inherits the form's origin and <embed> renders it by the blob's own type,
6322
+ // so a response served as HTML would execute script in that origin.
6323
+ const blob = new Blob([await response.arrayBuffer()], {
6324
+ type: 'application/pdf'
6325
+ });
6320
6326
  objectUrl = URL.createObjectURL(blob);
6321
6327
  setPdfObjectUrl(objectUrl);
6322
6328
  } catch {
@@ -6624,7 +6630,7 @@ function Lightbox(props) {
6624
6630
  href: "https://bpmn.io",
6625
6631
  target: "_blank",
6626
6632
  rel: "noopener noreferrer",
6627
- style: "margin: 15px 20px 15px 10px; align-self: center; color: var(--cds-icon-primary, #404040)",
6633
+ style: "margin: 15px 20px 15px 10px; align-self: center; color: #404040",
6628
6634
  children: jsx(Logo, {})
6629
6635
  }), jsxs("span", {
6630
6636
  children: ["Web-based tooling for BPMN, DMN, and forms powered by", ' ', jsx("a", {
@@ -6647,7 +6653,7 @@ function Link(props) {
6647
6653
  rel: "noopener noreferrer",
6648
6654
  class: "fjs-powered-by-link",
6649
6655
  title: "Powered by bpmn.io",
6650
- style: "color: var(--cds-text-primary, #404040)",
6656
+ style: "color: #404040",
6651
6657
  onClick: props.onClick,
6652
6658
  children: jsx(Logo, {})
6653
6659
  })