element-book 10.1.6 → 10.1.7

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.
@@ -1,4 +1,5 @@
1
- import { isRuntimeTypeOf, randomString } from '@augment-vir/common';
1
+ import { randomString } from '@augment-vir/common';
2
+ import { isRunTimeType } from 'run-time-assertions';
2
3
  import { fuzzySearch } from '../../util/fuzzy-search';
3
4
  const searchJoin = randomString(32);
4
5
  function createBreadcrumbsSearchKey(breadcrumbs) {
@@ -57,7 +58,7 @@ export function searchFlattenedNodes({ flattenedNodes, searchQuery, }) {
57
58
  return flattenedNodes.filter((treeNode) => {
58
59
  const inSearchResultsKey = createBreadcrumbsSearchKey(treeNode.fullUrlBreadcrumbs);
59
60
  const shouldInclude = includeInSearchResults[inSearchResultsKey];
60
- if (!isRuntimeTypeOf(shouldInclude, 'boolean')) {
61
+ if (!isRunTimeType(shouldInclude, 'boolean')) {
61
62
  throw new Error(`Failed to find '${treeNode.fullUrlBreadcrumbs.join(' > ')}' in includeInSearchResults.`);
62
63
  }
63
64
  return shouldInclude;
@@ -1,5 +1,6 @@
1
- import { isRuntimeTypeOf, typedHasProperties, typedHasProperty } from '@augment-vir/common';
1
+ import { typedHasProperties, typedHasProperty } from '@augment-vir/common';
2
2
  import { defineCssVars, setCssVarValue } from 'lit-css-vars';
3
+ import { isRunTimeType } from 'run-time-assertions';
3
4
  export const colorThemeCssVars = defineCssVars({
4
5
  'element-book-nav-hover-background-color': 'magenta',
5
6
  'element-book-nav-hover-foreground-color': 'magenta',
@@ -54,7 +55,7 @@ function isCssVarDefinition(input) {
54
55
  'value',
55
56
  'default',
56
57
  ]) &&
57
- isRuntimeTypeOf(input.default, 'string') &&
58
+ isRunTimeType(input.default, 'string') &&
58
59
  isCssResult(input.name) &&
59
60
  isCssResult(input.value));
60
61
  }
@@ -1,5 +1,5 @@
1
- import { isRuntimeTypeOf } from '@augment-vir/common';
2
1
  import { css, html } from 'element-vir';
2
+ import { isRunTimeType } from 'run-time-assertions';
3
3
  import { defineBookElement } from '../define-book-element';
4
4
  export const BookError = defineBookElement()({
5
5
  tagName: 'book-error',
@@ -17,7 +17,7 @@ export const BookError = defineBookElement()({
17
17
  }
18
18
  `,
19
19
  renderCallback({ inputs }) {
20
- const paragraphs = isRuntimeTypeOf(inputs.message, 'array')
20
+ const paragraphs = isRunTimeType(inputs.message, 'array')
21
21
  ? inputs.message
22
22
  : [inputs.message];
23
23
  return paragraphs.map((paragraph) => html `
@@ -1,6 +1,6 @@
1
1
  import { extractEventTarget } from '@augment-vir/browser';
2
- import { isRuntimeTypeOf } from '@augment-vir/common';
3
2
  import { css, defineElementEvent, html, listen, renderIf } from 'element-vir';
3
+ import { isRunTimeType } from 'run-time-assertions';
4
4
  import { Options24Icon, ViraIcon, ViraInput } from 'vira';
5
5
  import { BookPageControlTypeEnum, isControlInitType, } from '../../../../data/book-entry/book-page/book-page-controls';
6
6
  import { colorThemeCssVars } from '../../../color-theme/color-theme';
@@ -62,7 +62,7 @@ export const BookPageControls = defineBookElement()({
62
62
  return '';
63
63
  }
64
64
  const controlInputTemplate = createControlInput(inputs.currentValues[controlName], controlInit, (newValue) => {
65
- const fullUrlBreadcrumbs = isRuntimeTypeOf(inputs.fullUrlBreadcrumbs, 'array')
65
+ const fullUrlBreadcrumbs = isRunTimeType(inputs.fullUrlBreadcrumbs, 'array')
66
66
  ? inputs.fullUrlBreadcrumbs
67
67
  : inputs.fullUrlBreadcrumbs[controlName];
68
68
  if (!fullUrlBreadcrumbs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-book",
3
- "version": "10.1.6",
3
+ "version": "10.1.7",
4
4
  "keywords": [
5
5
  "book",
6
6
  "design system",
@@ -40,18 +40,18 @@
40
40
  "test:watch": "web-test-runner --color --watch --config configs/web-test-runner.config.mjs"
41
41
  },
42
42
  "dependencies": {
43
- "@augment-vir/browser": "^21.6.1",
44
- "@augment-vir/common": "^21.6.1",
43
+ "@augment-vir/browser": "^22.0.0",
44
+ "@augment-vir/common": "^22.0.0",
45
45
  "colorjs.io": "0.4.5",
46
- "element-vir": "^17.0.0",
47
- "lit-css-vars": "^3.0.2",
48
- "object-shape-tester": "^1.0.1",
49
- "spa-router-vir": "^3.0.2",
50
- "typed-event-target": "^2.0.0",
46
+ "element-vir": "^17.0.1",
47
+ "lit-css-vars": "^3.0.4",
48
+ "object-shape-tester": "^1.0.2",
49
+ "spa-router-vir": "^3.0.3",
50
+ "typed-event-target": "^2.0.1",
51
51
  "vira": "^2.5.2"
52
52
  },
53
53
  "devDependencies": {
54
- "@augment-vir/browser-testing": "^21.6.1",
54
+ "@augment-vir/browser-testing": "^22.0.0",
55
55
  "@open-wc/testing": "^4.0.0",
56
56
  "@types/chai": "^4.3.10",
57
57
  "@types/mocha": "^10.0.4",
@@ -60,10 +60,10 @@
60
60
  "@web/test-runner-commands": "^0.9.0",
61
61
  "@web/test-runner-playwright": "^0.11.0",
62
62
  "@web/test-runner-visual-regression": "^0.9.0",
63
- "istanbul-smart-text-reporter": "^1.1.2",
64
- "markdown-code-example-inserter": "^0.3.2",
65
- "run-time-assertions": "^0.1.3",
66
- "type-fest": "^4.7.1",
63
+ "istanbul-smart-text-reporter": "^1.1.3",
64
+ "markdown-code-example-inserter": "^0.3.3",
65
+ "run-time-assertions": "^0.2.1",
66
+ "type-fest": "^4.8.1",
67
67
  "typedoc": "^0.25.3",
68
68
  "typescript": "^5.2.2"
69
69
  }