react-rx 2.1.0 → 2.1.2

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.
Files changed (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -0
  3. package/dist/cjs/__tests__/strictmode.test.d.ts +1 -0
  4. package/dist/cjs/__tests__/strictmode.test.js +111 -0
  5. package/dist/cjs/__tests__/useAsObservable.test.d.ts +1 -0
  6. package/dist/cjs/__tests__/useAsObservable.test.js +77 -0
  7. package/dist/cjs/__tests__/useObservable.test.d.ts +1 -0
  8. package/dist/cjs/__tests__/useObservable.test.js +116 -0
  9. package/dist/cjs/displayName.js +1 -0
  10. package/dist/cjs/reactiveComponent.js +2 -0
  11. package/dist/cjs/utils.js +5 -0
  12. package/dist/es2015/__tests__/strictmode.test.d.ts +1 -0
  13. package/dist/es2015/__tests__/strictmode.test.js +69 -0
  14. package/dist/es2015/__tests__/useAsObservable.test.d.ts +1 -0
  15. package/dist/es2015/__tests__/useAsObservable.test.js +72 -0
  16. package/dist/es2015/__tests__/useObservable.test.d.ts +1 -0
  17. package/dist/es2015/__tests__/useObservable.test.js +110 -0
  18. package/dist/es2015/displayName.js +1 -0
  19. package/dist/es2015/reactiveComponent.js +2 -0
  20. package/dist/es2015/utils.js +5 -0
  21. package/dist/esm/__tests__/strictmode.test.d.ts +1 -0
  22. package/dist/esm/__tests__/strictmode.test.js +109 -0
  23. package/dist/esm/__tests__/useAsObservable.test.d.ts +1 -0
  24. package/dist/esm/__tests__/useAsObservable.test.js +72 -0
  25. package/dist/esm/__tests__/useObservable.test.d.ts +1 -0
  26. package/dist/esm/__tests__/useObservable.test.js +114 -0
  27. package/dist/esm/displayName.js +1 -0
  28. package/dist/esm/reactiveComponent.js +2 -0
  29. package/dist/esm/utils.js +5 -0
  30. package/package.json +70 -30
  31. package/src/__tests__/strictmode.test.ts +79 -0
  32. package/src/__tests__/useAsObservable.test.tsx +94 -0
  33. package/src/__tests__/useObservable.test.tsx +145 -0
  34. package/src/displayName.ts +1 -0
  35. package/src/reactiveComponent.ts +3 -0
  36. package/src/useWithObservable.ts +1 -0
  37. package/src/utils.ts +5 -0
  38. package/.eslintrc.json +0 -13
  39. package/.idea/codeStyles/Project.xml +0 -113
  40. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  41. package/.idea/compiler.xml +0 -6
  42. package/.idea/encodings.xml +0 -4
  43. package/.idea/inspectionProfiles/Project_Default.xml +0 -7
  44. package/.idea/jsonSchemas.xml +0 -25
  45. package/.idea/markdown-navigator-enh.xml +0 -29
  46. package/.idea/markdown-navigator.xml +0 -55
  47. package/.idea/markdown.xml +0 -9
  48. package/.idea/misc.xml +0 -0
  49. package/.idea/modules.xml +0 -8
  50. package/.idea/react-rx.iml +0 -17
  51. package/.idea/vcs.xml +0 -6
  52. package/.prettierrc +0 -8
  53. package/jest.config.ts +0 -14
  54. package/tsconfig.json +0 -12
@@ -0,0 +1,79 @@
1
+ import {BehaviorSubject, Observable, of} from 'rxjs'
2
+ import {useObservable} from '../useObservable'
3
+ import {createElement, Fragment, StrictMode, useEffect} from 'react'
4
+ import {act, render} from '@testing-library/react'
5
+ import {useAsObservable} from '../useAsObservable'
6
+
7
+ const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
8
+
9
+ // NOTE: Jest runs NODE_ENV=test by default, which enables development flags for React
10
+
11
+ test('Strict mode should trigger double mount effects and re-renders', async () => {
12
+ const subject = new BehaviorSubject(0)
13
+ const observable = subject.asObservable()
14
+
15
+ const returnedValues: unknown[] = []
16
+ let mountCount = 0
17
+ function ObservableComponent() {
18
+ useEffect(() => {
19
+ mountCount++
20
+ }, [])
21
+ const observedValue = useObservable(observable)
22
+ returnedValues.push(observedValue)
23
+ return createElement(Fragment, null, observedValue)
24
+ }
25
+
26
+ const {rerender} = render(createElement(StrictMode, null, createElement(ObservableComponent)))
27
+ expect(mountCount).toEqual(2)
28
+
29
+ expect(returnedValues).toEqual([0, 0])
30
+
31
+ await wait(10)
32
+ act(() => subject.next(1))
33
+ expect(returnedValues).toEqual([0, 0, 1, 1])
34
+
35
+ act(() => subject.next(2))
36
+ expect(returnedValues).toEqual([0, 0, 1, 1, 2, 2])
37
+
38
+ expect(mountCount).toEqual(2)
39
+ })
40
+
41
+ test('Strict mode should unsubscribe the source observable on unmount', () => {
42
+ let subscribed = false
43
+ const observable = new Observable(() => {
44
+ subscribed = true
45
+ return () => {
46
+ subscribed = false
47
+ }
48
+ })
49
+
50
+ function ObservableComponent() {
51
+ useObservable(observable)
52
+ return createElement(Fragment, null)
53
+ }
54
+
55
+ const {rerender} = render(createElement(StrictMode, null, createElement(ObservableComponent)))
56
+ expect(subscribed).toBe(true)
57
+ rerender(createElement(StrictMode, null, createElement('div')))
58
+ expect(subscribed).toBe(false)
59
+ })
60
+
61
+ test('useAsObservable should work in strict mode', async () => {
62
+ const returnedValues: unknown[] = []
63
+ function ObservableComponent(props: {count: number}) {
64
+ const count$ = useAsObservable(props.count)
65
+ const count = useObservable(count$)
66
+ returnedValues.push(count)
67
+ return createElement(Fragment, null, 'ok')
68
+ }
69
+
70
+ const {rerender} = render(
71
+ createElement(StrictMode, null, createElement(ObservableComponent, {count: 0})),
72
+ )
73
+
74
+ expect(returnedValues).toEqual([0, 0])
75
+
76
+ rerender(createElement(StrictMode, null, createElement(ObservableComponent, {count: 1})))
77
+
78
+ expect(returnedValues).toEqual([0, 0, 0, 0, 1, 1])
79
+ })
@@ -0,0 +1,94 @@
1
+ import {useAsObservable} from '../useAsObservable'
2
+ import React from 'react'
3
+ import {renderHook} from '@testing-library/react'
4
+ import {Observable} from 'rxjs'
5
+
6
+ test('the returned observable should receive a new value when component is rendered with a new value', () => {
7
+ const receivedValues: string[] = []
8
+ const {unmount, rerender} = renderHook(
9
+ (props: {value: string}) => {
10
+ const observable = useAsObservable(props.value)
11
+
12
+ React.useEffect(() => {
13
+ const subscription = observable.subscribe(v => {
14
+ receivedValues.push(v)
15
+ })
16
+ return () => {
17
+ subscription.unsubscribe()
18
+ }
19
+ }, [])
20
+ },
21
+ {initialProps: {value: 'initial'}},
22
+ )
23
+
24
+ rerender({value: 'rerender'})
25
+ rerender({value: 'rerender again'})
26
+
27
+ expect(receivedValues).toEqual(['initial', 'rerender', 'rerender again'])
28
+
29
+ unmount()
30
+ })
31
+
32
+ test('the returned observable should *not* receive a new value when component is rendered with an unchanged value', () => {
33
+ const receivedValues: string[] = []
34
+ const {unmount, rerender} = renderHook(
35
+ (props: {value: string}) => {
36
+ const observable = useAsObservable(props.value)
37
+
38
+ React.useEffect(() => {
39
+ const subscription = observable.subscribe(v => {
40
+ receivedValues.push(v)
41
+ })
42
+ return () => {
43
+ subscription.unsubscribe()
44
+ }
45
+ }, [])
46
+ },
47
+ {initialProps: {value: 'some value'}},
48
+ )
49
+
50
+ rerender({value: 'some value'})
51
+ rerender({value: 'some value'})
52
+
53
+ expect(receivedValues).toEqual(['some value'])
54
+
55
+ unmount()
56
+ })
57
+
58
+ test('the returned observable should have the same identity across multiple re-renders/hook calls', () => {
59
+ const returnValues: Observable<unknown>[] = []
60
+ const {unmount, rerender} = renderHook(() => {
61
+ returnValues.push(useAsObservable('render'))
62
+ })
63
+
64
+ rerender()
65
+ rerender()
66
+
67
+ const [initial, firstRerender, secondRerender] = returnValues
68
+ expect(initial).toBe(firstRerender)
69
+ expect(firstRerender).toBe(secondRerender)
70
+ unmount()
71
+ })
72
+
73
+ test('the returned observable should complete on unmount', () => {
74
+ let didComplete = false
75
+ const {unmount, rerender} = renderHook(() => {
76
+ const observable = useAsObservable('render')
77
+
78
+ React.useEffect(() => {
79
+ const subscription = observable.subscribe({
80
+ complete: () => {
81
+ didComplete = true
82
+ },
83
+ })
84
+ return () => {
85
+ subscription.unsubscribe()
86
+ }
87
+ }, [])
88
+ })
89
+ expect(didComplete).toBe(false)
90
+ rerender()
91
+ expect(didComplete).toBe(false)
92
+ unmount()
93
+ expect(didComplete).toBe(true)
94
+ })
@@ -0,0 +1,145 @@
1
+ import {act, render, renderHook} from '@testing-library/react'
2
+ import {useObservable} from '../useObservable'
3
+ import {asyncScheduler, Observable, of, scheduled, Subject, timer} from 'rxjs'
4
+ import {mapTo} from 'rxjs/operators'
5
+ import {createElement, Fragment} from 'react'
6
+
7
+ test('should subscribe immediately on component mount and unsubscribe on component unmount', () => {
8
+ let subscribed = false
9
+ const observable = new Observable(() => {
10
+ subscribed = true
11
+ return () => {
12
+ subscribed = false
13
+ }
14
+ })
15
+
16
+ expect(subscribed).toBe(false)
17
+
18
+ const {unmount} = renderHook(() => useObservable(observable))
19
+ expect(subscribed).toBe(true)
20
+
21
+ unmount()
22
+ expect(subscribed).toBe(false)
23
+ })
24
+
25
+ test('should only subscribe once when given same observable on re-renders', () => {
26
+ let subscriptionCount = 0
27
+ const observable = new Observable(() => {
28
+ subscriptionCount++
29
+ })
30
+
31
+ expect(subscriptionCount).toBe(0)
32
+
33
+ const {unmount, rerender} = renderHook(() => useObservable(observable))
34
+ expect(subscriptionCount).toBe(1)
35
+ rerender()
36
+ expect(subscriptionCount).toBe(1)
37
+ unmount()
38
+
39
+ renderHook(() => useObservable(observable))
40
+ expect(subscriptionCount).toBe(2)
41
+ })
42
+
43
+ test('should not return undefined during render if initial value is given', () => {
44
+ const observable = timer(100).pipe(mapTo('emitted value'))
45
+
46
+ const returnedValues: unknown[] = []
47
+ function ObservableComponent() {
48
+ const observedValue = useObservable(observable, 'initial value')
49
+ returnedValues.push(observedValue)
50
+ return createElement(Fragment, null, observedValue)
51
+ }
52
+ render(createElement(ObservableComponent))
53
+ expect(returnedValues).toEqual(expect.arrayContaining(['initial value']))
54
+ })
55
+
56
+ test('should not return undefined during render if observable is sync', () => {
57
+ const observable = of('initial value')
58
+
59
+ const returnedValues: unknown[] = []
60
+ function ObservableComponent() {
61
+ const observedValue = useObservable(observable)
62
+ returnedValues.push(observedValue)
63
+ return createElement(Fragment, null, observedValue)
64
+ }
65
+ render(createElement(ObservableComponent))
66
+ expect(returnedValues).toEqual(expect.arrayContaining(['initial value']))
67
+ })
68
+
69
+ test('should return undefined during first render if observable is async', () => {
70
+ const observable = scheduled('async value', asyncScheduler)
71
+
72
+ const returnedValues: unknown[] = []
73
+ function ObservableComponent() {
74
+ const observedValue = useObservable(observable)
75
+ returnedValues.push(observedValue)
76
+ return createElement(Fragment, null, observedValue)
77
+ }
78
+ render(createElement(ObservableComponent))
79
+ expect(returnedValues).toEqual(expect.arrayContaining([undefined]))
80
+ })
81
+
82
+ test('should have sync values from an observable as initial value', () => {
83
+ const observable = of('something sync')
84
+ const {result} = renderHook(() => useObservable(observable))
85
+ expect(result.current).toBe('something sync')
86
+ })
87
+
88
+ test('should have undefined as initial value from delayed observables', () => {
89
+ const {result, unmount} = renderHook(() =>
90
+ useObservable(scheduled('something async', asyncScheduler)),
91
+ )
92
+ expect(result.current).toBeUndefined()
93
+ unmount()
94
+ })
95
+
96
+ test('should have passed initialValue as initial value from delayed observables', () => {
97
+ const {result, unmount} = renderHook(() =>
98
+ useObservable(scheduled('something async', asyncScheduler), 'initial'),
99
+ )
100
+ expect(result.current).toBe('initial')
101
+ unmount()
102
+ })
103
+
104
+ test('should update with values from observables', () => {
105
+ const values$ = new Subject<string>()
106
+ const {result, unmount} = renderHook(() => useObservable(values$))
107
+
108
+ expect(result.current).toBe(undefined)
109
+
110
+ act(() => values$.next('something'))
111
+ expect(result.current).toBe('something')
112
+
113
+ act(() => values$.next('otherthing'))
114
+ expect(result.current).toBe('otherthing')
115
+ unmount()
116
+ })
117
+
118
+ test('should re-subscribe when receiving a new observable', () => {
119
+ const first$ = new Subject<string>()
120
+ const second$ = new Subject<string>()
121
+
122
+ let current$ = first$
123
+
124
+ const {result, rerender, unmount} = renderHook(() => useObservable(current$, '!!initial!!'))
125
+
126
+ act(() => first$.next('first 1'))
127
+ expect(result.current).toBe('first 1')
128
+
129
+ current$ = second$
130
+
131
+ rerender()
132
+
133
+ // since observable #2 hasn't emitted a value yet, we should use the initial value
134
+ expect(result.current).toBe('!!initial!!')
135
+
136
+ // Now we should be subscribed to second$ and it's emission should be returned
137
+ act(() => second$.next('second 1'))
138
+ expect(result.current).toBe('second 1')
139
+
140
+ // we should no longer be subscribed to the first and ignore any emissions
141
+ act(() => first$.next('first 2'))
142
+ expect(result.current).toBe('second 1')
143
+
144
+ unmount()
145
+ })
@@ -6,5 +6,6 @@ const getDisplayName = (Component: any) => {
6
6
  return (Component && (Component.displayName || Component.name)) || 'Unknown'
7
7
  }
8
8
 
9
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/ban-types
9
10
  export const wrapDisplayName = (BaseComponent: Function, wrapperName: string) =>
10
11
  `${wrapperName}(${getDisplayName(BaseComponent)})`
@@ -1,3 +1,4 @@
1
+ /* eslint-disable react-hooks/rules-of-hooks */
1
2
  import {Observable} from 'rxjs'
2
3
  import {wrapDisplayName} from './displayName'
3
4
  import {useAsObservable} from './useAsObservable'
@@ -26,6 +27,7 @@ function fromComponent<Props>(component: Component<Props>): FunctionComponent<Pr
26
27
  return wrappedComponent
27
28
  }
28
29
 
30
+ // eslint-disable-next-line @typescript-eslint/ban-types
29
31
  function fromObservable<Props>(input$: Observable<ReactNode>): FunctionComponent<{}> {
30
32
  return function ReactiveComponent() {
31
33
  return createElement(Fragment, null, useObservable<ReactNode>(input$))
@@ -47,6 +49,7 @@ type ForwardRefComponent<RefType, Props> = (
47
49
  ref: Ref<RefType>,
48
50
  ) => Observable<ReactNode>
49
51
 
52
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/ban-types
50
53
  export function forwardRef<RefType, Props = {}>(component: ForwardRefComponent<RefType, Props>) {
51
54
  const wrappedComponent = reactForwardRef((props: Props, ref: Ref<RefType>) => {
52
55
  return createElement(
@@ -1,3 +1,4 @@
1
+ /* eslint-disable react-hooks/rules-of-hooks */
1
2
  import {Observable} from 'rxjs'
2
3
  import {useObservable} from './useObservable'
3
4
  import {useAsObservable} from './useAsObservable'
package/src/utils.ts CHANGED
@@ -12,7 +12,9 @@ export function observeState<T>(
12
12
  export function observeState<T>(
13
13
  initial?: T | (() => T),
14
14
  ): [Observable<T | undefined>, Dispatch<SetStateAction<T | undefined>>] {
15
+ // eslint-disable-next-line react-hooks/rules-of-hooks
15
16
  const [value, update] = useState<T | undefined>(initial)
17
+ // eslint-disable-next-line react-hooks/rules-of-hooks
16
18
  return [useAsObservable(value), update]
17
19
  }
18
20
 
@@ -23,6 +25,7 @@ export function observeCallback<T, K>(
23
25
  export function observeCallback<T, K>(
24
26
  operator?: OperatorFunction<T, K>,
25
27
  ): [Observable<T | K>, (arg: T) => void] {
28
+ // eslint-disable-next-line react-hooks/rules-of-hooks
26
29
  const ref = useRef<[Observable<T | K>, (arg: T) => void]>()
27
30
  if (!ref.current) {
28
31
  ref.current = operator ? observableCallback<T, K>(operator) : observableCallback<T>()
@@ -31,10 +34,12 @@ export function observeCallback<T, K>(
31
34
  }
32
35
 
33
36
  export function observeContext<T>(context: Context<T>): Observable<T> {
37
+ // eslint-disable-next-line react-hooks/rules-of-hooks
34
38
  return useAsObservable(useContext<T>(context))
35
39
  }
36
40
 
37
41
  export function observeElement<T>(): [Observable<T | null>, (el: T | null) => void] {
42
+ // eslint-disable-next-line react-hooks/rules-of-hooks
38
43
  const ref = useRef<[Observable<T | null>, (value: T | null) => void]>()
39
44
  if (!ref.current) {
40
45
  ref.current = createState<T | null>(null)
package/.eslintrc.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "env": {
3
- "node": true,
4
- "browser": true
5
- },
6
- "parser": "@typescript-eslint/parser",
7
- "extends": ["plugin:@typescript-eslint/recommended", "prettier"],
8
- "rules": {
9
- "prettier/prettier": "error",
10
- "@typescript-eslint/explicit-function-return-type": "off"
11
- },
12
- "plugins": ["@typescript-eslint", "prettier", "react"]
13
- }
@@ -1,113 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <option name="OTHER_INDENT_OPTIONS">
4
- <value>
5
- <option name="INDENT_SIZE" value="2" />
6
- <option name="TAB_SIZE" value="2" />
7
- </value>
8
- </option>
9
- <HTMLCodeStyleSettings>
10
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
11
- <option name="HTML_ENFORCE_QUOTES" value="true" />
12
- </HTMLCodeStyleSettings>
13
- <JSCodeStyleSettings version="0">
14
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
15
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
16
- <option name="FORCE_QUOTE_STYlE" value="true" />
17
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
18
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
19
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
20
- </JSCodeStyleSettings>
21
- <MarkdownNavigatorCodeStyleSettings>
22
- <option name="RIGHT_MARGIN" value="72" />
23
- </MarkdownNavigatorCodeStyleSettings>
24
- <TypeScriptCodeStyleSettings version="0">
25
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
26
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
27
- <option name="FORCE_QUOTE_STYlE" value="true" />
28
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
29
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
30
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
31
- </TypeScriptCodeStyleSettings>
32
- <VueCodeStyleSettings>
33
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
34
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
35
- </VueCodeStyleSettings>
36
- <XML>
37
- <option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
38
- <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
39
- </XML>
40
- <codeStyleSettings language="CSS">
41
- <indentOptions>
42
- <option name="INDENT_SIZE" value="2" />
43
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
44
- <option name="TAB_SIZE" value="2" />
45
- </indentOptions>
46
- </codeStyleSettings>
47
- <codeStyleSettings language="HTML">
48
- <option name="SOFT_MARGINS" value="80" />
49
- <indentOptions>
50
- <option name="INDENT_SIZE" value="2" />
51
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
52
- <option name="TAB_SIZE" value="2" />
53
- </indentOptions>
54
- </codeStyleSettings>
55
- <codeStyleSettings language="JSON">
56
- <indentOptions>
57
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
58
- <option name="TAB_SIZE" value="2" />
59
- </indentOptions>
60
- </codeStyleSettings>
61
- <codeStyleSettings language="Jade">
62
- <indentOptions>
63
- <option name="INDENT_SIZE" value="2" />
64
- <option name="TAB_SIZE" value="2" />
65
- </indentOptions>
66
- </codeStyleSettings>
67
- <codeStyleSettings language="JavaScript">
68
- <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
69
- <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
70
- <option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
71
- <option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
72
- <option name="SOFT_MARGINS" value="80" />
73
- <indentOptions>
74
- <option name="INDENT_SIZE" value="2" />
75
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
76
- <option name="TAB_SIZE" value="2" />
77
- </indentOptions>
78
- </codeStyleSettings>
79
- <codeStyleSettings language="LESS">
80
- <indentOptions>
81
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
82
- <option name="TAB_SIZE" value="2" />
83
- </indentOptions>
84
- </codeStyleSettings>
85
- <codeStyleSettings language="SASS">
86
- <indentOptions>
87
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
88
- <option name="TAB_SIZE" value="2" />
89
- </indentOptions>
90
- </codeStyleSettings>
91
- <codeStyleSettings language="SCSS">
92
- <indentOptions>
93
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
94
- <option name="TAB_SIZE" value="2" />
95
- </indentOptions>
96
- </codeStyleSettings>
97
- <codeStyleSettings language="TypeScript">
98
- <option name="SOFT_MARGINS" value="80" />
99
- <indentOptions>
100
- <option name="INDENT_SIZE" value="2" />
101
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
102
- <option name="TAB_SIZE" value="2" />
103
- </indentOptions>
104
- </codeStyleSettings>
105
- <codeStyleSettings language="XML">
106
- <indentOptions>
107
- <option name="INDENT_SIZE" value="2" />
108
- <option name="CONTINUATION_INDENT_SIZE" value="4" />
109
- <option name="TAB_SIZE" value="2" />
110
- </indentOptions>
111
- </codeStyleSettings>
112
- </code_scheme>
113
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="TypeScriptCompiler">
4
- <option name="nodeInterpreterTextField" value="node" />
5
- </component>
6
- </project>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding" addBOMForNewFiles="with NO BOM" />
4
- </project>
@@ -1,7 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- <inspection_tool class="TypescriptExplicitMemberType" enabled="false" level="INFORMATION" enabled_by_default="false" />
6
- </profile>
7
- </component>
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JsonSchemaMappingsProjectConfiguration">
4
- <state>
5
- <map>
6
- <entry key="package">
7
- <value>
8
- <SchemaInfo>
9
- <option name="name" value="package" />
10
- <option name="relativePathToSchema" value="http://json.schemastore.org/package" />
11
- <option name="applicationDefined" value="true" />
12
- <option name="patterns">
13
- <list>
14
- <Item>
15
- <option name="path" value="package.json" />
16
- </Item>
17
- </list>
18
- </option>
19
- </SchemaInfo>
20
- </value>
21
- </entry>
22
- </map>
23
- </state>
24
- </component>
25
- </project>
@@ -1,29 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="MarkdownEnhProjectSettings">
4
- <AnnotatorSettings targetHasSpaces="true" linkCaseMismatch="true" wikiCaseMismatch="true" wikiLinkHasDashes="true" notUnderWikiHome="true" targetNotWikiPageExt="true" notUnderSourceWikiHome="true" targetNameHasAnchor="true" targetPathHasAnchor="true" wikiLinkHasSlash="true" wikiLinkHasSubdir="true" wikiLinkHasOnlyAnchor="true" linkTargetsWikiHasExt="true" linkTargetsWikiHasBadExt="true" notUnderSameRepo="true" targetNotUnderVcs="false" linkNeedsExt="true" linkHasBadExt="true" linkTargetNeedsExt="true" linkTargetHasBadExt="true" wikiLinkNotInWiki="true" imageTargetNotInRaw="true" repoRelativeAcrossVcsRoots="true" multipleWikiTargetsMatch="true" unresolvedLinkReference="true" linkIsIgnored="true" anchorIsIgnored="true" anchorIsUnresolved="true" anchorLineReferenceIsUnresolved="true" anchorLineReferenceFormat="true" anchorHasDuplicates="true" abbreviationDuplicates="true" abbreviationNotUsed="true" attributeIdDuplicateDefinition="true" attributeIdNotUsed="true" footnoteDuplicateDefinition="true" footnoteUnresolved="true" footnoteDuplicates="true" footnoteNotUsed="true" macroDuplicateDefinition="true" macroUnresolved="true" macroDuplicates="true" macroNotUsed="true" referenceDuplicateDefinition="true" referenceUnresolved="true" referenceDuplicates="true" referenceNotUsed="true" referenceUnresolvedNumericId="true" enumRefDuplicateDefinition="true" enumRefUnresolved="true" enumRefDuplicates="true" enumRefNotUsed="true" enumRefLinkUnresolved="true" enumRefLinkDuplicates="true" simTocUpdateNeeded="true" simTocTitleSpaceNeeded="true" />
5
- <HtmlExportSettings updateOnSave="false" parentDir="" targetDir="" cssDir="css" scriptDir="js" plainHtml="false" imageDir="" copyLinkedImages="false" imagePathType="0" targetPathType="2" targetExt="" useTargetExt="false" noCssNoScripts="false" useElementStyleAttribute="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" linkFormatType="HTTP_ABSOLUTE" />
6
- <LinkMapSettings>
7
- <textMaps />
8
- </LinkMapSettings>
9
- </component>
10
- <component name="MarkdownNavigatorHistory">
11
- <PasteImageHistory checkeredTransparentBackground="false" filename="image" directory="" onPasteImageTargetRef="3" onPasteLinkText="0" onPasteImageElement="1" onPasteLinkElement="1" onPasteReferenceElement="2" cornerRadius="20" borderColor="0" transparentColor="16777215" borderWidth="1" trimTop="0" trimBottom="0" trimLeft="0" trimRight="0" transparent="false" roundCorners="false" showPreview="true" bordered="false" scaled="false" cropped="false" hideInapplicableOperations="false" preserveLinkFormat="false" scale="50" scalingInterpolation="1" transparentTolerance="0" saveAsDefaultOnOK="false" linkFormat="0" addHighlights="false" showHighlightCoordinates="true" showHighlights="false" mouseSelectionAddsHighlight="false" outerFilled="false" outerFillColor="0" outerFillTransparent="true" outerFillAlpha="30">
12
- <highlightList />
13
- <directories />
14
- <filenames />
15
- </PasteImageHistory>
16
- <CopyImageHistory checkeredTransparentBackground="false" filename="image" directory="" onPasteImageTargetRef="3" onPasteLinkText="0" onPasteImageElement="1" onPasteLinkElement="1" onPasteReferenceElement="2" cornerRadius="20" borderColor="0" transparentColor="16777215" borderWidth="1" trimTop="0" trimBottom="0" trimLeft="0" trimRight="0" transparent="false" roundCorners="false" showPreview="true" bordered="false" scaled="false" cropped="false" hideInapplicableOperations="false" preserveLinkFormat="false" scale="50" scalingInterpolation="1" transparentTolerance="0" saveAsDefaultOnOK="false" linkFormat="0" addHighlights="false" showHighlightCoordinates="true" showHighlights="false" mouseSelectionAddsHighlight="false" outerFilled="false" outerFillColor="0" outerFillTransparent="true" outerFillAlpha="30">
17
- <highlightList />
18
- <directories />
19
- <filenames />
20
- </CopyImageHistory>
21
- <PasteLinkHistory onPasteImageTargetRef="3" onPasteTargetRef="1" onPasteLinkText="0" onPasteImageElement="1" onPasteLinkElement="1" onPasteWikiElement="2" onPasteReferenceElement="2" hideInapplicableOperations="false" preserveLinkFormat="false" useHeadingForLinkText="false" linkFormat="0" saveAsDefaultOnOK="false" />
22
- <TableToJsonHistory>
23
- <entries />
24
- </TableToJsonHistory>
25
- <TableSortHistory>
26
- <entries />
27
- </TableSortHistory>
28
- </component>
29
- </project>
@@ -1,55 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="FlexmarkProjectSettings">
4
- <FlexmarkHtmlSettings flexmarkSpecExampleRendering="0" flexmarkSpecExampleRenderHtml="false">
5
- <flexmarkSectionLanguages>
6
- <option name="1" value="Markdown" />
7
- <option name="2" value="HTML" />
8
- <option name="3" value="flexmark-ast:1" />
9
- </flexmarkSectionLanguages>
10
- </FlexmarkHtmlSettings>
11
- </component>
12
- <component name="MarkdownProjectSettings">
13
- <PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" synchronizePreviewPosition="true" highlightPreviewType="LINE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="true" showSelectionInPreview="true" lastLayoutSetsDefault="false">
14
- <PanelProvider>
15
- <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
16
- </PanelProvider>
17
- </PreviewSettings>
18
- <ParserSettings gitHubSyntaxChange="false" correctedInvalidSettings="false" emojiShortcuts="1" emojiImages="0">
19
- <PegdownExtensions>
20
- <option name="ANCHORLINKS" value="true" />
21
- <option name="ATXHEADERSPACE" value="true" />
22
- <option name="FENCED_CODE_BLOCKS" value="true" />
23
- <option name="INTELLIJ_DUMMY_IDENTIFIER" value="true" />
24
- <option name="RELAXEDHRULES" value="true" />
25
- <option name="STRIKETHROUGH" value="true" />
26
- <option name="TABLES" value="true" />
27
- <option name="TASKLISTITEMS" value="true" />
28
- </PegdownExtensions>
29
- <ParserOptions>
30
- <option name="COMMONMARK_LISTS" value="true" />
31
- <option name="EMOJI_SHORTCUTS" value="true" />
32
- <option name="GFM_TABLE_RENDERING" value="true" />
33
- <option name="PRODUCTION_SPEC_PARSER" value="true" />
34
- <option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
35
- </ParserOptions>
36
- </ParserSettings>
37
- <HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" addPageHeader="false" imageUriSerials="false" addDocTypeHtml="true" noParaTags="false" plantUmlConversion="0">
38
- <GeneratorProvider>
39
- <provider providerId="com.vladsch.idea.multimarkdown.editor.text.html.generator" providerName="Unmodified HTML Generator" />
40
- </GeneratorProvider>
41
- <headerTop />
42
- <headerBottom />
43
- <bodyTop />
44
- <bodyBottom />
45
- </HtmlSettings>
46
- <CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssUriSerial="true" isCssTextEnabled="false" isDynamicPageWidth="true">
47
- <StylesheetProvider>
48
- <provider providerId="com.vladsch.idea.multimarkdown.editor.text.html.css" providerName="No Stylesheet" />
49
- </StylesheetProvider>
50
- <ScriptProviders />
51
- <cssText />
52
- <cssUriHistory />
53
- </CssSettings>
54
- </component>
55
- </project>