@pretextbook/import 0.15.1 → 0.16.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.
@@ -16,6 +16,11 @@
16
16
  */
17
17
  /** Formats a snippet can be converted from. */
18
18
  export type SnippetFormat = "latex" | "markdown";
19
+ /**
20
+ * Whether `text` already carries XML markup — so is PreTeXt (or HTML) rather
21
+ * than LaTeX or Markdown, wherever in it the markup sits.
22
+ */
23
+ export declare function containsXmlMarkup(text: string): boolean;
19
24
  export interface SnippetFormatScores {
20
25
  latex: number;
21
26
  markdown: number;
@@ -0,0 +1,17 @@
1
+ export interface PasteTarget {
2
+ /**
3
+ * Why converted markup does not belong at the insertion point, or undefined
4
+ * when it does — for the host to log, since the paste then goes in plainly.
5
+ */
6
+ literal?: string;
7
+ /** The insertion point is in running text, where only inline markup fits. */
8
+ inline: boolean;
9
+ }
10
+ /**
11
+ * What the insertion point will take, given `prefix` — the document text up
12
+ * to it.
13
+ *
14
+ * Read by walking tags rather than parsing, because the document is mid-edit
15
+ * and often not well-formed; see `scanXmlContext`.
16
+ */
17
+ export declare function pasteTargetAt(prefix: string): PasteTarget;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretextbook/import",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "description": "Shared import helpers for converting LaTeX/Markdown/PreTeXt into PreTeXt for VS Code and web apps",
5
5
  "author": "Oscar Levin",
6
6
  "license": "MIT",
@@ -54,10 +54,12 @@
54
54
  "test": "vitest run"
55
55
  },
56
56
  "dependencies": {
57
+ "@pretextbook/completions": "^0.5.0",
57
58
  "@pretextbook/format": "^0.6.0",
58
59
  "@pretextbook/latex-pretext": "^0.4.0",
59
60
  "@pretextbook/latex-style-pretext": "^0.5.2",
60
61
  "@pretextbook/remark-pretext": "^0.2.0",
62
+ "@pretextbook/typing-shortcuts": "^0.4.0",
61
63
  "@tailwindcss/vite": "^4.0.0",
62
64
  "jszip": "^3.10.1",
63
65
  "tailwindcss": "^4.0.0"