paris 0.17.10 → 0.18.1
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 +20 -0
- package/package.json +139 -150
- package/src/helpers/renderEnhancer.tsx +4 -5
- package/src/helpers/useResizeObserver.ts +17 -23
- package/src/pages/_document.tsx +1 -3
- package/src/pages/index.tsx +8 -24
- package/src/stories/Pagination.mdx +1 -1
- package/src/stories/Tokens.mdx +1 -1
- package/src/stories/Welcome.mdx +1 -1
- package/src/stories/accordion/Accordion.stories.ts +1 -1
- package/src/stories/accordion/Accordion.tsx +14 -35
- package/src/stories/accordionselect/AccordionSelect.stories.ts +2 -5
- package/src/stories/accordionselect/AccordionSelect.tsx +26 -50
- package/src/stories/avatar/Avatar.stories.ts +1 -1
- package/src/stories/avatar/Avatar.tsx +14 -13
- package/src/stories/button/Button.stories.ts +18 -15
- package/src/stories/button/Button.tsx +44 -48
- package/src/stories/callout/Callout.stories.ts +3 -7
- package/src/stories/callout/Callout.tsx +4 -8
- package/src/stories/card/Card.stories.ts +1 -1
- package/src/stories/card/Card.tsx +4 -11
- package/src/stories/cardbutton/CardButton.stories.tsx +1 -1
- package/src/stories/cardbutton/CardButton.tsx +16 -18
- package/src/stories/checkbox/Checkbox.stories.ts +1 -1
- package/src/stories/checkbox/Checkbox.tsx +37 -49
- package/src/stories/combobox/Combobox.stories.ts +65 -71
- package/src/stories/combobox/Combobox.tsx +80 -89
- package/src/stories/dialog/Dialog.stories.tsx +2 -2
- package/src/stories/dialog/Dialog.tsx +45 -68
- package/src/stories/drawer/Drawer.stories.tsx +63 -105
- package/src/stories/drawer/Drawer.tsx +93 -90
- package/src/stories/field/Field.stories.ts +1 -1
- package/src/stories/field/Field.tsx +25 -30
- package/src/stories/icon/Ellipsis.tsx +4 -1
- package/src/stories/icon/Icon.stories.ts +2 -2
- package/src/stories/icon/Icon.tsx +16 -26
- package/src/stories/icon/Info.tsx +4 -1
- package/src/stories/icon/Spinner.tsx +4 -2
- package/src/stories/icon/index.ts +6 -6
- package/src/stories/informationaltooltip/InformationalTooltip.stories.tsx +12 -11
- package/src/stories/informationaltooltip/InformationalTooltip.tsx +23 -28
- package/src/stories/input/Input.stories.ts +14 -15
- package/src/stories/input/Input.tsx +119 -95
- package/src/stories/markdown/Markdown.module.scss +384 -0
- package/src/stories/markdown/Markdown.stories.ts +203 -0
- package/src/stories/markdown/Markdown.tsx +293 -0
- package/src/stories/markdown/index.ts +1 -0
- package/src/stories/menu/Menu.stories.tsx +4 -10
- package/src/stories/menu/Menu.tsx +22 -16
- package/src/stories/pagination/usePagination.ts +8 -8
- package/src/stories/popover/Popover.stories.ts +2 -2
- package/src/stories/popover/Popover.tsx +4 -10
- package/src/stories/select/Select.stories.ts +10 -10
- package/src/stories/select/Select.tsx +268 -240
- package/src/stories/styledlink/StyledLink.stories.ts +1 -1
- package/src/stories/styledlink/StyledLink.tsx +11 -17
- package/src/stories/table/Table.stories.ts +1 -1
- package/src/stories/table/Table.tsx +55 -65
- package/src/stories/tabs/Tabs.module.scss +10 -68
- package/src/stories/tabs/Tabs.stories.tsx +83 -4
- package/src/stories/tabs/Tabs.tsx +15 -27
- package/src/stories/tag/Tag.stories.ts +1 -4
- package/src/stories/tag/Tag.tsx +9 -17
- package/src/stories/text/Text.stories.ts +1 -1
- package/src/stories/text/Text.tsx +49 -31
- package/src/stories/text/Typography.module.css +120 -120
- package/src/stories/textarea/TextArea.stories.ts +2 -5
- package/src/stories/textarea/TextArea.tsx +91 -84
- package/src/stories/theme/index.ts +1 -1
- package/src/stories/theme/themes.ts +423 -424
- package/src/stories/theme/tokens.ts +3 -3
- package/src/stories/theme/tw-preflight.css +4 -3
- package/src/stories/tilt/Tilt.stories.tsx +3 -6
- package/src/stories/tilt/Tilt.tsx +160 -126
- package/src/stories/toast/Toast.stories.tsx +2 -2
- package/src/stories/toast/Toast.tsx +3 -6
- package/src/stories/utility/RemoveFromDOM.tsx +9 -13
- package/src/stories/utility/TextWhenString.tsx +3 -16
- package/src/stories/utility/VisuallyHidden.tsx +10 -17
- package/src/styles/Home.module.css +185 -195
- package/src/styles/globals.css +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# paris
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 389b9ba: fix(tabs): fix glass mode backdrop-filter blur and content bleed-through
|
|
8
|
+
|
|
9
|
+
Restructured glass tab bar from `position: absolute` to `position: sticky` with `backdrop-filter` applied directly on the sticky element. This fixes two bugs: content bleeding through the tab bar on scroll, and the blur effect never rendering due to compositing boundary conflicts. Removed the nested glass layer divs (glassContainer, glassOpacity, glassBlend) and padding-top hacks in favor of natural document flow. Uses `primaryThin` material for theme-aware frosted glass (white in light mode, dark in dark mode).
|
|
10
|
+
|
|
11
|
+
- 706e34c: fix(markdown): use contentPrimary instead of contentAccent for checked checkboxes
|
|
12
|
+
|
|
13
|
+
## 0.18.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 0c3b686: Add Markdown component that renders markdown strings using Paris design system components. Supports GFM (tables, task lists, strikethrough, footnotes), HTML passthrough (kbd, mark, details/summary, definition lists), and a configurable `size` prop for base text sizing.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 12fb9a7: Migrate tooling from pnpm/ESLint/Husky to Bun/Biome/Lefthook/Commitlint
|
|
22
|
+
|
|
3
23
|
## 0.17.10
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,152 +1,141 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"build": "pnpm generate:exports && next build",
|
|
142
|
-
"storybook": "storybook dev -p 6006",
|
|
143
|
-
"build:storybook": "storybook build",
|
|
144
|
-
"create:component": "node ./scripts/createComponent.js",
|
|
145
|
-
"generate:exports": "node ./scripts/generateExports.js",
|
|
146
|
-
"generate:theme": "pte export ./src/stories/theme/themes.ts LightTheme -o ./public/pte.css",
|
|
147
|
-
"generate:text": "ts-node --esm ./scripts/text.ts",
|
|
148
|
-
"release": "pnpm generate:exports && pnpm changeset publish",
|
|
149
|
-
"typecheck": "tsc --noEmit",
|
|
150
|
-
"lint": "eslint ."
|
|
151
|
-
}
|
|
2
|
+
"name": "paris",
|
|
3
|
+
"author": "Sanil Chawla <sanil@slingshot.fm> (https://sanil.co)",
|
|
4
|
+
"description": "Paris is Slingshot's React design system. It's a collection of reusable components, design tokens, and guidelines that help us build consistent, accessible, and performant user interfaces.",
|
|
5
|
+
"version": "0.18.1",
|
|
6
|
+
"homepage": "https://paris.slingshot.fm",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/slingshot/paris"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"src/stories",
|
|
14
|
+
"src",
|
|
15
|
+
"README.md",
|
|
16
|
+
"CHANGELOG.md"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"react",
|
|
20
|
+
"design system",
|
|
21
|
+
"rsc",
|
|
22
|
+
"server components",
|
|
23
|
+
"ui",
|
|
24
|
+
"components",
|
|
25
|
+
"typescript",
|
|
26
|
+
"nextjs",
|
|
27
|
+
"storybook"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "bun run generate:exports && next build",
|
|
31
|
+
"storybook": "storybook dev -p 6006",
|
|
32
|
+
"build:storybook": "storybook build",
|
|
33
|
+
"create:component": "node ./scripts/createComponent.js",
|
|
34
|
+
"generate:exports": "node ./scripts/generateExports.js",
|
|
35
|
+
"generate:theme": "pte export ./src/stories/theme/themes.ts LightTheme -o ./public/pte.css",
|
|
36
|
+
"generate:text": "ts-node --esm ./scripts/text.ts",
|
|
37
|
+
"release": "bun run generate:exports && bunx changeset publish",
|
|
38
|
+
"prepare": "test -n \"$CI\" || lefthook install",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"lint": "biome check .",
|
|
41
|
+
"lint:fix": "biome check --write .",
|
|
42
|
+
"format": "biome format --write ."
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": "22.x"
|
|
46
|
+
},
|
|
47
|
+
"exports": {
|
|
48
|
+
"./*": "./src/stories/*",
|
|
49
|
+
"./accordion": "./src/stories/accordion/index.ts",
|
|
50
|
+
"./accordionselect": "./src/stories/accordionselect/index.ts",
|
|
51
|
+
"./avatar": "./src/stories/avatar/index.ts",
|
|
52
|
+
"./button": "./src/stories/button/index.ts",
|
|
53
|
+
"./callout": "./src/stories/callout/index.ts",
|
|
54
|
+
"./card": "./src/stories/card/index.ts",
|
|
55
|
+
"./cardbutton": "./src/stories/cardbutton/index.ts",
|
|
56
|
+
"./checkbox": "./src/stories/checkbox/index.ts",
|
|
57
|
+
"./combobox": "./src/stories/combobox/index.ts",
|
|
58
|
+
"./dialog": "./src/stories/dialog/index.ts",
|
|
59
|
+
"./drawer": "./src/stories/drawer/index.ts",
|
|
60
|
+
"./field": "./src/stories/field/index.ts",
|
|
61
|
+
"./icon": "./src/stories/icon/index.ts",
|
|
62
|
+
"./informationaltooltip": "./src/stories/informationaltooltip/index.ts",
|
|
63
|
+
"./input": "./src/stories/input/index.ts",
|
|
64
|
+
"./markdown": "./src/stories/markdown/index.ts",
|
|
65
|
+
"./menu": "./src/stories/menu/index.ts",
|
|
66
|
+
"./pagination": "./src/stories/pagination/index.ts",
|
|
67
|
+
"./popover": "./src/stories/popover/index.ts",
|
|
68
|
+
"./select": "./src/stories/select/index.ts",
|
|
69
|
+
"./styledlink": "./src/stories/styledlink/index.ts",
|
|
70
|
+
"./table": "./src/stories/table/index.ts",
|
|
71
|
+
"./tabs": "./src/stories/tabs/index.ts",
|
|
72
|
+
"./tag": "./src/stories/tag/index.ts",
|
|
73
|
+
"./text": "./src/stories/text/index.ts",
|
|
74
|
+
"./textarea": "./src/stories/textarea/index.ts",
|
|
75
|
+
"./theme": "./src/stories/theme/index.ts",
|
|
76
|
+
"./tilt": "./src/stories/tilt/index.ts",
|
|
77
|
+
"./toast": "./src/stories/toast/index.ts",
|
|
78
|
+
"./utility": "./src/stories/utility/index.ts"
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@ariakit/react": "^0.4.20",
|
|
82
|
+
"@emotion/is-prop-valid": "^1.4.0",
|
|
83
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
84
|
+
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
|
85
|
+
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
86
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
87
|
+
"@headlessui/react": "^2.2.4",
|
|
88
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
89
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
90
|
+
"clsx": "^1.2.1",
|
|
91
|
+
"font-color-contrast": "^11.1.0",
|
|
92
|
+
"framer-motion": "^12.24.10",
|
|
93
|
+
"pte": "^0.5.0",
|
|
94
|
+
"react-hot-toast": "^2.4.1",
|
|
95
|
+
"react-markdown": "^10.1.0",
|
|
96
|
+
"react-tiny-popover": "^8.1.6",
|
|
97
|
+
"rehype-raw": "^7.0.0",
|
|
98
|
+
"remark-gfm": "^4.0.1",
|
|
99
|
+
"ts-deepmerge": "^6.0.3"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"@types/react": "^19",
|
|
103
|
+
"@types/react-dom": "^19",
|
|
104
|
+
"react": "^19.x",
|
|
105
|
+
"react-dom": "^19.x",
|
|
106
|
+
"sass": "^1.x",
|
|
107
|
+
"typescript": "^5.0"
|
|
108
|
+
},
|
|
109
|
+
"devDependencies": {
|
|
110
|
+
"@biomejs/biome": "^2.0.6",
|
|
111
|
+
"@changesets/cli": "^2.26.1",
|
|
112
|
+
"@commitlint/cli": "^19.8.1",
|
|
113
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
114
|
+
"@ssh/csstypes": "^1.1.0",
|
|
115
|
+
"@storybook/addon-docs": "10.3.4",
|
|
116
|
+
"@storybook/addon-links": "10.3.4",
|
|
117
|
+
"@storybook/nextjs-vite": "10.3.4",
|
|
118
|
+
"@types/node": "^22.0.0",
|
|
119
|
+
"@types/react": "^19",
|
|
120
|
+
"@types/react-dom": "^19",
|
|
121
|
+
"autoprefixer": "^10.4.14",
|
|
122
|
+
"change-case": "^4.1.2",
|
|
123
|
+
"csstype": "^3.1.2",
|
|
124
|
+
"esbuild-sass-plugin": "^2.16.0",
|
|
125
|
+
"jss": "^10.10.0",
|
|
126
|
+
"jss-preset-default": "^10.10.0",
|
|
127
|
+
"lefthook": "^1.11.13",
|
|
128
|
+
"next": "^16.2.2",
|
|
129
|
+
"react": "^19.0.0",
|
|
130
|
+
"react-dom": "^19.0.0",
|
|
131
|
+
"sass": "^1.62.1",
|
|
132
|
+
"storybook": "10.3.4",
|
|
133
|
+
"storybook-dark-mode": "^5.0.0",
|
|
134
|
+
"title-case": "^3.0.3",
|
|
135
|
+
"ts-node": "^10.9.1",
|
|
136
|
+
"tsup": "^7.2.0",
|
|
137
|
+
"type-fest": "^3.10.0",
|
|
138
|
+
"typescript": "^5.2.2",
|
|
139
|
+
"vite": "^7.0.0"
|
|
140
|
+
}
|
|
152
141
|
}
|
|
@@ -14,8 +14,7 @@ export const renderEnhancer = (enhancer: Enhancer, size: number): ReactNode => {
|
|
|
14
14
|
return enhancer;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export const MemoizedEnhancer = memo<{ enhancer: Enhancer
|
|
18
|
-
<>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
), (prev, next) => prev.enhancer === next.enhancer && prev.size === next.size);
|
|
17
|
+
export const MemoizedEnhancer = memo<{ enhancer: Enhancer; size: number }>(
|
|
18
|
+
({ enhancer, size }) => <>{renderEnhancer(enhancer, size)}</>,
|
|
19
|
+
(prev, next) => prev.enhancer === next.enhancer && prev.size === next.size,
|
|
20
|
+
);
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
// Copied from https://usehooks-ts.com/react-hook/use-resize-observer
|
|
2
2
|
|
|
3
|
-
import { useEffect, useRef, useState } from 'react';
|
|
4
|
-
|
|
5
3
|
import type { RefObject } from 'react';
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
6
5
|
|
|
7
6
|
import { useIsMounted } from './useIsMounted';
|
|
8
7
|
|
|
9
|
-
type BoxSizesKey = keyof Pick<
|
|
10
|
-
ResizeObserverEntry,
|
|
11
|
-
'borderBoxSize' | 'contentBoxSize' | 'devicePixelContentBoxSize'
|
|
12
|
-
>;
|
|
8
|
+
type BoxSizesKey = keyof Pick<ResizeObserverEntry, 'borderBoxSize' | 'contentBoxSize' | 'devicePixelContentBoxSize'>;
|
|
13
9
|
|
|
14
10
|
function extractSize(
|
|
15
11
|
entry: ResizeObserverEntry,
|
|
@@ -25,19 +21,19 @@ function extractSize(
|
|
|
25
21
|
|
|
26
22
|
return Array.isArray(entry[box])
|
|
27
23
|
? entry[box][0][sizeType]
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
: // @ts-expect-error Support Firefox's non-standard behavior
|
|
25
|
+
(entry[box][sizeType] as number);
|
|
30
26
|
}
|
|
31
27
|
|
|
32
28
|
type Size = {
|
|
33
|
-
width: number | undefined
|
|
34
|
-
height: number | undefined
|
|
29
|
+
width: number | undefined;
|
|
30
|
+
height: number | undefined;
|
|
35
31
|
};
|
|
36
32
|
|
|
37
33
|
type UseResizeObserverOptions<T extends HTMLElement = HTMLElement> = {
|
|
38
|
-
ref: RefObject<T
|
|
39
|
-
onResize?: (size: Size) => void
|
|
40
|
-
box?: 'border-box' | 'content-box' | 'device-pixel-content-box'
|
|
34
|
+
ref: RefObject<T>;
|
|
35
|
+
onResize?: (size: Size) => void;
|
|
36
|
+
box?: 'border-box' | 'content-box' | 'device-pixel-content-box';
|
|
41
37
|
};
|
|
42
38
|
|
|
43
39
|
const initialSize: Size = {
|
|
@@ -45,9 +41,7 @@ const initialSize: Size = {
|
|
|
45
41
|
height: undefined,
|
|
46
42
|
};
|
|
47
43
|
|
|
48
|
-
export function useResizeObserver<T extends HTMLElement = HTMLElement>(
|
|
49
|
-
options: UseResizeObserverOptions<T>,
|
|
50
|
-
): Size {
|
|
44
|
+
export function useResizeObserver<T extends HTMLElement = HTMLElement>(options: UseResizeObserverOptions<T>): Size {
|
|
51
45
|
const { ref, box = 'content-box' } = options;
|
|
52
46
|
const [{ width, height }, setSize] = useState<Size>(initialSize);
|
|
53
47
|
const isMounted = useIsMounted();
|
|
@@ -64,17 +58,17 @@ export function useResizeObserver<T extends HTMLElement = HTMLElement>(
|
|
|
64
58
|
if (typeof window === 'undefined' || !('ResizeObserver' in window)) return undefined;
|
|
65
59
|
|
|
66
60
|
const observer = new ResizeObserver(([entry]) => {
|
|
67
|
-
const boxProp =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
const boxProp =
|
|
62
|
+
box === 'border-box'
|
|
63
|
+
? 'borderBoxSize'
|
|
64
|
+
: box === 'device-pixel-content-box'
|
|
65
|
+
? 'devicePixelContentBoxSize'
|
|
66
|
+
: 'contentBoxSize';
|
|
72
67
|
|
|
73
68
|
const newWidth = extractSize(entry, boxProp, 'inlineSize');
|
|
74
69
|
const newHeight = extractSize(entry, boxProp, 'blockSize');
|
|
75
70
|
|
|
76
|
-
const hasChanged = previousSize.current.width !== newWidth
|
|
77
|
-
|| previousSize.current.height !== newHeight;
|
|
71
|
+
const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;
|
|
78
72
|
|
|
79
73
|
if (hasChanged) {
|
|
80
74
|
const newSize: Size = { width: newWidth, height: newHeight };
|
package/src/pages/_document.tsx
CHANGED
package/src/pages/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Inter } from 'next/font/google';
|
|
1
2
|
import Head from 'next/head';
|
|
2
3
|
import Image from 'next/image';
|
|
3
|
-
import { Inter } from 'next/font/google';
|
|
4
4
|
import styles from 'src/styles/Home.module.css';
|
|
5
5
|
|
|
6
6
|
const inter = Inter({ subsets: ['latin'] });
|
|
@@ -26,8 +26,7 @@ export default function Home() {
|
|
|
26
26
|
target="_blank"
|
|
27
27
|
rel="noopener noreferrer"
|
|
28
28
|
>
|
|
29
|
-
By
|
|
30
|
-
{' '}
|
|
29
|
+
By{' '}
|
|
31
30
|
<Image
|
|
32
31
|
src="/vercel.svg"
|
|
33
32
|
alt="Vercel Logo"
|
|
@@ -50,13 +49,7 @@ export default function Home() {
|
|
|
50
49
|
priority
|
|
51
50
|
/>
|
|
52
51
|
<div className={styles.thirteen}>
|
|
53
|
-
<Image
|
|
54
|
-
src="/thirteen.svg"
|
|
55
|
-
alt="13"
|
|
56
|
-
width={40}
|
|
57
|
-
height={31}
|
|
58
|
-
priority
|
|
59
|
-
/>
|
|
52
|
+
<Image src="/thirteen.svg" alt="13" width={40} height={31} priority />
|
|
60
53
|
</div>
|
|
61
54
|
</div>
|
|
62
55
|
|
|
@@ -68,9 +61,7 @@ export default function Home() {
|
|
|
68
61
|
rel="noopener noreferrer"
|
|
69
62
|
>
|
|
70
63
|
<h2 className={inter.className}>
|
|
71
|
-
Docs
|
|
72
|
-
{' '}
|
|
73
|
-
<span>-></span>
|
|
64
|
+
Docs <span>-></span>
|
|
74
65
|
</h2>
|
|
75
66
|
<p className={inter.className}>
|
|
76
67
|
Find in-depth information about Next.js features and API.
|
|
@@ -84,9 +75,7 @@ export default function Home() {
|
|
|
84
75
|
rel="noopener noreferrer"
|
|
85
76
|
>
|
|
86
77
|
<h2 className={inter.className}>
|
|
87
|
-
Learn
|
|
88
|
-
{' '}
|
|
89
|
-
<span>-></span>
|
|
78
|
+
Learn <span>-></span>
|
|
90
79
|
</h2>
|
|
91
80
|
<p className={inter.className}>
|
|
92
81
|
Learn about Next.js in an interactive course with quizzes!
|
|
@@ -100,9 +89,7 @@ export default function Home() {
|
|
|
100
89
|
rel="noopener noreferrer"
|
|
101
90
|
>
|
|
102
91
|
<h2 className={inter.className}>
|
|
103
|
-
Templates
|
|
104
|
-
{' '}
|
|
105
|
-
<span>-></span>
|
|
92
|
+
Templates <span>-></span>
|
|
106
93
|
</h2>
|
|
107
94
|
<p className={inter.className}>
|
|
108
95
|
Discover and deploy boilerplate example Next.js projects.
|
|
@@ -116,13 +103,10 @@ export default function Home() {
|
|
|
116
103
|
rel="noopener noreferrer"
|
|
117
104
|
>
|
|
118
105
|
<h2 className={inter.className}>
|
|
119
|
-
Deploy
|
|
120
|
-
{' '}
|
|
121
|
-
<span>-></span>
|
|
106
|
+
Deploy <span>-></span>
|
|
122
107
|
</h2>
|
|
123
108
|
<p className={inter.className}>
|
|
124
|
-
Instantly deploy your Next.js site to a shareable URL
|
|
125
|
-
with Vercel.
|
|
109
|
+
Instantly deploy your Next.js site to a shareable URL with Vercel.
|
|
126
110
|
</p>
|
|
127
111
|
</a>
|
|
128
112
|
</div>
|
package/src/stories/Tokens.mdx
CHANGED
package/src/stories/Welcome.mdx
CHANGED