@forsakringskassan/docs-live-example 1.5.2 → 1.5.3

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/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  Komponenten består av tre ytor:
6
6
 
7
- - exempelyta: innehåller det kompilerade exemplet.
8
- - kontrollyta: innehåller de inmatningsfält som används för att konfigurera exemplet.
9
- - kodyta: visar HTML-markup och Vue-template för exemplet (om Vue-komponenter används).
7
+ - exempelyta: innehåller det kompilerade exemplet.
8
+ - kontrollyta: innehåller de inmatningsfält som används för att konfigurera exemplet.
9
+ - kodyta: visar HTML-markup och Vue-template för exemplet (om Vue-komponenter används).
10
10
 
11
11
  Eftersom `live-example` kompileras i runtime så kan man direkt modifiera exemplet och den markup som visas genom att använda de inmatningsfält som lagts till i kontrollytan.
12
12
 
@@ -218,12 +218,12 @@ createElement("div", { id: "my-awesome-id", class: ["foo", "bar"] });
218
218
 
219
219
  Attributes can be:
220
220
 
221
- - `string` - value is passed as-is: `{ key: "value" }` becomes `key="value"`.
222
- - `number` - value is converted to string: `{ key: 12 }` becomes `key="12"`.
223
- - `boolean` - key is set if value is true: `{ key: true }` becomes `key` and `{ key: false }` omits the attribute.
224
- - `Array` - each non-empty item is joined: `{ key: ["foo", "bar"] }` becomes `key="foo bar"`.
225
- - `Object` - nests attributes: `{ data: { key: "value" } }` becomes `data-key="value"`.
226
- - `null` and `undefined` are omitted from its context, e.g. `{ key: null }` `{ key: [null] ` and `{ key: { value: null } }` are all omitted.
221
+ - `string` - value is passed as-is: `{ key: "value" }` becomes `key="value"`.
222
+ - `number` - value is converted to string: `{ key: 12 }` becomes `key="12"`.
223
+ - `boolean` - key is set if value is true: `{ key: true }` becomes `key` and `{ key: false }` omits the attribute.
224
+ - `Array` - each non-empty item is joined: `{ key: ["foo", "bar"] }` becomes `key="foo bar"`.
225
+ - `Object` - nests attributes: `{ data: { key: "value" } }` becomes `data-key="value"`.
226
+ - `null` and `undefined` are omitted from its context, e.g. `{ key: null }` `{ key: [null] ` and `{ key: { value: null } }` are all omitted.
227
227
 
228
228
  Content can be added:
229
229
 
package/dist/cjs/index.js CHANGED
@@ -918,7 +918,7 @@ var require_core = __commonJS({
918
918
  }
919
919
  return mode;
920
920
  }
921
- var version = "11.10.0";
921
+ var version = "11.11.0";
922
922
  var HTMLInjectionError = class extends Error {
923
923
  constructor(reason, html) {
924
924
  super(reason);
@@ -1232,6 +1232,7 @@ var require_core = __commonJS({
1232
1232
  }
1233
1233
  }
1234
1234
  if (match.type === "illegal" && lexeme === "") {
1235
+ modeBuffer += "\n";
1235
1236
  return 1;
1236
1237
  }
1237
1238
  if (iterations > 1e5 && iterations > match.index * 3) {
@@ -1418,19 +1419,19 @@ var require_core = __commonJS({
1418
1419
  }
1419
1420
  let wantsHighlight = false;
1420
1421
  function highlightAll() {
1422
+ function boot() {
1423
+ highlightAll();
1424
+ }
1421
1425
  if (document.readyState === "loading") {
1426
+ if (!wantsHighlight) {
1427
+ window.addEventListener("DOMContentLoaded", boot, false);
1428
+ }
1422
1429
  wantsHighlight = true;
1423
1430
  return;
1424
1431
  }
1425
1432
  const blocks = document.querySelectorAll(options.cssSelector);
1426
1433
  blocks.forEach(highlightElement);
1427
1434
  }
1428
- function boot() {
1429
- if (wantsHighlight) highlightAll();
1430
- }
1431
- if (typeof window !== "undefined" && window.addEventListener) {
1432
- window.addEventListener("DOMContentLoaded", boot, false);
1433
- }
1434
1435
  function registerLanguage(languageName, languageDefinition) {
1435
1436
  let lang = null;
1436
1437
  try {
package/dist/esm/index.js CHANGED
@@ -912,7 +912,7 @@ var require_core = __commonJS({
912
912
  }
913
913
  return mode;
914
914
  }
915
- var version = "11.10.0";
915
+ var version = "11.11.0";
916
916
  var HTMLInjectionError = class extends Error {
917
917
  constructor(reason, html) {
918
918
  super(reason);
@@ -1226,6 +1226,7 @@ var require_core = __commonJS({
1226
1226
  }
1227
1227
  }
1228
1228
  if (match.type === "illegal" && lexeme === "") {
1229
+ modeBuffer += "\n";
1229
1230
  return 1;
1230
1231
  }
1231
1232
  if (iterations > 1e5 && iterations > match.index * 3) {
@@ -1412,19 +1413,19 @@ var require_core = __commonJS({
1412
1413
  }
1413
1414
  let wantsHighlight = false;
1414
1415
  function highlightAll() {
1416
+ function boot() {
1417
+ highlightAll();
1418
+ }
1415
1419
  if (document.readyState === "loading") {
1420
+ if (!wantsHighlight) {
1421
+ window.addEventListener("DOMContentLoaded", boot, false);
1422
+ }
1416
1423
  wantsHighlight = true;
1417
1424
  return;
1418
1425
  }
1419
1426
  const blocks = document.querySelectorAll(options.cssSelector);
1420
1427
  blocks.forEach(highlightElement);
1421
1428
  }
1422
- function boot() {
1423
- if (wantsHighlight) highlightAll();
1424
- }
1425
- if (typeof window !== "undefined" && window.addEventListener) {
1426
- window.addEventListener("DOMContentLoaded", boot, false);
1427
- }
1428
1429
  function registerLanguage(languageName, languageDefinition) {
1429
1430
  let lang = null;
1430
1431
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/docs-live-example",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Components used for live examples",
5
5
  "keywords": [
6
6
  "documentation"