@shwfed/config 2.3.5 → 2.3.6

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shwfed",
3
3
  "configKey": "shwfed",
4
- "version": "2.3.5",
4
+ "version": "2.3.6",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -1,16 +1,22 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import { useI18n } from "vue-i18n";
4
+ import { cel as _rawCel } from "../../../../../utils/cel";
5
+ import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
4
6
  import { getLocalizedText } from "../../../../../share/locale";
5
7
  import { Markdown } from "../../../../ui/markdown";
8
+ import { interpolateMarkdown } from "../../../utils/resolve";
6
9
  defineOptions({ name: "ShwfedMarkdownItemRuntime" });
7
10
  const props = defineProps({
8
11
  config: { type: null, required: true }
9
12
  });
10
13
  const { locale } = useI18n();
11
- const source = computed(
12
- () => getLocalizedText(props.config.content, locale.value) ?? ""
13
- );
14
+ const inherited = injectCELContext();
15
+ const $cel = (expression, context) => _rawCel(expression, { ...celBindings(inherited), ...context });
16
+ const source = computed(() => {
17
+ const raw = getLocalizedText(props.config.content, locale.value) ?? "";
18
+ return interpolateMarkdown(raw, $cel);
19
+ });
14
20
  </script>
15
21
 
16
22
  <template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {