element-vir 26.12.1 → 26.13.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.
@@ -16,6 +16,6 @@ export type DeclarativeElementDefinitionOptions = {
16
16
  /**
17
17
  * Default values for {@link DeclarativeElementDefinitionOptions}.
18
18
  *
19
- * @internal
19
+ * @category Internal
20
20
  */
21
21
  export declare const defaultDeclarativeElementDefinitionOptions: DeclarativeElementDefinitionOptions;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Default values for {@link DeclarativeElementDefinitionOptions}.
3
3
  *
4
- * @internal
4
+ * @category Internal
5
5
  */
6
6
  export const defaultDeclarativeElementDefinitionOptions = {
7
7
  allowPolymorphicState: false,
@@ -7,7 +7,7 @@ import { extractElement } from './directive-helpers.js';
7
7
  */
8
8
  export function createAttributeDirective(attributeName) {
9
9
  const newDirective = directive(
10
- /** @internal */
10
+ /** @category Internal */
11
11
  class extends Directive {
12
12
  element;
13
13
  constructor(partInfo) {
package/dist/index.d.ts CHANGED
@@ -39,5 +39,4 @@ export * from './template-transforms/vir-html/vir-html.js';
39
39
  export * from './typed-event/typed-event.js';
40
40
  export * from './util/increment.js';
41
41
  export * from './util/lit-template.js';
42
- export * from './util/map-async-value.js';
43
42
  export * from './util/type.js';
package/dist/index.js CHANGED
@@ -39,5 +39,4 @@ export * from './template-transforms/vir-html/vir-html.js';
39
39
  export * from './typed-event/typed-event.js';
40
40
  export * from './util/increment.js';
41
41
  export * from './util/lit-template.js';
42
- export * from './util/map-async-value.js';
43
42
  export * from './util/type.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-vir",
3
- "version": "26.12.1",
3
+ "version": "26.13.0",
4
4
  "keywords": [
5
5
  "custom",
6
6
  "web",
@@ -39,19 +39,19 @@
39
39
  "test:docs": "virmator docs check"
40
40
  },
41
41
  "dependencies": {
42
- "@augment-vir/assert": "^31.54.3",
43
- "@augment-vir/common": "^31.54.3",
44
- "date-vir": "^8.0.0",
45
- "lit": "^3.3.1",
42
+ "@augment-vir/assert": "^31.57.3",
43
+ "@augment-vir/common": "^31.57.3",
44
+ "date-vir": "^8.1.0",
45
+ "lit": "^3.3.2",
46
46
  "lit-css-vars": "^3.0.11",
47
- "lit-html": "^3.3.1",
48
- "object-shape-tester": "^6.10.0",
49
- "observavir": "^2.2.0",
47
+ "lit-html": "^3.3.2",
48
+ "object-shape-tester": "^6.11.0",
49
+ "observavir": "^2.3.0",
50
50
  "typed-event-target": "^4.1.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@augment-vir/test": "^31.54.3",
54
- "@augment-vir/web": "^31.54.3",
53
+ "@augment-vir/test": "^31.57.3",
54
+ "@augment-vir/web": "^31.57.3",
55
55
  "@web/dev-server-esbuild": "^1.0.4",
56
56
  "@web/test-runner": "^0.20.2",
57
57
  "@web/test-runner-commands": "^0.9.0",
@@ -63,8 +63,8 @@
63
63
  "type-fest": "^5.3.1",
64
64
  "typedoc": "^0.28.15",
65
65
  "typescript": "5.9.3",
66
- "vite": "^7.2.7",
67
- "vite-tsconfig-paths": "^5.1.4"
66
+ "vite": "^7.3.0",
67
+ "vite-tsconfig-paths": "^6.0.3"
68
68
  },
69
69
  "engines": {
70
70
  "node": ">=22"
@@ -1,7 +0,0 @@
1
- import { type AsyncValue } from 'observavir';
2
- /**
3
- * Maps an async value to a new async value.
4
- *
5
- * @category Util
6
- */
7
- export declare function mapAsyncValue<const OriginalValue, const MappedValue>(asyncValue: AsyncValue<OriginalValue>, mapper: (value: NoInfer<OriginalValue>) => MappedValue): AsyncValue<MappedValue>;
@@ -1,31 +0,0 @@
1
- import { isNotNoUpdate } from 'observavir';
2
- /**
3
- * Maps an async value to a new async value.
4
- *
5
- * @category Util
6
- */
7
- export function mapAsyncValue(asyncValue, mapper) {
8
- if (asyncValue instanceof Error) {
9
- return asyncValue;
10
- }
11
- else if (asyncValue instanceof Promise) {
12
- return asyncValue.then((value) => {
13
- const mapped = mapper(value);
14
- if (isNotNoUpdate(mapped)) {
15
- return mapped;
16
- }
17
- else {
18
- throw new Error('Cannot map to no update.');
19
- }
20
- });
21
- }
22
- else {
23
- const mapped = mapper(asyncValue);
24
- if (isNotNoUpdate(mapped)) {
25
- return mapped;
26
- }
27
- else {
28
- throw new Error('Cannot map to no update.');
29
- }
30
- }
31
- }