@dosgato/dialog 1.5.0 → 1.5.1

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/Icon.svelte CHANGED
@@ -21,18 +21,18 @@
21
21
  export { className as class }
22
22
 
23
23
  function replaceIDs (body: string): string {
24
- const matches = body.matchAll(/\sid="(\S+)"/gv)
24
+ const matches = body.matchAll(/\sid="(\S+)"/g)
25
25
  const ids = Array.from(matches).map(m => m[1])
26
26
  if (!ids.length) return body
27
27
 
28
28
  // Replace with unique ids
29
29
  ids.forEach(id => {
30
- const escapedID = id.replace(/[.*+?^$\{\}\(\)\]\\]/gv, '\\$&')
30
+ const escapedID = id.replace(/[.*+?^${}()\]\\]/g, '\\$&')
31
31
 
32
32
  body = body.replace(
33
33
  // Allowed characters before id: [#;"]
34
34
  // Allowed characters after id: [)"], .[a-z]
35
- new RegExp('([#;"])(' + escapedID + ')([\\)"]|\\.[a-z])', 'gv'),
35
+ new RegExp('([#;"])(' + escapedID + ')([)"]|\\.[a-z])', 'g'),
36
36
  '$1' + randomid() + '$3'
37
37
  )
38
38
  })
@@ -13,13 +13,13 @@
13
13
  $: iconLabel = messageLabels[message.type] ?? messageLabels.error
14
14
 
15
15
  function addMarkup (msg: string) {
16
- const lines = msg.split(/\r?\n/v)
16
+ const lines = msg.split(/\r?\n/)
17
17
  const output: string[] = []
18
18
  for (const line of lines) {
19
- const splitLinks = line.split(/((?:\[[^\]]+\])?\([^\)]+\))/v)
19
+ const splitLinks = line.split(/((?:\[[^\]]+\])?\([^)]+\))/)
20
20
  const replaced: string[] = []
21
21
  for (const segment of splitLinks) {
22
- const m = segment.match(/(?:\[([^\]]+)\])?\(([^\)]+)\)/v)
22
+ const m = segment.match(/(?:\[([^\]]+)\])?\(([^)]+)\)/)
23
23
  if (m) {
24
24
  try {
25
25
  const url = new URL(m[2])
@@ -84,8 +84,8 @@
84
84
  if (!content) return null
85
85
  const line = context.state.doc.lineAt(context.pos)
86
86
  const textBefore = line.text.slice(0, context.pos - line.from)
87
- const wordMatch = textBefore.match(/\w*$/v)
88
- const dotMatch = textBefore.match(/\.\s*$/v)
87
+ const wordMatch = textBefore.match(/\w*$/)
88
+ const dotMatch = textBefore.match(/\.\s*$/)
89
89
  if (!wordMatch?.[0] && !dotMatch && !context.explicit) return null
90
90
  const from = context.pos - (wordMatch?.[0].length ?? 0)
91
91
  const completions = env.languageService.getCompletionsAtPosition(FILE_PATH, context.pos, {})
@@ -100,7 +100,7 @@
100
100
  }
101
101
 
102
102
  const { linter } = await import('@codemirror/lint')
103
- const importPattern = /\b(import|require)\s*(\(|['"]|\{?\s*['"])/gv
103
+ const importPattern = /\b(import|require)\s*(\(|['"]|\{?\s*['"])/g
104
104
  const sandboxLinter = linter(view => {
105
105
  if (!sandbox) return []
106
106
  const diagnostics: Diagnostic[] = []
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dosgato/dialog",
3
3
  "description": "A component library for building forms that edit a JSON document.",
4
- "version": "1.5.0",
4
+ "version": "1.5.1",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",
7
7
  "dev": "vite dev --force",