@kaizen/components 1.70.22 → 1.70.24

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.
@@ -3,7 +3,6 @@
3
3
  var tslib = require('tslib');
4
4
  var React = require('react');
5
5
  var Icon = require('../../../__rc__/Icon/Icon.cjs');
6
- require('vitest');
7
6
  var listIsActive = require('../../utils/commands/listIsActive.cjs');
8
7
  var markIsActive = require('../../utils/commands/markIsActive.cjs');
9
8
  require('prosemirror-transform');
@@ -2,7 +2,6 @@
2
2
 
3
3
  var debounce = require('lodash.debounce');
4
4
  var ProseMirrorState = require('prosemirror-state');
5
- require('vitest');
6
5
  var getMarkAttrs = require('../../commands/getMarkAttrs.cjs');
7
6
  var getMarkRange = require('../../commands/getMarkRange.cjs');
8
7
  require('prosemirror-utils');
@@ -355,7 +355,6 @@ var RichTextEditor = require('./RichTextEditor/RichTextEditor/RichTextEditor.cjs
355
355
  var ToggleIconButton = require('./RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/ToggleIconButton.cjs');
356
356
  var Toolbar = require('./RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.cjs');
357
357
  var ToolbarSection = require('./RichTextEditor/RichTextEditor/subcomponents/ToolbarSection/ToolbarSection.cjs');
358
- var mockRangeForBoundingRect = require('./RichTextEditor/utils/commands/fixtures/mockRangeForBoundingRect.cjs');
359
358
  var addMark = require('./RichTextEditor/utils/commands/addMark.cjs');
360
359
  var getMarkAttrs = require('./RichTextEditor/utils/commands/getMarkAttrs.cjs');
361
360
  var getMarkRange = require('./RichTextEditor/utils/commands/getMarkRange.cjs');
@@ -982,7 +981,6 @@ exports.RichTextEditor = RichTextEditor.RichTextEditor;
982
981
  exports.ToggleIconButton = ToggleIconButton.ToggleIconButton;
983
982
  exports.Toolbar = Toolbar.Toolbar;
984
983
  exports.ToolbarSection = ToolbarSection.ToolbarSection;
985
- exports.mockRangeForBoundingRect = mockRangeForBoundingRect.mockRangeForBoundingRect;
986
984
  exports.addMark = addMark.addMark;
987
985
  exports.getMarkAttrs = getMarkAttrs.getMarkAttrs;
988
986
  exports.getMarkRange = getMarkRange.getMarkRange;
@@ -1,7 +1,6 @@
1
1
  import { __assign } from 'tslib';
2
2
  import React from 'react';
3
3
  import { Icon } from '../../../__rc__/Icon/Icon.mjs';
4
- import 'vitest';
5
4
  import { listIsActive } from '../../utils/commands/listIsActive.mjs';
6
5
  import { markIsActive } from '../../utils/commands/markIsActive.mjs';
7
6
  import 'prosemirror-transform';
@@ -1,6 +1,5 @@
1
1
  import debounce from 'lodash.debounce';
2
2
  import { Plugin } from 'prosemirror-state';
3
- import 'vitest';
4
3
  import { getMarkAttrs } from '../../commands/getMarkAttrs.mjs';
5
4
  import { getMarkRange } from '../../commands/getMarkRange.mjs';
6
5
  import 'prosemirror-utils';
@@ -353,7 +353,6 @@ export { RichTextEditor } from './RichTextEditor/RichTextEditor/RichTextEditor.m
353
353
  export { ToggleIconButton } from './RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/ToggleIconButton.mjs';
354
354
  export { Toolbar } from './RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.mjs';
355
355
  export { ToolbarSection } from './RichTextEditor/RichTextEditor/subcomponents/ToolbarSection/ToolbarSection.mjs';
356
- export { mockRangeForBoundingRect } from './RichTextEditor/utils/commands/fixtures/mockRangeForBoundingRect.mjs';
357
356
  export { addMark } from './RichTextEditor/utils/commands/addMark.mjs';
358
357
  export { getMarkAttrs } from './RichTextEditor/utils/commands/getMarkAttrs.mjs';
359
358
  export { getMarkRange } from './RichTextEditor/utils/commands/getMarkRange.mjs';
@@ -1,4 +1,4 @@
1
- import { type Key, type Node } from '@react-types/shared';
1
+ import { type Key, type Node, type Selection as ReactAriaSelection } from '@react-types/shared';
2
2
  export type ItemType = {
3
3
  label: string;
4
4
  value: Key;
@@ -6,3 +6,4 @@ export type ItemType = {
6
6
  isDisabled?: boolean;
7
7
  };
8
8
  export type MultiSelectItem = Node<ItemType>;
9
+ export type Selection = ReactAriaSelection;
@@ -1,4 +1,3 @@
1
- export * from './fixtures/mockRangeForBoundingRect';
2
1
  export * from './addMark';
3
2
  export * from './getMarkAttrs';
4
3
  export * from './getMarkRange';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "1.70.22",
3
+ "version": "1.70.24",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -1,4 +1,4 @@
1
- import { type Key, type Node } from '@react-types/shared'
1
+ import { type Key, type Node, type Selection as ReactAriaSelection } from '@react-types/shared'
2
2
 
3
3
  export type ItemType = {
4
4
  label: string
@@ -8,3 +8,5 @@ export type ItemType = {
8
8
  }
9
9
 
10
10
  export type MultiSelectItem = Node<ItemType>
11
+
12
+ export type Selection = ReactAriaSelection
@@ -1,4 +1,3 @@
1
- export * from './fixtures/mockRangeForBoundingRect'
2
1
  export * from './addMark'
3
2
  export * from './getMarkAttrs'
4
3
  export * from './getMarkRange'
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- var vitest = require('vitest');
4
-
5
- // eslint-disable-next-line import/no-extraneous-dependencies
6
- /*
7
- ** This is used handle the JSDom type error issue you may encounter in testing
8
- ** See https://github.com/jsdom/jsdom/issues/3002
9
- */
10
- var mockRangeForBoundingRect = function () {
11
- vitest.vi.spyOn(document, 'createRange').mockImplementation(function () {
12
- var range = new Range();
13
- range.getBoundingClientRect = function () {
14
- return {
15
- x: 0,
16
- y: 0,
17
- bottom: 0,
18
- height: 0,
19
- left: 0,
20
- right: 0,
21
- top: 0,
22
- width: 0,
23
- toJSON: function () {
24
- return undefined;
25
- }
26
- };
27
- };
28
- range.getClientRects = function () {
29
- var _a;
30
- return _a = {
31
- item: function () {
32
- return null;
33
- },
34
- length: 0
35
- }, _a[Symbol.iterator] = vitest.vi.fn(), _a;
36
- };
37
- return range;
38
- });
39
- };
40
- exports.mockRangeForBoundingRect = mockRangeForBoundingRect;
@@ -1,38 +0,0 @@
1
- import { vi } from 'vitest';
2
-
3
- // eslint-disable-next-line import/no-extraneous-dependencies
4
- /*
5
- ** This is used handle the JSDom type error issue you may encounter in testing
6
- ** See https://github.com/jsdom/jsdom/issues/3002
7
- */
8
- var mockRangeForBoundingRect = function () {
9
- vi.spyOn(document, 'createRange').mockImplementation(function () {
10
- var range = new Range();
11
- range.getBoundingClientRect = function () {
12
- return {
13
- x: 0,
14
- y: 0,
15
- bottom: 0,
16
- height: 0,
17
- left: 0,
18
- right: 0,
19
- top: 0,
20
- width: 0,
21
- toJSON: function () {
22
- return undefined;
23
- }
24
- };
25
- };
26
- range.getClientRects = function () {
27
- var _a;
28
- return _a = {
29
- item: function () {
30
- return null;
31
- },
32
- length: 0
33
- }, _a[Symbol.iterator] = vi.fn(), _a;
34
- };
35
- return range;
36
- });
37
- };
38
- export { mockRangeForBoundingRect };