Files
ThreadNet-Web/packages/shared-components/package.json
T
a4f63cdd22 Emoji picker to shared components (#34337)
* Exploration of a virtuoso-powered emoji picker

moved to shared components

Fable generated

* fix pnpm lock

* format & fix some lint issues

* wrong import

* fix lint warning

* Fix off-by-one

and remove manual overflow adjustment: let's leave the default unless
it turns out to be necessary. Emoji should not take that long to load.

* Convert to functional component

* WIP: change to one big virtuoso scroller

* Change to use virtuoso's own onRangeChanged

and santitise category data and how it's passed around

* Convert Tabs to functional component

and put the focusing behaviour back with it just keeping track of
refs by itself.

* Absorb two line config file into main component

* Actually add the config to the main file

* Convert emoji to functional

Also make selected always defined and use useCallback.

* QuickReactions to functional component

* Non-default exports & doc

* Search to functional component

* Well it seems to work just fine now

* Use ref prop

* fix lockfile AGAIN

* lint

* Remove default export

* Remove some mx_ classnames and fix the inputRef

to make the arrow keys in the search box work (well, work as much as
they ever did).

* Remove last of the mx_ id / classnames

(except the one in the test)

* Use useMemo to memoize

* No need to export props interface (I think?)

and fix comment now we don't do the mutation stuff anymore

* Fix test

* Fix axe violations & add screenshots

* Avoid comparing dom snapshots in test

* Allow more before or after, just compare order of the ones present in both.

* Switch existing usages to new emoji picker

and kill the old one with fire

* Unused stuff

* Remove i18n strings

* Fix some tests

* Update screenshots

* Fix test

by removing the last of the weird memoized-but-mutated data structure

* Move the string somewhere more sensible than 'a11y'

* i18n lint

* Give the emojis IDs so aria-activedescendant works

* Fix more tests

* Add a small wrapper emoji picker component

This lets us easily memoize the recent emojis when the emoji picker is opened.
Also it saves a bit of boilerplate.

* Remove old emojipicker css

* Typos

Co-authored-by: David Langley <davidl@element.io>

* Use compound constants

* Rethemendex

* Use catalog version for emojibase

* Add comments

* More comments

* Fix comment

* More comments

* more comments (and make them uniform)

* More comments

* Fix pnpm lock again

* Another comment

* Apply button types to new version

* Add comment

* Disable screenshot

as per comment

---------

Co-authored-by: Will Hunt <2072976+Half-Shot@users.noreply.github.com>
Co-authored-by: David Langley <davidl@element.io>
2026-08-05 13:44:35 +00:00

133 lines
4.7 KiB
JSON

{
"name": "@element-hq/web-shared-components",
"version": "0.1.2",
"description": "Shared components for Element",
"author": "New Vector Ltd.",
"repository": {
"type": "git",
"url": "https://github.com/element-hq/element-web"
},
"type": "module",
"exports": {
".": {
"require": {
"style": "./dist/element-web-shared-components.css",
"types": "./dist/element-web-shared-components.d.ts",
"default": "./dist/element-web-shared-components.umd.cjs"
},
"import": {
"style": "./dist/element-web-shared-components.css",
"types": "./dist/element-web-shared-components.d.ts",
"default": "./dist/element-web-shared-components.js"
}
},
"./numbers": {
"require": {
"types": "./dist/numbers.d.ts",
"default": "./dist/numbers.umd.cjs"
},
"import": {
"types": "./dist/numbers.d.ts",
"default": "./dist/numbers.js"
}
},
"./dist/element-web-shared-components.css": {
"require": "./dist/element-web-shared-components.css",
"import": "./dist/element-web-shared-components.css"
}
},
"types": "dist/element-web-shared-components.d.ts",
"files": [
"dist",
"src",
"LICENSE",
"README.md",
"package.json"
],
"scripts": {
"i18n": "matrix-gen-i18n src && pnpm i18n:sort && pnpm i18n:lint",
"i18n:sort": "matrix-sort-i18n src/i18n/strings/en_EN.json",
"i18n:lint": "matrix-i18n-lint && oxfmt src/i18n/strings/",
"test:unit": "nx test:unit",
"test:storybook": "nx test:storybook",
"test:storybook:update": "nx test:storybook:update",
"coverage": "pnpm test:unit --coverage",
"coverage:diff": "diff-cover --config-file ../../diff-cover.toml coverage/lcov.info",
"build": "nx build",
"prepack": "pnpm run build",
"storybook": "storybook dev -p 6007",
"build:storybook": "nx storybook",
"build:doc": "nx typedoc",
"lint": "pnpm lint:types",
"lint:types": "nx lint:types"
},
"dependencies": {
"@dnd-kit/abstract": "^0.5.0",
"@dnd-kit/dom": "^0.5.0",
"@dnd-kit/react": "^0.5.0",
"@element-hq/element-web-module-api": "workspace:*",
"@matrix-org/emojibase-bindings": "catalog:",
"@matrix-org/spec": "^1.7.0",
"@vector-im/compound-design-tokens": "catalog:",
"classnames": "^2.5.1",
"counterpart": "^0.18.6",
"events": "^3.3.0",
"html-react-parser": "^6.0.0",
"linkify-html": "4.3.3",
"linkify-react": "4.3.3",
"linkify-string": "4.3.3",
"linkifyjs": "4.3.3",
"lodash": "npm:lodash-es@^4.17.21",
"matrix-web-i18n": "catalog:",
"react-blurhash": "^0.3.0",
"react-merge-refs": "^3.0.2",
"react-resizable-panels": "4.12.2",
"react-virtuoso": "^4.14.0",
"temporal-polyfill": "^1.0.0"
},
"devDependencies": {
"@element-hq/element-web-playwright-common": "workspace:*",
"@fetch-mock/vitest": "^0.2.18",
"@fontsource/inter": "catalog:",
"@matrix-org/react-sdk-module-api": "^2.5.0",
"@microsoft/api-extractor": "^7.56.0",
"@playwright/test": "catalog:",
"@storybook/addon-a11y": "^10.0.7",
"@storybook/addon-designs": "^11.0.1",
"@storybook/addon-docs": "^10.0.7",
"@storybook/addon-vitest": "^10.1.11",
"@storybook/icons": "^2.0.0",
"@storybook/react-vite": "^10.0.7",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/counterpart": "^0.18.4",
"@types/lodash": "^4.17.20",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@typescript/native": "catalog:",
"@vector-im/compound-web": "catalog:",
"@vitejs/plugin-react": "catalog:",
"@vitest/browser-playwright": "catalog:",
"oxfmt": "0.59.0",
"storybook": "^10.0.7",
"storybook-addon-vis": "^4.0.0",
"typedoc": "^0.28.16",
"typedoc-plugin-markdown": "^4.9.0",
"typedoc-plugin-missing-exports": "^4.1.2",
"typescript": "catalog:ts6",
"unplugin-dts": "catalog:",
"vite": "catalog:",
"vite-plugin-node-polyfills": "^0.28.0",
"vitest": "catalog:"
},
"engines": {
"node": ">=20.0.0"
},
"peerDependencies": {
"@vector-im/compound-web": "^8.3.5 || ^9.0.0",
"react-dom": "catalog:",
"react": "catalog:"
}
}