chore: abstract types to shared package (#1593)
* chore: update types * small typing change * fix typing issue * typed node * add extra lint skip * add changeset --------- Co-authored-by: Eoghan Murray <eoghan@getthere.ie> Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import {
|
||||
NodeType as RRNodeType,
|
||||
Mirror as NodeMirror,
|
||||
type elementNode,
|
||||
} from 'rrweb-snapshot';
|
||||
import { type Mirror as NodeMirror } from 'rrweb-snapshot';
|
||||
import { NodeType as RRNodeType } from '@rrweb/types';
|
||||
import type {
|
||||
canvasMutationData,
|
||||
canvasEventWithTime,
|
||||
elementNode,
|
||||
inputData,
|
||||
scrollData,
|
||||
styleDeclarationData,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NodeType as RRNodeType } from 'rrweb-snapshot';
|
||||
import { NodeType as RRNodeType } from '@rrweb/types';
|
||||
import { parseCSSText, camelize, toCSSText } from './style';
|
||||
export interface IRRNode {
|
||||
parentElement: IRRNode | null;
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import {
|
||||
NodeType as RRNodeType,
|
||||
createMirror as createNodeMirror,
|
||||
} from 'rrweb-snapshot';
|
||||
import { createMirror as createNodeMirror } from 'rrweb-snapshot';
|
||||
import type { Mirror as NodeMirror } from 'rrweb-snapshot';
|
||||
import { NodeType as RRNodeType } from '@rrweb/types';
|
||||
import type {
|
||||
Mirror as NodeMirror,
|
||||
IMirror,
|
||||
serializedNodeWithId,
|
||||
} from 'rrweb-snapshot';
|
||||
import type {
|
||||
canvasMutationData,
|
||||
canvasEventWithTime,
|
||||
inputData,
|
||||
|
||||
@@ -5,12 +5,7 @@ import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as puppeteer from 'puppeteer';
|
||||
import { vi, MockInstance } from 'vitest';
|
||||
import {
|
||||
NodeType as RRNodeType,
|
||||
createMirror,
|
||||
Mirror as NodeMirror,
|
||||
serializedNodeWithId,
|
||||
} from 'rrweb-snapshot';
|
||||
import { createMirror, Mirror as NodeMirror } from 'rrweb-snapshot';
|
||||
import {
|
||||
buildFromDom,
|
||||
getDefaultSN,
|
||||
@@ -27,8 +22,16 @@ import {
|
||||
sameNodeType,
|
||||
} from '../src/diff';
|
||||
import type { IRRElement, IRRNode } from '../src/document';
|
||||
import type { canvasMutationData, styleSheetRuleData } from '@rrweb/types';
|
||||
import { EventType, IncrementalSource } from '@rrweb/types';
|
||||
import type {
|
||||
serializedNodeWithId,
|
||||
canvasMutationData,
|
||||
styleSheetRuleData,
|
||||
} from '@rrweb/types';
|
||||
import {
|
||||
NodeType as RRNodeType,
|
||||
EventType,
|
||||
IncrementalSource,
|
||||
} from '@rrweb/types';
|
||||
|
||||
const elementSn = {
|
||||
type: RRNodeType.Element,
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
*/
|
||||
import { vi, MockInstance } from 'vitest';
|
||||
import {
|
||||
NodeType as RRNodeType,
|
||||
createMirror,
|
||||
Mirror as NodeMirror,
|
||||
serializedNodeWithId,
|
||||
} from 'rrweb-snapshot';
|
||||
import { NodeType as RRNodeType } from '@rrweb/types';
|
||||
import { RRDocument } from '../../src';
|
||||
import { diff, ReplayerHandler } from '../../src/diff';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @jest-environment jsdom
|
||||
*/
|
||||
import { NodeType as RRNodeType } from 'rrweb-snapshot';
|
||||
import { NodeType as RRNodeType } from '@rrweb/types';
|
||||
import {
|
||||
BaseRRDocument,
|
||||
BaseRRDocumentType,
|
||||
|
||||
@@ -6,18 +6,17 @@ import * as path from 'path';
|
||||
import * as puppeteer from 'puppeteer';
|
||||
import { vi } from 'vitest';
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { buildNodeWithSN, Mirror } from 'rrweb-snapshot';
|
||||
import {
|
||||
buildNodeWithSN,
|
||||
cdataNode,
|
||||
commentNode,
|
||||
documentNode,
|
||||
documentTypeNode,
|
||||
elementNode,
|
||||
Mirror,
|
||||
NodeType,
|
||||
NodeType as RRNodeType,
|
||||
textNode,
|
||||
} from 'rrweb-snapshot';
|
||||
} from '@rrweb/types';
|
||||
import {
|
||||
buildFromDom,
|
||||
buildFromNode,
|
||||
|
||||
Reference in New Issue
Block a user