@clepit/core 0.8.0-beta.570 → 0.8.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/CHANGELOG.md CHANGED
@@ -5,14 +5,6 @@ All notable changes to `@clepit/core` are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
9
-
10
- ### Added
11
- - `StyleManager.injectedSheet(id)`: the stylesheet injected under an id, while the document adopts it.
12
-
13
- ### Changed
14
- - The editor, renderer and theme overrides adopt their styles as constructed stylesheets (`document.adoptedStyleSheets`) instead of appending `<style>` elements, so a page whose `style-src` omits `'unsafe-inline'` renders them without passing clepit a nonce.
15
-
16
8
  ## [0.8.0]
17
9
 
18
10
  ### Added
@@ -137,17 +137,12 @@ export declare class StyleManager {
137
137
  classNames?: BlockClassNames | string;
138
138
  }): HTMLElement;
139
139
  /**
140
- * Adopts the styles as a constructed stylesheet, which a style-src policy without
141
- * 'unsafe-inline' admits where an appended style element would be refused.
142
- * @param styleId - Unique ID for the stylesheet
140
+ * Reusable function to inject styles into the document head
141
+ * @param styleId - Unique ID for the style element
143
142
  * @param styles - CSS styles as a string
144
143
  * @returns boolean - true if styles were injected, false if already existed
145
144
  */
146
145
  static injectStyles(styleId: string, styles: string): boolean;
147
- /** The stylesheet injected under `styleId`, while the document still adopts it. */
148
- static injectedSheet(styleId: string): CSSStyleSheet | undefined;
149
- private static removeStyles;
150
- private static injectedSheets;
151
146
  private static themeRegistry;
152
147
  private static themeSubscribers;
153
148
  private static themeMediaQuery?;