@lincyaw/kernel 1.0.0-rc.4 → 1.0.0-rc.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lincyaw/kernel",
3
- "version": "1.0.0-rc.4",
3
+ "version": "1.0.0-rc.5",
4
4
  "description": "Presmium's shared kernel: the IR and plugin contracts, the service registry, anchors and checks",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -126,9 +126,12 @@ export function previewAppearance(): 'dark' | 'light' | undefined {
126
126
  return given === 'dark' || given === 'light' ? given : undefined
127
127
  }
128
128
 
129
- /** The Content-Security-Policy that lets only the workbench's origins embed a preview page. */
129
+ /**
130
+ * The Content-Security-Policy that lets only the site itself and the workbench's origins embed a page: a home page
131
+ * that plays a document's presentation in a frame works in `presmium serve` as it does in the built site.
132
+ */
130
133
  export function previewFrameAncestors(origins: readonly string[]): string {
131
- return `frame-ancestors ${origins.length > 0 ? origins.join(' ') : "'none'"}`
134
+ return ['frame-ancestors', "'self'", ...origins].join(' ')
132
135
  }
133
136
 
134
137
  /** Whether the page is embedded by a workbench as its preview (the frame may still be refused when no origin is allowed). */