@atlaskit/media-card 80.7.3 → 80.7.5
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/AGENTS.md +50 -0
- package/CHANGELOG.md +12 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/package.json +5 -6
package/AGENTS.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# media-card — Agent Guide
|
|
2
|
+
|
|
3
|
+
> **Parent guide:** Always read [`../AGENTS.md`](../AGENTS.md) before working in this package — it
|
|
4
|
+
> contains workspace-wide rules covering platform guidelines, changeset workflow, accessibility
|
|
5
|
+
> standards, and the knowledge index protocol that applies to every Media package.
|
|
6
|
+
|
|
7
|
+
## Package identity
|
|
8
|
+
|
|
9
|
+
| Field | Value |
|
|
10
|
+
|---|---|
|
|
11
|
+
| NPM name | `@atlaskit/media-card` |
|
|
12
|
+
| Path | `media-card/` |
|
|
13
|
+
| Owner | Media Exif |
|
|
14
|
+
| Purpose | Card component for displaying media files (images, video, documents) with loading, error, and progress states |
|
|
15
|
+
|
|
16
|
+
## Knowledge index
|
|
17
|
+
|
|
18
|
+
> Read, search, edit, investigate, and validate the repository knowledge index at
|
|
19
|
+
> `.agents/knowledge-index/`. ALWAYS use this skill before making ANY repo change, or when
|
|
20
|
+
> exploring the codebase. The knowledge index is the canonical starting point for every coding task
|
|
21
|
+
> in this repo, trigger this skill aggressively whenever the user mentions architecture, conventions,
|
|
22
|
+
> packages, modules, services, build, coding, writing code, APIs, feature flags, testing, or
|
|
23
|
+
> anything similar. Also trigger when "is the knowledge index up to date?" / "update the knowledge
|
|
24
|
+
> index" / "what does the knowledge index say about Y?" — even if they don't say the words
|
|
25
|
+
> "knowledge index". Also use it (via the `validate` subcommand) to detect drift between the
|
|
26
|
+
> codebase and the docs after any code change. Use the `generate` subcommand to bootstrap the index
|
|
27
|
+
> in a new repository.
|
|
28
|
+
|
|
29
|
+
**Entry point:** `.agents/knowledge-index/INDEX.md`
|
|
30
|
+
**Unit doc:** `.agents/knowledge-index/domains/media/units/atlaskit-media-card.md`
|
|
31
|
+
**CLI:** `python3 .agents/skills/knowledge-index/scripts/kg.py {find,read,edit,investigate,validate,init,explore,generate} …`
|
|
32
|
+
**Refresh protocol:** never silently bump `Last verified` — always re-read the listed `Sources` first, edit, then `kg.py edit <path> --message "<reason>"`.
|
|
33
|
+
|
|
34
|
+
## Key source files
|
|
35
|
+
|
|
36
|
+
- `src/index.ts` — public API entry point
|
|
37
|
+
- `src/card/` — main Card component and logic
|
|
38
|
+
- `src/inline/` — inline card variant
|
|
39
|
+
- `src/utils/` — shared utilities (analytics, performance observer, light cards, global scope)
|
|
40
|
+
- `src/types.ts` — shared TypeScript types
|
|
41
|
+
- `src/errors.ts` — error definitions
|
|
42
|
+
|
|
43
|
+
## Development notes
|
|
44
|
+
|
|
45
|
+
- React Compiler is enabled for this package
|
|
46
|
+
- Peer dependencies: `@emotion/react`, `react`, `react-dom`, `react-intl`
|
|
47
|
+
- Key internal dependencies: `@atlaskit/media-client`, `@atlaskit/media-client-react`, `@atlaskit/media-ui`, `@atlaskit/media-viewer`
|
|
48
|
+
- VR tests exist under `examples/Test-VR-*.tsx`
|
|
49
|
+
- Integration tests exist under `examples/Test-Integration-*.tsx`
|
|
50
|
+
- All new behaviour changes must be behind a feature gate (`fg()` from `@atlaskit/platform-feature-flags`)
|
package/CHANGELOG.md
CHANGED
package/dist/cjs/card/card.js
CHANGED
|
@@ -20,7 +20,7 @@ var _label = _interopRequireDefault(require("@atlaskit/react-ufo/label"));
|
|
|
20
20
|
var _excluded = ["identifier"];
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
22
|
var packageName = "@atlaskit/media-card";
|
|
23
|
-
var packageVersion = "80.7.
|
|
23
|
+
var packageVersion = "80.7.4";
|
|
24
24
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
25
25
|
var identifier = _ref.identifier,
|
|
26
26
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -87,7 +87,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
87
87
|
}(_react.default.Component);
|
|
88
88
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
89
89
|
var packageName = "@atlaskit/media-card";
|
|
90
|
-
var packageVersion = "80.7.
|
|
90
|
+
var packageVersion = "80.7.4";
|
|
91
91
|
|
|
92
92
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
93
93
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
@@ -116,7 +116,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
116
116
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
117
117
|
var analyticsContext = {
|
|
118
118
|
packageVersion: "@atlaskit/media-card",
|
|
119
|
-
packageName: "80.7.
|
|
119
|
+
packageName: "80.7.4",
|
|
120
120
|
componentName: 'mediaInlineCard',
|
|
121
121
|
component: 'mediaInlineCard'
|
|
122
122
|
};
|
|
@@ -19,7 +19,7 @@ var _globalScope = require("./globalScope/globalScope");
|
|
|
19
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
21
|
var packageName = "@atlaskit/media-card";
|
|
22
|
-
var packageVersion = "80.7.
|
|
22
|
+
var packageVersion = "80.7.4";
|
|
23
23
|
var SAMPLE_RATE = 0.05;
|
|
24
24
|
|
|
25
25
|
/**
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -9,7 +9,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
10
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "80.7.
|
|
12
|
+
const packageVersion = "80.7.4";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
|
66
66
|
}
|
|
67
67
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
68
68
|
const packageName = "@atlaskit/media-card";
|
|
69
|
-
const packageVersion = "80.7.
|
|
69
|
+
const packageVersion = "80.7.4";
|
|
70
70
|
|
|
71
71
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
72
72
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "80.7.
|
|
40
|
+
packageName: "80.7.4",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -9,7 +9,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
|
9
9
|
import { getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
10
10
|
import { getMediaGlobalScope } from './globalScope/globalScope';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "80.7.
|
|
12
|
+
const packageVersion = "80.7.4";
|
|
13
13
|
const SAMPLE_RATE = 0.05;
|
|
14
14
|
|
|
15
15
|
/**
|
package/dist/esm/card/card.js
CHANGED
|
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
12
|
import UFOLabel from '@atlaskit/react-ufo/label';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "80.7.
|
|
14
|
+
var packageVersion = "80.7.4";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
80
80
|
}(React.Component);
|
|
81
81
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
82
82
|
var packageName = "@atlaskit/media-card";
|
|
83
|
-
var packageVersion = "80.7.
|
|
83
|
+
var packageVersion = "80.7.4";
|
|
84
84
|
|
|
85
85
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
86
86
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
101
101
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
102
102
|
var analyticsContext = {
|
|
103
103
|
packageVersion: "@atlaskit/media-card",
|
|
104
|
-
packageName: "80.7.
|
|
104
|
+
packageName: "80.7.4",
|
|
105
105
|
componentName: 'mediaInlineCard',
|
|
106
106
|
component: 'mediaInlineCard'
|
|
107
107
|
};
|
|
@@ -13,7 +13,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
|
13
13
|
import { getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
14
14
|
import { getMediaGlobalScope } from './globalScope/globalScope';
|
|
15
15
|
var packageName = "@atlaskit/media-card";
|
|
16
|
-
var packageVersion = "80.7.
|
|
16
|
+
var packageVersion = "80.7.4";
|
|
17
17
|
var SAMPLE_RATE = 0.05;
|
|
18
18
|
|
|
19
19
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "80.7.
|
|
3
|
+
"version": "80.7.5",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@atlaskit/analytics-next": "^11.
|
|
41
|
+
"@atlaskit/analytics-next": "^11.3.0",
|
|
42
42
|
"@atlaskit/dropdown-menu": "^16.10.0",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
44
|
-
"@atlaskit/icon": "^35.
|
|
44
|
+
"@atlaskit/icon": "^35.4.0",
|
|
45
45
|
"@atlaskit/link": "^3.4.0",
|
|
46
46
|
"@atlaskit/media-client": "^36.3.0",
|
|
47
47
|
"@atlaskit/media-client-react": "^5.2.0",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@atlaskit/react-ufo": "^6.6.0",
|
|
58
58
|
"@atlaskit/spinner": "^19.1.0",
|
|
59
59
|
"@atlaskit/theme": "^25.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^89.0.0",
|
|
61
61
|
"@atlaskit/tokens": "^13.1.0",
|
|
62
|
-
"@atlaskit/tooltip": "^22.
|
|
62
|
+
"@atlaskit/tooltip": "^22.6.0",
|
|
63
63
|
"@atlaskit/ufo": "^0.5.0",
|
|
64
64
|
"@atlaskit/visually-hidden": "^3.1.0",
|
|
65
65
|
"@babel/runtime": "^7.0.0",
|
|
@@ -100,7 +100,6 @@
|
|
|
100
100
|
"@testing-library/user-event": "^14.4.3",
|
|
101
101
|
"@types/classnames": "^2.2.6",
|
|
102
102
|
"@types/react-loadable": "^5.4.1",
|
|
103
|
-
"enzyme": "^3.10.0",
|
|
104
103
|
"exenv": "^1.2.2",
|
|
105
104
|
"react": "^18.2.0",
|
|
106
105
|
"react-dom": "^18.2.0",
|