@wordpress/format-library 3.19.0 → 3.20.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 CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.20.0 (2022-11-16)
6
+
5
7
  ## 3.19.0 (2022-11-02)
6
8
 
7
9
  ## 3.18.0 (2022-10-19)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/format-library",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "description": "Format library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -26,17 +26,17 @@
26
26
  "react-native": "src/index",
27
27
  "dependencies": {
28
28
  "@babel/runtime": "^7.16.0",
29
- "@wordpress/a11y": "^3.21.0",
30
- "@wordpress/block-editor": "^10.4.0",
31
- "@wordpress/components": "^22.0.0",
32
- "@wordpress/compose": "^5.19.0",
33
- "@wordpress/data": "^7.5.0",
34
- "@wordpress/element": "^4.19.0",
35
- "@wordpress/html-entities": "^3.21.0",
36
- "@wordpress/i18n": "^4.21.0",
37
- "@wordpress/icons": "^9.12.0",
38
- "@wordpress/rich-text": "^5.19.0",
39
- "@wordpress/url": "^3.22.0"
29
+ "@wordpress/a11y": "^3.22.0",
30
+ "@wordpress/block-editor": "^10.5.0",
31
+ "@wordpress/components": "^22.1.0",
32
+ "@wordpress/compose": "^5.20.0",
33
+ "@wordpress/data": "^7.6.0",
34
+ "@wordpress/element": "^4.20.0",
35
+ "@wordpress/html-entities": "^3.22.0",
36
+ "@wordpress/i18n": "^4.22.0",
37
+ "@wordpress/icons": "^9.13.0",
38
+ "@wordpress/rich-text": "^5.20.0",
39
+ "@wordpress/url": "^3.23.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": "^17.0.0",
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "511f4cc1f0138641bc4394bc1cf36e833109c791"
48
+ "gitHead": "7ac04f446242452d3cb24372f9ca58f0cae97715"
49
49
  }
@@ -48,13 +48,13 @@ describe( 'Android', () => {
48
48
  } }
49
49
  />
50
50
  );
51
- fireEvent.press( screen.getByA11yLabel( 'Link' ) );
51
+ fireEvent.press( screen.getByLabelText( 'Link' ) );
52
52
  fireEvent.press(
53
- screen.getByA11yLabel( 'Link to, Search or type URL' )
53
+ screen.getByLabelText( 'Link to, Search or type URL' )
54
54
  );
55
55
  // Await back button to allow async state updates to complete
56
56
  const backButton = await waitFor( () =>
57
- screen.getByA11yLabel( 'Go back' )
57
+ screen.getByLabelText( 'Go back' )
58
58
  );
59
59
  Keyboard.dismiss.mockClear();
60
60
  fireEvent.press( backButton );
@@ -63,7 +63,7 @@ describe( 'Android', () => {
63
63
  } );
64
64
 
65
65
  it( 'improves apply animation performance by dismissing keyboard beforehand', async () => {
66
- const { getByA11yLabel } = render(
66
+ const { getByLabelText } = render(
67
67
  <LinkEditSlot
68
68
  activeAttributes={ {} }
69
69
  onChange={ () => {} }
@@ -74,10 +74,10 @@ describe( 'Android', () => {
74
74
  } }
75
75
  />
76
76
  );
77
- fireEvent.press( getByA11yLabel( 'Link' ) );
78
- fireEvent.press( getByA11yLabel( 'Link to, Search or type URL' ) );
77
+ fireEvent.press( getByLabelText( 'Link' ) );
78
+ fireEvent.press( getByLabelText( 'Link to, Search or type URL' ) );
79
79
  // Await back button to allow async state updates to complete
80
- const backButton = await waitFor( () => getByA11yLabel( 'Apply' ) );
80
+ const backButton = await waitFor( () => getByLabelText( 'Apply' ) );
81
81
  Keyboard.dismiss.mockClear();
82
82
  fireEvent.press( backButton );
83
83
 
@@ -107,13 +107,13 @@ describe( 'iOS', () => {
107
107
  } }
108
108
  />
109
109
  );
110
- fireEvent.press( screen.getByA11yLabel( 'Link' ) );
110
+ fireEvent.press( screen.getByLabelText( 'Link' ) );
111
111
  fireEvent.press(
112
- screen.getByA11yLabel( 'Link to, Search or type URL' )
112
+ screen.getByLabelText( 'Link to, Search or type URL' )
113
113
  );
114
114
  // Await back button to allow async state updates to complete
115
115
  const backButton = await waitFor( () =>
116
- screen.getByA11yLabel( 'Go back' )
116
+ screen.getByLabelText( 'Go back' )
117
117
  );
118
118
  Keyboard.dismiss.mockClear();
119
119
  fireEvent.press( backButton );
@@ -122,7 +122,7 @@ describe( 'iOS', () => {
122
122
  } );
123
123
 
124
124
  it( 'improves apply animation performance by dismissing keyboard beforehand', async () => {
125
- const { getByA11yLabel } = render(
125
+ const { getByLabelText } = render(
126
126
  <LinkEditSlot
127
127
  activeAttributes={ {} }
128
128
  onChange={ () => {} }
@@ -133,10 +133,10 @@ describe( 'iOS', () => {
133
133
  } }
134
134
  />
135
135
  );
136
- fireEvent.press( getByA11yLabel( 'Link' ) );
137
- fireEvent.press( getByA11yLabel( 'Link to, Search or type URL' ) );
136
+ fireEvent.press( getByLabelText( 'Link' ) );
137
+ fireEvent.press( getByLabelText( 'Link to, Search or type URL' ) );
138
138
  // Await back button to allow async state updates to complete
139
- const backButton = await waitFor( () => getByA11yLabel( 'Apply' ) );
139
+ const backButton = await waitFor( () => getByLabelText( 'Apply' ) );
140
140
  Keyboard.dismiss.mockClear();
141
141
  fireEvent.press( backButton );
142
142
 
@@ -32,48 +32,48 @@ afterAll( () => {
32
32
 
33
33
  describe( 'Text color', () => {
34
34
  it( 'shows the text color formatting button in the toolbar', async () => {
35
- const { getByA11yLabel } = await initializeEditor();
35
+ const { getByLabelText } = await initializeEditor();
36
36
 
37
37
  // Wait for the editor placeholder
38
38
  const paragraphPlaceholder = await waitFor( () =>
39
- getByA11yLabel( 'Add paragraph block' )
39
+ getByLabelText( 'Add paragraph block' )
40
40
  );
41
41
  expect( paragraphPlaceholder ).toBeDefined();
42
42
  fireEvent.press( paragraphPlaceholder );
43
43
 
44
44
  // Wait for the block to be created
45
45
  const paragraphBlock = await waitFor( () =>
46
- getByA11yLabel( /Paragraph Block\. Row 1/ )
46
+ getByLabelText( /Paragraph Block\. Row 1/ )
47
47
  );
48
48
  expect( paragraphBlock ).toBeDefined();
49
49
 
50
50
  // Look for the highlight text color button
51
51
  const textColorButton = await waitFor( () =>
52
- getByA11yLabel( 'Text color' )
52
+ getByLabelText( 'Text color' )
53
53
  );
54
54
  expect( textColorButton ).toBeDefined();
55
55
  } );
56
56
 
57
57
  it( 'allows toggling the highlight color feature to type new text', async () => {
58
- const { getByA11yLabel, getByTestId, getByA11yHint } =
58
+ const { getByLabelText, getByTestId, getByA11yHint } =
59
59
  await initializeEditor();
60
60
 
61
61
  // Wait for the editor placeholder
62
62
  const paragraphPlaceholder = await waitFor( () =>
63
- getByA11yLabel( 'Add paragraph block' )
63
+ getByLabelText( 'Add paragraph block' )
64
64
  );
65
65
  expect( paragraphPlaceholder ).toBeDefined();
66
66
  fireEvent.press( paragraphPlaceholder );
67
67
 
68
68
  // Wait for the block to be created
69
69
  const paragraphBlock = await waitFor( () =>
70
- getByA11yLabel( /Paragraph Block\. Row 1/ )
70
+ getByLabelText( /Paragraph Block\. Row 1/ )
71
71
  );
72
72
  expect( paragraphBlock ).toBeDefined();
73
73
 
74
74
  // Look for the highlight text color button
75
75
  const textColorButton = await waitFor( () =>
76
- getByA11yLabel( 'Text color' )
76
+ getByLabelText( 'Text color' )
77
77
  );
78
78
  expect( textColorButton ).toBeDefined();
79
79
  fireEvent.press( textColorButton );
@@ -94,7 +94,7 @@ describe( 'Text color', () => {
94
94
 
95
95
  it( 'allows toggling the highlight color feature to selected text', async () => {
96
96
  const {
97
- getByA11yLabel,
97
+ getByLabelText,
98
98
  getByTestId,
99
99
  getByPlaceholderText,
100
100
  getByA11yHint,
@@ -103,14 +103,14 @@ describe( 'Text color', () => {
103
103
 
104
104
  // Wait for the editor placeholder
105
105
  const paragraphPlaceholder = await waitFor( () =>
106
- getByA11yLabel( 'Add paragraph block' )
106
+ getByLabelText( 'Add paragraph block' )
107
107
  );
108
108
  expect( paragraphPlaceholder ).toBeDefined();
109
109
  fireEvent.press( paragraphPlaceholder );
110
110
 
111
111
  // Wait for the block to be created
112
112
  const paragraphBlock = await waitFor( () =>
113
- getByA11yLabel( /Paragraph Block\. Row 1/ )
113
+ getByLabelText( /Paragraph Block\. Row 1/ )
114
114
  );
115
115
  expect( paragraphBlock ).toBeDefined();
116
116
 
@@ -126,7 +126,7 @@ describe( 'Text color', () => {
126
126
 
127
127
  // Look for the highlight text color button
128
128
  const textColorButton = await waitFor( () =>
129
- getByA11yLabel( 'Text color' )
129
+ getByLabelText( 'Text color' )
130
130
  );
131
131
  expect( textColorButton ).toBeDefined();
132
132
  fireEvent.press( textColorButton );
@@ -146,13 +146,13 @@ describe( 'Text color', () => {
146
146
  } );
147
147
 
148
148
  it( 'creates a paragraph block with the text color format', async () => {
149
- const { getByA11yLabel } = await initializeEditor( {
149
+ const { getByLabelText } = await initializeEditor( {
150
150
  initialHtml: TEXT_WITH_COLOR,
151
151
  } );
152
152
 
153
153
  // Wait for the block to be created
154
154
  const paragraphBlock = await waitFor( () =>
155
- getByA11yLabel( /Paragraph Block\. Row 1/ )
155
+ getByLabelText( /Paragraph Block\. Row 1/ )
156
156
  );
157
157
  expect( paragraphBlock ).toBeDefined();
158
158