@lblod/ember-rdfa-editor-lblod-plugins 29.0.0 → 29.0.1-dev.34a85e14cf9ba4b4996e49c476a775afbe3ab6ac

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.
@@ -0,0 +1,5 @@
1
+ ---
2
+ '@lblod/ember-rdfa-editor-lblod-plugins': minor
3
+ ---
4
+
5
+ Add style to highlight variables in serialized HTML
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lblod/ember-rdfa-editor-lblod-plugins
2
2
 
3
+ ## 29.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Use the correct predicate for serializing variables
8
+
9
+ ## 28.2.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#558](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/558) [`83e7e3f`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/83e7e3f35ac79ccd86dfa3c172d0ae777470499a) Thanks [@abeforgit](https://github.com/abeforgit)! - Use the correct predicate for serializing variables
14
+
3
15
  ## 29.0.0
4
16
 
5
17
  ### Major Changes
@@ -111,9 +111,7 @@ export default class DocumentPreview<
111
111
 
112
112
  </div>
113
113
  {{#if this.isExpanded}}
114
- <div
115
- class='say-editor say-content rdfa-annotations rdfa-annotations-highlight rdfa-annotations-hover snippet-preview__content'
116
- >
114
+ <div class='say-editor say-content snippet-preview__content'>
117
115
  {{#if this.content}}
118
116
  {{this.content}}
119
117
  {{else if this.contentTask.isRunning}}
@@ -233,6 +233,9 @@ const serialize =
233
233
  renderable: node,
234
234
  tag: 'span',
235
235
  content: contentNode,
236
+ attrs: {
237
+ class: 'say-variable',
238
+ },
236
239
  });
237
240
  };
238
241
 
@@ -378,6 +378,9 @@ const serialize = (node: PNode, state: EditorState): DOMOutputSpec => {
378
378
  renderable: node,
379
379
  tag: 'span',
380
380
  content: contentNode,
381
+ attrs: {
382
+ class: 'say-variable',
383
+ },
381
384
  });
382
385
  };
383
386
 
@@ -107,6 +107,7 @@ const toDOM = (node: PNode): DOMOutputSpec => {
107
107
  renderable: node,
108
108
  tag: 'span',
109
109
  attrs: {
110
+ class: 'say-variable',
110
111
  'data-autofill-key': node.attrs.autofillKey,
111
112
  'data-convert-to-string': node.attrs.convertToString,
112
113
  'data-initialized': node.attrs.initialized,
@@ -156,6 +156,7 @@ const toDOM = (node: PNode): DOMOutputSpec => {
156
156
  return renderRdfaAware({
157
157
  renderable: node,
158
158
  attrs: {
159
+ class: 'say-variable',
159
160
  'data-selection-style': selectionStyle as string,
160
161
  },
161
162
  tag: 'span',
@@ -230,6 +230,7 @@ const serialize = (node: PNode, state: EditorState) => {
230
230
  : t('date-plugin.insert.datetime', TRANSLATION_FALLBACKS.insertDateTime);
231
231
  }
232
232
  const dateAttrs = {
233
+ class: 'say-variable',
233
234
  'data-format': format as string,
234
235
  'data-custom': custom ? 'true' : 'false',
235
236
  'data-custom-allowed': customAllowed ? 'true' : 'false',
@@ -99,7 +99,9 @@ const parseDOMLegacy = [
99
99
  const toDOM = (node: PNode): DOMOutputSpec => {
100
100
  return renderRdfaAware({
101
101
  renderable: node,
102
- attrs: {},
102
+ attrs: {
103
+ class: 'say-variable',
104
+ },
103
105
  tag: 'span',
104
106
  content: 0,
105
107
  });
@@ -166,7 +166,7 @@ const serialize = (node: PNode, state: EditorState): DOMOutputSpec => {
166
166
  const t = getTranslationFunction(state);
167
167
  const docLang = state.doc.attrs.lang as string;
168
168
  const { writtenNumber, minimumValue, maximumValue } = node.attrs;
169
- const value = getOutgoingTriple(node.attrs, EXT('content'))?.object.value;
169
+ const value = getOutgoingTriple(node.attrs, RDF('value'))?.object.value;
170
170
 
171
171
  let humanReadableContent: string;
172
172
 
@@ -184,6 +184,7 @@ const serialize = (node: PNode, state: EditorState): DOMOutputSpec => {
184
184
  renderable: node,
185
185
  tag: 'span',
186
186
  attrs: {
187
+ class: 'say-variable',
187
188
  'data-written-number': String(writtenNumber ?? false),
188
189
  'data-minimum-value': (minimumValue as string) ?? null,
189
190
  'data-maximum-value': (maximumValue as string) ?? null,
@@ -111,7 +111,9 @@ const serialize = (node: PNode, state: EditorState): DOMOutputSpec => {
111
111
  return renderRdfaAware({
112
112
  renderable: node,
113
113
  tag: 'span',
114
- attrs: {},
114
+ attrs: {
115
+ class: 'say-variable',
116
+ },
115
117
  content: person
116
118
  ? generatePersonHtml(person)
117
119
  : t(
@@ -135,7 +135,9 @@ const toDOM = (node: PNode): DOMOutputSpec => {
135
135
  return renderRdfaAware({
136
136
  renderable: node,
137
137
  tag: 'span',
138
- attrs: {},
138
+ attrs: {
139
+ class: 'say-variable',
140
+ },
139
141
  content: 0,
140
142
  });
141
143
  };
@@ -129,3 +129,9 @@
129
129
  margin-top: 5px;
130
130
  }
131
131
  }
132
+
133
+ .say-variable {
134
+ color: var(--au-orange-700);
135
+ background-color: var(--au-orange-300);
136
+ font-style: italic;
137
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "29.0.0",
3
+ "version": "29.0.1-dev.34a85e14cf9ba4b4996e49c476a775afbe3ab6ac",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",