@nuxt-customer-portal/ui 0.6.1 → 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
@@ -1,5 +1,20 @@
1
1
  # @nuxt-customer-portal/ui
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 175854d: Support validated conditional sections in email texts and HTML templates, preserve conditional tags in the visual editor, and let administrators preview purchase emails with or without downloads.
8
+ - Updated dependencies [175854d]
9
+ - Updated dependencies [28bb7af]
10
+ - @nuxt-customer-portal/core@0.8.0
11
+
12
+ ## 0.7.0
13
+
14
+ ### Patch Changes
15
+
16
+ - @nuxt-customer-portal/core@0.7.0
17
+
3
18
  ## 0.6.1
4
19
 
5
20
  ### Patch Changes
@@ -61,7 +61,7 @@ export const MarkdownPlaceholder = Node.create({
61
61
  addInputRules() {
62
62
  return [
63
63
  nodeInputRule({
64
- find: /({{\s*[a-z0-9_]+\s*}})$/i,
64
+ find: /({{\s*(?:#if\s+[a-z0-9_]+|else|\/if|[a-z0-9_]+)\s*}})$/i,
65
65
  type: this.type,
66
66
  getAttributes: (match) => ({ raw: match[1] })
67
67
  })
@@ -43,10 +43,10 @@ function unsupported(node: MarkdownNode): boolean {
43
43
  }
44
44
  export function placeholderText(text: string, marks: NonNullable<JSONContent['marks']> = []): JSONContent[] {
45
45
  return text
46
- .split(/({{\s*[a-z0-9_]+\s*}})/gi)
46
+ .split(/({{\s*(?:#if\s+[a-z0-9_]+|else|\/if|[a-z0-9_]+)\s*}})/gi)
47
47
  .filter(Boolean)
48
48
  .map((part) =>
49
- /^{{\s*[a-z0-9_]+\s*}}$/i.test(part)
49
+ /^{{\s*(?:#if\s+[a-z0-9_]+|else|\/if|[a-z0-9_]+)\s*}}$/i.test(part)
50
50
  ? { type: 'markdownPlaceholder', attrs: { raw: part }, marks }
51
51
  : { type: 'text', text: part, marks }
52
52
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt-customer-portal/ui",
3
- "version": "0.6.1",
3
+ "version": "0.8.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://nuxt-customer-portal.com",
6
6
  "repository": {
@@ -39,7 +39,7 @@
39
39
  "remark-parse": "^11.0.0",
40
40
  "unified": "^11.0.5",
41
41
  "zod": "^4.4.3",
42
- "@nuxt-customer-portal/core": "^0.6.1"
42
+ "@nuxt-customer-portal/core": "^0.8.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "nuxt": "^4.5.1",
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  id: 'ui',
3
- version: '0.6.1',
3
+ version: '0.8.0',
4
4
  source: '@nuxt-customer-portal/ui',
5
5
  dependsOn: ['core']
6
6
  }