@atlaskit/editor-common 131.5.0 → 132.0.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.
- package/CHANGELOG.md +85 -0
- package/ai-xstate-migration/package.json +10 -0
- package/ai-xstate-migration-no-exposure/package.json +10 -0
- package/dist/cjs/ai-messages/ai.js +5 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/analytics/types/numbered-headings-events.js +5 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +5 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +5 -1
- package/dist/cjs/extensibility/utils/should-extension-breakout.js +8 -1
- package/dist/cjs/messages/block-type.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/numbered-headings/index.js +38 -0
- package/dist/cjs/preset/core-plugin/requestDocument.js +6 -0
- package/dist/cjs/styles/shared/emoji.js +1 -3
- package/dist/cjs/toolbar/keys.js +10 -2
- package/dist/cjs/toolbar/rank.js +4 -3
- package/dist/cjs/ui/DropList/index.js +3 -17
- package/dist/cjs/ui/Emoji/index.js +1 -2
- package/dist/cjs/utils/ai-xstate-migration-no-exposure.js +18 -0
- package/dist/cjs/utils/ai-xstate-migration.js +30 -0
- package/dist/es2019/ai-messages/ai.js +5 -0
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/analytics/types/numbered-headings-events.js +1 -0
- package/dist/es2019/extensibility/Extension/Extension/index.js +3 -2
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +3 -1
- package/dist/es2019/extensibility/utils/should-extension-breakout.js +7 -1
- package/dist/es2019/messages/block-type.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/numbered-headings/index.js +32 -0
- package/dist/es2019/preset/core-plugin/requestDocument.js +6 -0
- package/dist/es2019/styles/shared/emoji.js +1 -3
- package/dist/es2019/toolbar/keys.js +8 -0
- package/dist/es2019/toolbar/rank.js +7 -2
- package/dist/es2019/ui/DropList/index.js +4 -18
- package/dist/es2019/ui/Emoji/index.js +1 -2
- package/dist/es2019/utils/ai-xstate-migration-no-exposure.js +11 -0
- package/dist/es2019/utils/ai-xstate-migration.js +23 -0
- package/dist/esm/ai-messages/ai.js +5 -0
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/analytics/types/numbered-headings-events.js +1 -0
- package/dist/esm/extensibility/Extension/Extension/index.js +5 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +5 -1
- package/dist/esm/extensibility/utils/should-extension-breakout.js +8 -1
- package/dist/esm/messages/block-type.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/numbered-headings/index.js +32 -0
- package/dist/esm/preset/core-plugin/requestDocument.js +6 -0
- package/dist/esm/styles/shared/emoji.js +1 -3
- package/dist/esm/toolbar/keys.js +8 -0
- package/dist/esm/toolbar/rank.js +4 -3
- package/dist/esm/ui/DropList/index.js +4 -18
- package/dist/esm/ui/Emoji/index.js +1 -2
- package/dist/esm/utils/ai-xstate-migration-no-exposure.js +13 -0
- package/dist/esm/utils/ai-xstate-migration.js +25 -0
- package/dist/types/ai-messages/ai.d.ts +5 -0
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/analytics/types/numbered-headings-events.d.ts +8 -0
- package/dist/types/extensibility/utils/should-extension-breakout.d.ts +2 -1
- package/dist/types/messages/block-type.d.ts +5 -0
- package/dist/types/numbered-headings/index.d.ts +14 -0
- package/dist/types/styles/shared/emoji.d.ts +0 -1
- package/dist/types/toolbar/keys.d.ts +8 -0
- package/dist/types/toolbar/rank.d.ts +5 -0
- package/dist/types/utils/ai-xstate-migration-no-exposure.d.ts +8 -0
- package/dist/types/utils/ai-xstate-migration.d.ts +20 -0
- package/numbered-headings/package.json +10 -0
- package/package.json +8 -7
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { EditorAppearance } from '../../types';
|
|
2
2
|
interface ShouldExtensionBreakoutArgs {
|
|
3
3
|
editorAppearance?: EditorAppearance;
|
|
4
|
+
hasBreakoutMark?: boolean;
|
|
4
5
|
isTopLevelNode?: boolean;
|
|
5
6
|
layout?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const shouldExtensionBreakout: ({ layout, isTopLevelNode, editorAppearance, }: ShouldExtensionBreakoutArgs) => boolean;
|
|
8
|
+
export declare const shouldExtensionBreakout: ({ layout, isTopLevelNode, editorAppearance, hasBreakoutMark, }: ShouldExtensionBreakoutArgs) => boolean;
|
|
8
9
|
export {};
|
|
@@ -129,6 +129,11 @@ export declare const messages: {
|
|
|
129
129
|
description: string;
|
|
130
130
|
id: string;
|
|
131
131
|
};
|
|
132
|
+
numberedHeadings: {
|
|
133
|
+
defaultMessage: string;
|
|
134
|
+
description: string;
|
|
135
|
+
id: string;
|
|
136
|
+
};
|
|
132
137
|
other: {
|
|
133
138
|
defaultMessage: string;
|
|
134
139
|
description: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOM attribute carrying a heading's computed number. Editor and renderer styles render it with
|
|
3
|
+
* `[data-heading-number]::before { content: attr(data-heading-number) "." }`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const HEADING_NUMBER_ATTRIBUTE = "data-heading-number";
|
|
6
|
+
/**
|
|
7
|
+
* Computes decimal outline numbers (`1`, `1.1`, `1.1.1`) for headings in document order.
|
|
8
|
+
*
|
|
9
|
+
* Each number has exactly `level` segments. Skipped levels are backfilled with `1` and count as
|
|
10
|
+
* real siblings, and a higher-level heading resets all deeper counters.
|
|
11
|
+
*
|
|
12
|
+
* @example getHeadingNumbers([1, 3, 2]) // ['1', '1.1.1', '1.2']
|
|
13
|
+
*/
|
|
14
|
+
export declare const getHeadingNumbers: (levels: readonly number[]) => string[];
|
|
@@ -191,6 +191,14 @@ export declare const TEXT_STYLES_MENU_SECTION: {
|
|
|
191
191
|
readonly key: 'text-styles-menu-section';
|
|
192
192
|
readonly type: 'menu-section';
|
|
193
193
|
};
|
|
194
|
+
export declare const NUMBERED_HEADINGS_MENU_SECTION: {
|
|
195
|
+
readonly key: 'numbered-headings-menu-section';
|
|
196
|
+
readonly type: 'menu-section';
|
|
197
|
+
};
|
|
198
|
+
export declare const NUMBERED_HEADINGS_MENU_ITEM: {
|
|
199
|
+
readonly key: 'numbered-headings-menu-item';
|
|
200
|
+
readonly type: 'menu-item';
|
|
201
|
+
};
|
|
194
202
|
export declare const NORMAL_TEXT_MENU_ITEM: {
|
|
195
203
|
readonly key: 'normal-text-menu-item';
|
|
196
204
|
readonly type: 'menu-item';
|
|
@@ -104,6 +104,7 @@ export declare const TEXT_COLLAPSED_MENU_RANK: {
|
|
|
104
104
|
'alignment-menu-section': number;
|
|
105
105
|
'clear-formatting-menu-section': number;
|
|
106
106
|
'lists-indendation-menu-section': number;
|
|
107
|
+
'numbered-headings-menu-section': number;
|
|
107
108
|
'text-color-highlight-menu-section': number;
|
|
108
109
|
'text-formatting-menu-section': number;
|
|
109
110
|
'text-styles-menu-section': number;
|
|
@@ -115,8 +116,12 @@ export declare const TEXT_STYLES_GROUP_RANK: {
|
|
|
115
116
|
'text-styles-menu': number;
|
|
116
117
|
};
|
|
117
118
|
export declare const TEXT_STYLES_MENU_RANK: {
|
|
119
|
+
'numbered-headings-menu-section': number;
|
|
118
120
|
'text-styles-menu-section': number;
|
|
119
121
|
};
|
|
122
|
+
export declare const NUMBERED_HEADINGS_MENU_SECTION_RANK: {
|
|
123
|
+
'numbered-headings-menu-item': number;
|
|
124
|
+
};
|
|
120
125
|
export declare const TEXT_STYLES_MENU_SECTION_RANK: Record<string, number>;
|
|
121
126
|
/**
|
|
122
127
|
* Text formatting group
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Same as `isAiXstateMigrationEnabled` from `@atlaskit/editor-common/ai-xstate-migration`
|
|
3
|
+
* (Confluence `platform_editor_ai_xstate_migration` OR Jira
|
|
4
|
+
* `platform_editor_ai_xstate_migration_jira`), but never fires exposure.
|
|
5
|
+
*
|
|
6
|
+
* Cleanup: only remove once BOTH experiments have shipped.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isAiXstateMigrationEnabledNoExposure: () => boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the editor AI xstate migration is enabled for the current product.
|
|
3
|
+
*
|
|
4
|
+
* The migration is rolled out via two product-specific experiments:
|
|
5
|
+
* - `platform_editor_ai_xstate_migration` (Confluence), a legacy editor experiment
|
|
6
|
+
* read via `@atlaskit/tmp-editor-statsig`
|
|
7
|
+
* - `platform_editor_ai_xstate_migration_jira` (Jira), a platform feature experiment
|
|
8
|
+
* read via `@atlaskit/platform-feature-experiments`
|
|
9
|
+
*
|
|
10
|
+
* Use this helper instead of checking either experiment directly so every call site
|
|
11
|
+
* stays consistent across products. Use `isAiXstateMigrationEnabledNoExposure` from
|
|
12
|
+
* `@atlaskit/editor-common/ai-xstate-migration-no-exposure` when exposure must not fire.
|
|
13
|
+
*
|
|
14
|
+
* Cleanup: only remove this helper (and replace its call sites with `true`) once
|
|
15
|
+
* BOTH experiments have shipped. Cleaning up the Confluence experiment alone by
|
|
16
|
+
* replacing it with `true` would also force the migration on for Jira.
|
|
17
|
+
*
|
|
18
|
+
* Note: This method fires exposure for the evaluated experiment(s).
|
|
19
|
+
*/
|
|
20
|
+
export declare const isAiXstateMigrationEnabled: () => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/numbered-headings",
|
|
3
|
+
"main": "../dist/cjs/numbered-headings/index.js",
|
|
4
|
+
"module": "../dist/esm/numbered-headings/index.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/numbered-headings/index.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/numbered-headings/index.d.ts"
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "132.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
46
46
|
"@atlaskit/editor-palette": "^3.5.0",
|
|
47
47
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
48
|
-
"@atlaskit/editor-shared-styles": "^4.
|
|
48
|
+
"@atlaskit/editor-shared-styles": "^4.5.0",
|
|
49
49
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
50
50
|
"@atlaskit/editor-toolbar": "^2.8.0",
|
|
51
51
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
52
52
|
"@atlaskit/editor-ui-control-model": "^2.10.0",
|
|
53
|
-
"@atlaskit/emoji": "^
|
|
53
|
+
"@atlaskit/emoji": "^73.0.0",
|
|
54
54
|
"@atlaskit/feature-gate-js-client": "^7.0.0",
|
|
55
55
|
"@atlaskit/icon": "^38.0.0",
|
|
56
56
|
"@atlaskit/link": "^5.1.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@atlaskit/media-picker": "^73.2.0",
|
|
66
66
|
"@atlaskit/media-ui": "^31.3.0",
|
|
67
67
|
"@atlaskit/media-viewer": "^54.11.0",
|
|
68
|
-
"@atlaskit/mention": "^30.
|
|
68
|
+
"@atlaskit/mention": "^30.3.0",
|
|
69
69
|
"@atlaskit/menu": "^11.0.0",
|
|
70
70
|
"@atlaskit/object": "^2.3.0",
|
|
71
71
|
"@atlaskit/onboarding": "^15.4.0",
|
|
@@ -147,6 +147,10 @@
|
|
|
147
147
|
"sinon": "^2.2.0"
|
|
148
148
|
},
|
|
149
149
|
"platform-feature-flags": {
|
|
150
|
+
"platform_editor_resolve_missing_document_request": {
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"referenceOnly": true
|
|
153
|
+
},
|
|
150
154
|
"cc_maui_annotations_on_extensions": {
|
|
151
155
|
"type": "boolean",
|
|
152
156
|
"referenceOnly": true
|
|
@@ -214,9 +218,6 @@
|
|
|
214
218
|
"platform_editor_legacy_content_macro_visual_update": {
|
|
215
219
|
"type": "boolean"
|
|
216
220
|
},
|
|
217
|
-
"p2m-drop-down-motion": {
|
|
218
|
-
"type": "boolean"
|
|
219
|
-
},
|
|
220
221
|
"platform_editor_content_mode_button_mvp": {
|
|
221
222
|
"type": "boolean"
|
|
222
223
|
},
|