@atlaskit/editor-plugin-ufo 1.0.2 → 1.0.4
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.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/pm-plugins/disableTTVCOnFirstUserInteraction.js +2 -0
- package/dist/cjs/ufoPlugin.js +1 -2
- package/dist/es2019/pm-plugins/disableTTVCOnFirstUserInteraction.js +4 -1
- package/dist/es2019/ufoPlugin.js +1 -2
- package/dist/esm/pm-plugins/disableTTVCOnFirstUserInteraction.js +3 -0
- package/dist/esm/ufoPlugin.js +1 -2
- package/dist/types/ufoPluginType.d.ts +1 -1
- package/dist/types-ts4.5/ufoPluginType.d.ts +1 -1
- package/package.json +3 -3
- package/src/pm-plugins/disableTTVCOnFirstUserInteraction.ts +3 -1
- package/src/ufoPlugin.tsx +1 -1
- package/src/ufoPluginType.ts +1 -1
- package/tsconfig.app.json +0 -1
- package/tsconfig.dev.json +0 -1
- package/tsconfig.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-ufo
|
|
2
2
|
|
|
3
|
+
## 1.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#101320](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101320)
|
|
8
|
+
[`ad1da3dec7ebe`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ad1da3dec7ebe) -
|
|
9
|
+
[ED-25272] Replace optional chain when checking the SSR variable
|
|
10
|
+
|
|
11
|
+
## 1.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 1.0.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -8,6 +8,8 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
8
8
|
var _vc = require("@atlaskit/react-ufo/vc");
|
|
9
9
|
/* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
10
10
|
|
|
11
|
+
// Ignored via go/ees005
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
11
13
|
function bind(target, event, controller, listener) {
|
|
12
14
|
// Safe check for rare cases where window doesn't exist
|
|
13
15
|
if (!target || typeof target.addEventListener !== 'function') {
|
package/dist/cjs/ufoPlugin.js
CHANGED
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ufoPlugin = void 0;
|
|
7
7
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
8
|
var _disableTTVCOnFirstUserInteraction = require("./pm-plugins/disableTTVCOnFirstUserInteraction");
|
|
9
|
-
var
|
|
10
|
-
var isSSR = Boolean((_process = process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.REACT_SSR);
|
|
9
|
+
var isSSR = Boolean(process.env.REACT_SSR);
|
|
11
10
|
var ufoPlugin = exports.ufoPlugin = function ufoPlugin() {
|
|
12
11
|
return {
|
|
13
12
|
name: 'ufo',
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { getVCObserver } from '@atlaskit/react-ufo/vc';
|
|
4
|
+
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
4
7
|
function bind(target, event, controller, listener) {
|
|
5
8
|
// Safe check for rare cases where window doesn't exist
|
|
6
9
|
if (!target || typeof target.addEventListener !== 'function') {
|
|
@@ -56,7 +59,7 @@ export const disableTTVCOnFirstUserInteraction = () => {
|
|
|
56
59
|
const {
|
|
57
60
|
dom
|
|
58
61
|
} = view;
|
|
59
|
-
for (
|
|
62
|
+
for (const abortEventName of AbortEvent) {
|
|
60
63
|
unbindCallbacks.add(bind(dom, abortEventName, controller, () => {
|
|
61
64
|
ttvcAbort();
|
|
62
65
|
unbindFirstInteractionEvents();
|
package/dist/es2019/ufoPlugin.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
var _process, _process$env;
|
|
2
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { disableTTVCOnFirstUserInteraction } from './pm-plugins/disableTTVCOnFirstUserInteraction';
|
|
4
|
-
const isSSR = Boolean(
|
|
3
|
+
const isSSR = Boolean(process.env.REACT_SSR);
|
|
5
4
|
export const ufoPlugin = () => ({
|
|
6
5
|
name: 'ufo',
|
|
7
6
|
pmPlugins() {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { getVCObserver } from '@atlaskit/react-ufo/vc';
|
|
4
|
+
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
4
7
|
function bind(target, event, controller, listener) {
|
|
5
8
|
// Safe check for rare cases where window doesn't exist
|
|
6
9
|
if (!target || typeof target.addEventListener !== 'function') {
|
package/dist/esm/ufoPlugin.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
var _process;
|
|
2
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { disableTTVCOnFirstUserInteraction } from './pm-plugins/disableTTVCOnFirstUserInteraction';
|
|
4
|
-
var isSSR = Boolean(
|
|
3
|
+
var isSSR = Boolean(process.env.REACT_SSR);
|
|
5
4
|
export var ufoPlugin = function ufoPlugin() {
|
|
6
5
|
return {
|
|
7
6
|
name: 'ufo',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
export type UfoPlugin = NextEditorPlugin<'ufo',
|
|
2
|
+
export type UfoPlugin = NextEditorPlugin<'ufo', Object>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
export type UfoPlugin = NextEditorPlugin<'ufo',
|
|
2
|
+
export type UfoPlugin = NextEditorPlugin<'ufo', Object>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-ufo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Ufo plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/editor-common": "^
|
|
35
|
+
"@atlaskit/editor-common": "^98.2.0",
|
|
36
36
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
38
|
-
"@atlaskit/react-ufo": "^2.
|
|
38
|
+
"@atlaskit/react-ufo": "^2.8.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { getVCObserver } from '@atlaskit/react-ufo/vc';
|
|
4
4
|
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
5
7
|
function bind(
|
|
6
8
|
target: HTMLElement,
|
|
7
9
|
event: FirstUserInteractionEvents,
|
|
@@ -93,7 +95,7 @@ export const disableTTVCOnFirstUserInteraction = () => {
|
|
|
93
95
|
|
|
94
96
|
const { dom } = view;
|
|
95
97
|
|
|
96
|
-
for (
|
|
98
|
+
for (const abortEventName of AbortEvent) {
|
|
97
99
|
unbindCallbacks.add(
|
|
98
100
|
bind(dom, abortEventName, controller, () => {
|
|
99
101
|
ttvcAbort();
|
package/src/ufoPlugin.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
3
3
|
import { disableTTVCOnFirstUserInteraction } from './pm-plugins/disableTTVCOnFirstUserInteraction';
|
|
4
4
|
import type { UfoPlugin } from './ufoPluginType';
|
|
5
5
|
|
|
6
|
-
const isSSR = Boolean(process
|
|
6
|
+
const isSSR = Boolean(process.env.REACT_SSR);
|
|
7
7
|
|
|
8
8
|
export const ufoPlugin: UfoPlugin = () => ({
|
|
9
9
|
name: 'ufo',
|
package/src/ufoPluginType.ts
CHANGED
package/tsconfig.app.json
CHANGED
package/tsconfig.dev.json
CHANGED