@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.
- package/dist/components/CodeEditor.d.ts +2 -0
- package/dist/components/toc/types.d.ts +6 -0
- package/dist/index.es.js +403 -352
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/sectionUtils.d.ts +8 -0
- package/package.json +1 -1
package/dist/sectionUtils.d.ts
CHANGED
|
@@ -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.
|