@monospaced/set-core 0.18.0 → 0.19.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/dist/index.js CHANGED
@@ -6277,26 +6277,28 @@ const ln = {
6277
6277
  };
6278
6278
  function Ue({
6279
6279
  align: t = "start",
6280
- id: n,
6281
- level: e,
6282
- opticalAlign: i,
6283
- responsive: r,
6284
- size: a = "md",
6285
- text: d
6280
+ children: n,
6281
+ id: e,
6282
+ level: i,
6283
+ linkVisited: r = !0,
6284
+ opticalAlign: a,
6285
+ responsive: d,
6286
+ size: o = "md"
6286
6287
  }) {
6287
- const o = b(n);
6288
+ const s = b(e);
6288
6289
  return {
6289
6290
  kind: "element",
6290
- tag: e ? `h${e}` : "span",
6291
+ tag: i ? `h${i}` : "span",
6291
6292
  attrs: {
6292
6293
  class: "set-heading",
6293
6294
  "data-align": t === "start" ? void 0 : t,
6294
- "data-optical-align": i,
6295
- "data-responsive": r,
6296
- "data-size": a,
6297
- id: o
6295
+ "data-link-visited": r ? void 0 : "off",
6296
+ "data-optical-align": a,
6297
+ "data-responsive": d,
6298
+ "data-size": o,
6299
+ id: s
6298
6300
  },
6299
- children: [{ kind: "text", value: d }]
6301
+ children: [{ kind: "raw", html: n }]
6300
6302
  };
6301
6303
  }
6302
6304
  function cn(t) {
@@ -6320,13 +6322,18 @@ const un = {
6320
6322
  },
6321
6323
  class: "set-heading"
6322
6324
  },
6323
- content: { kind: "text", prop: "text" },
6325
+ content: { kind: "html", prop: "children" },
6324
6326
  props: {
6325
6327
  align: {
6326
6328
  default: "start",
6327
6329
  description: "Text alignment.",
6328
6330
  type: { kind: "enum", values: ["start", "center", "end"] }
6329
6331
  },
6332
+ children: {
6333
+ description: "Heading content. Supports inline `<a>` links.",
6334
+ required: !0,
6335
+ type: { kind: "html" }
6336
+ },
6330
6337
  id: {
6331
6338
  description: "DOM id.",
6332
6339
  type: { kind: "string" }
@@ -6335,6 +6342,11 @@ const un = {
6335
6342
  description: "Semantic heading level. Renders a `<span>` when omitted.",
6336
6343
  type: { kind: "enum", values: [1, 2, 3, 4, 5, 6] }
6337
6344
  },
6345
+ linkVisited: {
6346
+ default: !0,
6347
+ description: "Styles visited links inside the heading.",
6348
+ type: { kind: "boolean" }
6349
+ },
6338
6350
  opticalAlign: {
6339
6351
  default: !1,
6340
6352
  description: "Optically aligns left sidebearing-heavy glyphs with the content edge.",
@@ -6352,11 +6364,6 @@ const un = {
6352
6364
  kind: "enum",
6353
6365
  values: ["xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl"]
6354
6366
  }
6355
- },
6356
- text: {
6357
- description: "Heading text.",
6358
- required: !0,
6359
- type: { kind: "text" }
6360
6367
  }
6361
6368
  },
6362
6369
  events: {},
@@ -6372,6 +6379,12 @@ const un = {
6372
6379
  },
6373
6380
  value: { kind: "prop", prop: "align" }
6374
6381
  },
6382
+ {
6383
+ target: { on: "host" },
6384
+ attribute: "data-link-visited",
6385
+ condition: { kind: "when-equals", prop: "linkVisited", to: !1 },
6386
+ value: { kind: "literal", text: "off" }
6387
+ },
6375
6388
  {
6376
6389
  target: { on: "host" },
6377
6390
  attribute: "data-optical-align",