@duskmoon-dev/el-markdown 0.4.0 → 0.6.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.
@@ -46,13 +46,13 @@ var require_extend = __commonJS((exports2, module2) => {
46
46
  var toStr = Object.prototype.toString;
47
47
  var defineProperty = Object.defineProperty;
48
48
  var gOPD = Object.getOwnPropertyDescriptor;
49
- var isArray = function isArray(arr) {
49
+ var isArray = function isArray2(arr) {
50
50
  if (typeof Array.isArray === "function") {
51
51
  return Array.isArray(arr);
52
52
  }
53
53
  return toStr.call(arr) === "[object Array]";
54
54
  };
55
- var isPlainObject = function isPlainObject(obj) {
55
+ var isPlainObject = function isPlainObject2(obj) {
56
56
  if (!obj || toStr.call(obj) !== "[object Object]") {
57
57
  return false;
58
58
  }
@@ -65,7 +65,7 @@ var require_extend = __commonJS((exports2, module2) => {
65
65
  for (key in obj) {}
66
66
  return typeof key === "undefined" || hasOwn.call(obj, key);
67
67
  };
68
- var setProperty = function setProperty(target, options) {
68
+ var setProperty = function setProperty2(target, options) {
69
69
  if (defineProperty && options.name === "__proto__") {
70
70
  defineProperty(target, options.name, {
71
71
  enumerable: true,
@@ -77,7 +77,7 @@ var require_extend = __commonJS((exports2, module2) => {
77
77
  target[options.name] = options.newValue;
78
78
  }
79
79
  };
80
- var getProperty = function getProperty(obj, name) {
80
+ var getProperty = function getProperty2(obj, name) {
81
81
  if (name === "__proto__") {
82
82
  if (!hasOwn.call(obj, name)) {
83
83
  return;
@@ -2005,7 +2005,7 @@ __export(exports_src, {
2005
2005
  module.exports = __toCommonJS(exports_src);
2006
2006
 
2007
2007
  // src/el-dm-markdown.ts
2008
- var import_el_core = require("@duskmoon-dev/el-core");
2008
+ var import_el_base = require("@duskmoon-dev/el-base");
2009
2009
  var import_markdown_body = require("@duskmoon-dev/core/components/markdown-body");
2010
2010
 
2011
2011
  // ../../node_modules/.bun/bail@2.0.2/node_modules/bail/index.js
@@ -2963,7 +2963,7 @@ function all(values, includeImageAlt, includeHtml) {
2963
2963
  function node(value) {
2964
2964
  return Boolean(value && typeof value === "object");
2965
2965
  }
2966
- // ../../node_modules/.bun/decode-named-character-reference@1.2.0/node_modules/decode-named-character-reference/index.dom.js
2966
+ // ../../node_modules/.bun/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.dom.js
2967
2967
  var element = document.createElement("i");
2968
2968
  function decodeNamedCharacterReference(value) {
2969
2969
  const characterReference = "&" + value + ";";
@@ -8885,7 +8885,7 @@ function emphasisPeek(_, _1, state) {
8885
8885
  return state.options.emphasis || "*";
8886
8886
  }
8887
8887
 
8888
- // ../../node_modules/.bun/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.js
8888
+ // ../../node_modules/.bun/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js
8889
8889
  function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
8890
8890
  let reverse;
8891
8891
  let test;
@@ -27132,14 +27132,14 @@ var atomOneLight = `
27132
27132
 
27133
27133
  // src/el-dm-markdown.ts
27134
27134
  var coreStyles = import_markdown_body.css.replace(/@layer\s+components\s*\{/, "").replace(/\}\s*$/, "");
27135
- var baseStyles = import_el_core.css`
27135
+ var baseStyles = import_el_base.css`
27136
27136
  :host {
27137
27137
  display: block;
27138
27138
  font-family: var(
27139
- --dm-markdown-font-family,
27139
+ --markdown-font-family,
27140
27140
  var(--font-family, system-ui, -apple-system, sans-serif)
27141
27141
  );
27142
- line-height: var(--dm-markdown-line-height, 1.6);
27142
+ line-height: var(--markdown-line-height, 1.6);
27143
27143
  color: var(--color-on-surface);
27144
27144
  }
27145
27145
 
@@ -27244,7 +27244,7 @@ autoThemeSheet.replaceSync(`
27244
27244
  }
27245
27245
  `);
27246
27246
 
27247
- class ElDmMarkdown extends import_el_core.BaseElement {
27247
+ class ElDmMarkdown extends import_el_base.BaseElement {
27248
27248
  static properties = {
27249
27249
  src: { type: String, reflect: true },
27250
27250
  theme: { type: String, reflect: true, default: "auto" },
@@ -27252,6 +27252,9 @@ class ElDmMarkdown extends import_el_core.BaseElement {
27252
27252
  noMermaid: { type: Boolean, reflect: true, attribute: "no-mermaid" },
27253
27253
  streaming: { type: Boolean, reflect: true }
27254
27254
  };
27255
+ static get observedAttributes() {
27256
+ return [...super.observedAttributes, "content"];
27257
+ }
27255
27258
  _mid = "";
27256
27259
  _fragment = "";
27257
27260
  _content = "";
@@ -27307,6 +27310,11 @@ class ElDmMarkdown extends import_el_core.BaseElement {
27307
27310
  }
27308
27311
  attributeChangedCallback(name, oldValue, newValue) {
27309
27312
  super.attributeChangedCallback(name, oldValue, newValue);
27313
+ if (name === "content" && oldValue !== newValue) {
27314
+ this.content = (newValue ?? "").replace(/\\n/g, `
27315
+ `).replace(/\\t/g, "\t");
27316
+ return;
27317
+ }
27310
27318
  if (name === "theme" && oldValue !== newValue) {
27311
27319
  this._updateTheme();
27312
27320
  }
@@ -27621,5 +27629,5 @@ function register() {
27621
27629
  // src/register.ts
27622
27630
  register();
27623
27631
 
27624
- //# debugId=95CD3EF27A87372D64756E2164756E21
27632
+ //# debugId=0EC2D56AA9AC49B964756E2164756E21
27625
27633
  //# sourceMappingURL=register.js.map