@pretextbook/web-editor 0.11.1 → 0.11.2

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.
@@ -187,6 +187,14 @@ export declare function getSectionAttributes(content: string): {
187
187
  * since a division's `xml:id` is its identity and may not be empty.
188
188
  */
189
189
  export declare function sanitizeXmlId(raw: string): string;
190
+ /**
191
+ * Derive a slug-style `xml:id` from a division's title — lowercased, with
192
+ * whitespace/punctuation collapsed to single hyphens and trimmed from the
193
+ * ends. Used to keep a brand-new, not-yet-saved division's id in sync with
194
+ * its title as the author types, in place of the opaque generated id it
195
+ * starts with.
196
+ */
197
+ export declare function slugifyTitle(title: string): string;
190
198
  /**
191
199
  * Derive a division's title, type, `xml:id`, and `label` directly from its
192
200
  * full PreTeXt source — the code editor's content, wrapper tag included.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretextbook/web-editor",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "private": false,
5
5
  "description": "A web-based editor for PreTeXt documents, with simple preview functionality",
6
6
  "keywords": [