@apify/ui-library 1.137.2 → 1.137.3-featpublictasks-2f3d3c.47

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.
Files changed (81) hide show
  1. package/dist/src/components/actor_example/actor_example.utils.d.ts +17 -0
  2. package/dist/src/components/actor_example/actor_example.utils.d.ts.map +1 -0
  3. package/dist/src/components/actor_example/actor_example.utils.js +41 -0
  4. package/dist/src/components/actor_example/actor_example.utils.js.map +1 -0
  5. package/dist/src/components/actor_example/actor_example_avatar.d.ts +13 -0
  6. package/dist/src/components/actor_example/actor_example_avatar.d.ts.map +1 -0
  7. package/dist/src/components/actor_example/actor_example_avatar.js +34 -0
  8. package/dist/src/components/actor_example/actor_example_avatar.js.map +1 -0
  9. package/dist/src/components/actor_example/actor_example_preview.d.ts +28 -0
  10. package/dist/src/components/actor_example/actor_example_preview.d.ts.map +1 -0
  11. package/dist/src/components/actor_example/actor_example_preview.js +209 -0
  12. package/dist/src/components/actor_example/actor_example_preview.js.map +1 -0
  13. package/dist/src/components/actor_example/actor_example_schema.d.ts +20 -0
  14. package/dist/src/components/actor_example/actor_example_schema.d.ts.map +1 -0
  15. package/dist/src/components/actor_example/actor_example_schema.js +29 -0
  16. package/dist/src/components/actor_example/actor_example_schema.js.map +1 -0
  17. package/dist/src/components/actor_example/actor_example_schema_field.d.ts +19 -0
  18. package/dist/src/components/actor_example/actor_example_schema_field.d.ts.map +1 -0
  19. package/dist/src/components/actor_example/actor_example_schema_field.js +33 -0
  20. package/dist/src/components/actor_example/actor_example_schema_field.js.map +1 -0
  21. package/dist/src/components/actor_example/actor_example_schema_field_badge.d.ts +9 -0
  22. package/dist/src/components/actor_example/actor_example_schema_field_badge.d.ts.map +1 -0
  23. package/dist/src/components/actor_example/actor_example_schema_field_badge.js +48 -0
  24. package/dist/src/components/actor_example/actor_example_schema_field_badge.js.map +1 -0
  25. package/dist/src/components/actor_example/actor_example_schema_legend.d.ts +10 -0
  26. package/dist/src/components/actor_example/actor_example_schema_legend.d.ts.map +1 -0
  27. package/dist/src/components/actor_example/actor_example_schema_legend.js +29 -0
  28. package/dist/src/components/actor_example/actor_example_schema_legend.js.map +1 -0
  29. package/dist/src/components/actor_example/actor_example_schema_property.d.ts +24 -0
  30. package/dist/src/components/actor_example/actor_example_schema_property.d.ts.map +1 -0
  31. package/dist/src/components/actor_example/actor_example_schema_property.js +122 -0
  32. package/dist/src/components/actor_example/actor_example_schema_property.js.map +1 -0
  33. package/dist/src/components/actor_example/index.d.ts +9 -0
  34. package/dist/src/components/actor_example/index.d.ts.map +1 -0
  35. package/dist/src/components/actor_example/index.js +9 -0
  36. package/dist/src/components/actor_example/index.js.map +1 -0
  37. package/dist/src/components/browser_window/browser_window.d.ts +20 -0
  38. package/dist/src/components/browser_window/browser_window.d.ts.map +1 -0
  39. package/dist/src/components/browser_window/browser_window.js +72 -0
  40. package/dist/src/components/browser_window/browser_window.js.map +1 -0
  41. package/dist/src/components/browser_window/index.d.ts +2 -0
  42. package/dist/src/components/browser_window/index.d.ts.map +1 -0
  43. package/dist/src/components/browser_window/index.js +2 -0
  44. package/dist/src/components/browser_window/index.js.map +1 -0
  45. package/dist/src/components/chip.d.ts.map +1 -1
  46. package/dist/src/components/chip.js +24 -2
  47. package/dist/src/components/chip.js.map +1 -1
  48. package/dist/src/components/collapsible_card/collapsible_card.d.ts +3 -2
  49. package/dist/src/components/collapsible_card/collapsible_card.d.ts.map +1 -1
  50. package/dist/src/components/collapsible_card/collapsible_card.js +2 -2
  51. package/dist/src/components/collapsible_card/collapsible_card.js.map +1 -1
  52. package/dist/src/components/floating/floating_component_base.d.ts +72 -1
  53. package/dist/src/components/floating/floating_component_base.d.ts.map +1 -1
  54. package/dist/src/components/floating/floating_component_base.js +61 -36
  55. package/dist/src/components/floating/floating_component_base.js.map +1 -1
  56. package/dist/src/components/floating/tooltip.d.ts +10 -3
  57. package/dist/src/components/floating/tooltip.d.ts.map +1 -1
  58. package/dist/src/components/floating/tooltip.js +24 -20
  59. package/dist/src/components/floating/tooltip.js.map +1 -1
  60. package/dist/src/components/index.d.ts +2 -0
  61. package/dist/src/components/index.d.ts.map +1 -1
  62. package/dist/src/components/index.js +2 -0
  63. package/dist/src/components/index.js.map +1 -1
  64. package/dist/tsconfig.build.tsbuildinfo +1 -1
  65. package/package.json +3 -3
  66. package/src/components/actor_example/actor_example.utils.ts +52 -0
  67. package/src/components/actor_example/actor_example_avatar.tsx +66 -0
  68. package/src/components/actor_example/actor_example_preview.tsx +293 -0
  69. package/src/components/actor_example/actor_example_schema.tsx +62 -0
  70. package/src/components/actor_example/actor_example_schema_field.tsx +84 -0
  71. package/src/components/actor_example/actor_example_schema_field_badge.tsx +64 -0
  72. package/src/components/actor_example/actor_example_schema_legend.tsx +47 -0
  73. package/src/components/actor_example/actor_example_schema_property.tsx +222 -0
  74. package/src/components/actor_example/index.ts +8 -0
  75. package/src/components/browser_window/browser_window.tsx +104 -0
  76. package/src/components/browser_window/index.ts +1 -0
  77. package/src/components/chip.tsx +25 -1
  78. package/src/components/collapsible_card/collapsible_card.tsx +6 -4
  79. package/src/components/floating/floating_component_base.tsx +84 -49
  80. package/src/components/floating/tooltip.tsx +62 -41
  81. package/src/components/index.ts +2 -0
@@ -0,0 +1,17 @@
1
+ import type { IconComponent } from '@apify/ui-icons';
2
+ import type { ActorExampleSchemaFieldType } from '@apify-packages/types';
3
+ export type ActorExampleSchemaPropertyConfig = {
4
+ Icon: IconComponent;
5
+ title: string;
6
+ backgroundColor: string;
7
+ textColor: string;
8
+ };
9
+ /**
10
+ * Per-type display config used by the schema field components (badge icon, hover tooltip,
11
+ * background/text colors). The `var(--actor-schema-field-*)` references are declared on the
12
+ * `ActorExampleSchemaFieldBadgeWrapper` styled component itself (with a dark-mode override via
13
+ * `html[data-theme='dark'] &`), so the vars are scoped to the badge — no globals are injected.
14
+ */
15
+ export declare const actorExampleSchemaPropertyMap: Record<ActorExampleSchemaFieldType, ActorExampleSchemaPropertyConfig>;
16
+ export declare const actorExampleSchemaPropertyDefaultIcon: ({ size, className, title, titleId, ...props }: import("@apify/ui-icons").IconProps) => React.JSX.Element;
17
+ //# sourceMappingURL=actor_example.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEzE,MAAM,MAAM,gCAAgC,GAAG;IAC3C,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,2BAA2B,EAAE,gCAAgC,CA+B/G,CAAC;AAEF,eAAO,MAAM,qCAAqC,2GAAU,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { AnyIcon, BooleanIcon, MenuIcon, NumberIcon, ObjectIcon, TextIcon } from '@apify/ui-icons';
2
+ /**
3
+ * Per-type display config used by the schema field components (badge icon, hover tooltip,
4
+ * background/text colors). The `var(--actor-schema-field-*)` references are declared on the
5
+ * `ActorExampleSchemaFieldBadgeWrapper` styled component itself (with a dark-mode override via
6
+ * `html[data-theme='dark'] &`), so the vars are scoped to the badge — no globals are injected.
7
+ */
8
+ export const actorExampleSchemaPropertyMap = {
9
+ string: {
10
+ Icon: TextIcon,
11
+ title: 'Text',
12
+ backgroundColor: 'var(--actor-schema-field-string-background)',
13
+ textColor: 'var(--actor-schema-field-string-text)',
14
+ },
15
+ number: {
16
+ Icon: NumberIcon,
17
+ title: 'Number',
18
+ backgroundColor: 'var(--actor-schema-field-number-background)',
19
+ textColor: 'var(--actor-schema-field-number-text)',
20
+ },
21
+ boolean: {
22
+ Icon: BooleanIcon,
23
+ title: 'Boolean',
24
+ backgroundColor: 'var(--actor-schema-field-boolean-background)',
25
+ textColor: 'var(--actor-schema-field-boolean-text)',
26
+ },
27
+ array: {
28
+ Icon: MenuIcon,
29
+ title: 'List',
30
+ backgroundColor: 'var(--actor-schema-field-array-background)',
31
+ textColor: 'var(--actor-schema-field-array-text)',
32
+ },
33
+ object: {
34
+ Icon: ObjectIcon,
35
+ title: 'Object',
36
+ backgroundColor: 'var(--actor-schema-field-object-background)',
37
+ textColor: 'var(--actor-schema-field-object-text)',
38
+ },
39
+ };
40
+ export const actorExampleSchemaPropertyDefaultIcon = AnyIcon;
41
+ //# sourceMappingURL=actor_example.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example.utils.js","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAWnG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAA0E;IAChH,MAAM,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,6CAA6C;QAC9D,SAAS,EAAE,uCAAuC;KACrD;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,QAAQ;QACf,eAAe,EAAE,6CAA6C;QAC9D,SAAS,EAAE,uCAAuC;KACrD;IACD,OAAO,EAAE;QACL,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,SAAS;QAChB,eAAe,EAAE,8CAA8C;QAC/D,SAAS,EAAE,wCAAwC;KACtD;IACD,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,4CAA4C;QAC7D,SAAS,EAAE,sCAAsC;KACpD;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,QAAQ;QACf,eAAe,EAAE,6CAA6C;QAC9D,SAAS,EAAE,uCAAuC;KACrD;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,OAAO,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const actorExampleAvatarClassNames: {
2
+ ROOT: string;
3
+ };
4
+ export type ActorExampleAvatarProps = {
5
+ title?: string;
6
+ name: string;
7
+ pictureUrl?: string;
8
+ fallbackPictureUrl: string;
9
+ size?: number;
10
+ className?: string;
11
+ };
12
+ export declare const ActorExampleAvatar: ({ title, name, pictureUrl, fallbackPictureUrl, size, className, }: ActorExampleAvatarProps) => import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=actor_example_avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_avatar.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,4BAA4B;;CAExC,CAAC;AAOF,MAAM,MAAM,uBAAuB,GAAG;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,mEAOhC,uBAAuB,4CA+BzB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { clsx } from 'clsx';
3
+ import { useCallback, useMemo } from 'react';
4
+ import styled from 'styled-components';
5
+ import { useSharedUiDependencies } from '../../ui_dependency_provider.js';
6
+ const DEFAULT_SIZE = 36;
7
+ export const actorExampleAvatarClassNames = {
8
+ ROOT: 'actor-example-avatar',
9
+ };
10
+ const ActorExampleAvatarWrapper = styled.img `
11
+ flex-shrink: 0;
12
+ object-fit: cover;
13
+ `;
14
+ export const ActorExampleAvatar = ({ title, name, pictureUrl, fallbackPictureUrl, size = DEFAULT_SIZE, className, }) => {
15
+ const { generateProxyImageUrl } = useSharedUiDependencies();
16
+ // Mirrors apify-web's `<Image defaultSrc=…>` behaviour: if the primary src fails to load,
17
+ // swap in the fallback so the `<img>` element is always present.
18
+ const handlePictureError = useCallback((event) => {
19
+ if (!event.currentTarget.src.endsWith(fallbackPictureUrl)) {
20
+ // eslint-disable-next-line no-param-reassign
21
+ event.currentTarget.src = fallbackPictureUrl;
22
+ // eslint-disable-next-line no-param-reassign
23
+ event.currentTarget.srcset = fallbackPictureUrl;
24
+ }
25
+ }, [fallbackPictureUrl]);
26
+ const proxyPictureUrl = useMemo(() => {
27
+ if (!generateProxyImageUrl || !pictureUrl)
28
+ return pictureUrl;
29
+ return generateProxyImageUrl(pictureUrl, { resize: { height: size * 2, width: size * 2 } });
30
+ }, [pictureUrl, generateProxyImageUrl, size]);
31
+ const src = proxyPictureUrl || fallbackPictureUrl;
32
+ return (_jsx(ActorExampleAvatarWrapper, { src: src, alt: title ?? name, width: size, height: size, className: clsx(actorExampleAvatarClassNames.ROOT, className), onError: handlePictureError }));
33
+ };
34
+ //# sourceMappingURL=actor_example_avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_avatar.js","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_avatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,MAAM,CAAC,MAAM,4BAA4B,GAAG;IACxC,IAAI,EAAE,sBAAsB;CAC/B,CAAC;A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,4BAA4B,CAAC,IAAI,EAAE,SAAS,CAAC,EAC7D,OAAO,EAAE,kBAAkB,GAC7B,CACL,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ export declare const actorExamplePreviewClassNames: {
2
+ CONTAINER: string;
3
+ CONTENT: string;
4
+ BADGE: string;
5
+ BADGE_PICTURE: string;
6
+ BADGE_CONTENT: string;
7
+ BADGE_NAME: string;
8
+ BADGE_TECHNICAL_NAME: string;
9
+ SCHEMA: string;
10
+ SCHEMA_FIELD: string;
11
+ SCHEMA_FIELD_NAME: string;
12
+ SCHEMA_MORE: string;
13
+ };
14
+ export type ActorExamplePreviewField = {
15
+ name: string;
16
+ title?: string;
17
+ };
18
+ export type ActorExamplePreviewProps = {
19
+ actorName: string;
20
+ actorTitle: string | undefined;
21
+ actorPictureUrl: string | undefined;
22
+ actorPictureFallbackUrl: string;
23
+ outputFields: ActorExamplePreviewField[];
24
+ staticWebUrl: string;
25
+ username: string;
26
+ };
27
+ export declare const ActorExamplePreview: ({ actorName, actorTitle, actorPictureUrl, actorPictureFallbackUrl, outputFields, staticWebUrl, username, }: ActorExamplePreviewProps) => import("react/jsx-runtime").JSX.Element;
28
+ //# sourceMappingURL=actor_example_preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_preview.d.ts","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_preview.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;CAYzC,CAAC;AA4LF,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,wBAAwB,EAAE,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,4GAQjC,wBAAwB,4CA4D1B,CAAC"}
@@ -0,0 +1,209 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import styled, { keyframes } from 'styled-components';
3
+ import { theme } from '../../design_system/theme.js';
4
+ import { Heading, Text } from '../text/index.js';
5
+ import { ActorExampleAvatar } from './actor_example_avatar.js';
6
+ const MAX_VISIBLE_FIELDS = 4;
7
+ const BADGE_PICTURE_SIZE = 36;
8
+ export const actorExamplePreviewClassNames = {
9
+ CONTAINER: 'actor-example-preview',
10
+ CONTENT: 'actor-example-preview__content',
11
+ BADGE: 'actor-example-preview__badge',
12
+ BADGE_PICTURE: 'actor-example-preview__badge-picture',
13
+ BADGE_CONTENT: 'actor-example-preview__badge-content',
14
+ BADGE_NAME: 'actor-example-preview__badge-name',
15
+ BADGE_TECHNICAL_NAME: 'actor-example-preview__badge-technical-name',
16
+ SCHEMA: 'actor-example-preview__schema',
17
+ SCHEMA_FIELD: 'actor-example-preview__schema-field',
18
+ SCHEMA_FIELD_NAME: 'actor-example-preview__schema-field-name',
19
+ SCHEMA_MORE: 'actor-example-preview__schema-more',
20
+ };
21
+ const VISUAL_SEPARATOR_SIZE = '0.6rem';
22
+ const VISUAL_CONNECTOR_LENGTH = '2.4rem';
23
+ const noisePulse = keyframes `
24
+ 0%, 100% { opacity: 0.1; }
25
+ 50% { opacity: 0.4; }
26
+ `;
27
+ const ActorExamplePreviewWrapper = styled.div `
28
+ @property --noise-cx {
29
+ syntax: '<percentage>';
30
+ inherits: false;
31
+ initial-value: 50%;
32
+ }
33
+
34
+ @property --noise-cy {
35
+ syntax: '<percentage>';
36
+ inherits: false;
37
+ initial-value: 50%;
38
+ }
39
+
40
+ position: relative;
41
+ display: flex;
42
+ flex-direction: column;
43
+ align-items: center;
44
+ justify-content: center;
45
+ flex-shrink: 0;
46
+
47
+ &::before {
48
+ content: '';
49
+ position: absolute;
50
+ top: -${theme.space.space32};
51
+ bottom: 0;
52
+ inset-inline: -${theme.space.space32};
53
+ background-image: url(${({ $noiseImageUrl }) => $noiseImageUrl});
54
+ background-position: center;
55
+ background-repeat: repeat;
56
+ mask-image:
57
+ linear-gradient(to bottom, transparent, black 30%, black 70%, transparent),
58
+ linear-gradient(to right, transparent, black 30%, black 70%, transparent);
59
+ mask-composite: intersect;
60
+ -webkit-mask-image:
61
+ linear-gradient(to bottom, transparent, black 30%, black 70%, transparent),
62
+ linear-gradient(to right, transparent, black 30%, black 70%, transparent);
63
+ -webkit-mask-composite: destination-in;
64
+ animation: ${noisePulse} 4s ease-in-out infinite;
65
+ opacity: 0.1;
66
+ pointer-events: none;
67
+
68
+ @media ${theme.device.desktop} {
69
+ inset: 0;
70
+ mask-image: radial-gradient(circle at var(--noise-cx) var(--noise-cy), black 30%, transparent 70%);
71
+ -webkit-mask-image: radial-gradient(circle at var(--noise-cx) var(--noise-cy), black 30%, transparent 70%);
72
+ }
73
+
74
+ @media (prefers-reduced-motion: reduce) {
75
+ animation: none;
76
+ mask-image: none;
77
+ -webkit-mask-image: none;
78
+ }
79
+ }
80
+
81
+ .${actorExamplePreviewClassNames.CONTENT} {
82
+ max-width: 100%;
83
+ display: flex;
84
+ gap: ${theme.space.space32};
85
+ flex-direction: column;
86
+ align-items: center;
87
+ justify-content: center;
88
+ }
89
+
90
+ .${actorExamplePreviewClassNames.BADGE} {
91
+ width: 100%;
92
+ min-width: 0;
93
+ padding: ${theme.space.space12};
94
+ border: 1px solid ${theme.color.neutral.separatorSubtle};
95
+ border-radius: ${theme.radius.radius12};
96
+ background-color: ${theme.color.neutral.background};
97
+ display: flex;
98
+ gap: ${theme.space.space8};
99
+ align-items: center;
100
+ position: relative;
101
+ }
102
+
103
+ .${actorExamplePreviewClassNames.BADGE_PICTURE} {
104
+ border: 1px solid ${theme.color.neutral.separatorSubtle};
105
+ border-radius: ${theme.radius.radius8};
106
+ flex-shrink: 0;
107
+ object-fit: cover;
108
+ }
109
+
110
+ .${actorExamplePreviewClassNames.BADGE_CONTENT} {
111
+ min-width: 0;
112
+ display: flex;
113
+ flex-direction: column;
114
+ flex-grow: 1;
115
+ }
116
+
117
+ .${actorExamplePreviewClassNames.BADGE_NAME},
118
+ .${actorExamplePreviewClassNames.BADGE_TECHNICAL_NAME} {
119
+ text-overflow: ellipsis;
120
+ white-space: nowrap;
121
+ overflow: hidden;
122
+ }
123
+
124
+ .${actorExamplePreviewClassNames.SCHEMA} {
125
+ width: 100%;
126
+ min-width: 0;
127
+ padding: ${theme.space.space8};
128
+ border: 1px solid ${theme.color.primary.text};
129
+ border-radius: ${theme.radius.radius12};
130
+ background-color: ${theme.color.neutral.background};
131
+ display: flex;
132
+ flex-direction: column;
133
+ align-items: center;
134
+ gap: ${theme.space.space4};
135
+ position: relative;
136
+
137
+ &::before {
138
+ bottom: calc(100% + 0.5rem);
139
+ left: calc(50% - 0.5px);
140
+ width: 1px;
141
+ height: ${VISUAL_CONNECTOR_LENGTH};
142
+ background-color: ${theme.color.primary.text};
143
+ content: '';
144
+ display: block;
145
+ position: absolute;
146
+ }
147
+
148
+ &::after {
149
+ bottom: calc(100% + 0.5rem);
150
+ left: calc(50% - (${VISUAL_SEPARATOR_SIZE} / 2));
151
+ margin: 0 auto;
152
+ width: ${VISUAL_SEPARATOR_SIZE};
153
+ height: ${VISUAL_CONNECTOR_LENGTH};
154
+ border-block: 1px solid ${theme.color.primary.text};
155
+ box-sizing: border-box;
156
+ content: '';
157
+ display: block;
158
+ position: absolute;
159
+ }
160
+ }
161
+
162
+ .${actorExamplePreviewClassNames.SCHEMA_FIELD} {
163
+ width: 100%;
164
+ padding: ${theme.space.space4};
165
+ border: 1px solid ${theme.color.primary.borderSubtle};
166
+ border-radius: ${theme.radius.radius6};
167
+ display: flex;
168
+ gap: ${theme.space.space8};
169
+ align-items: center;
170
+ justify-content: center;
171
+ }
172
+
173
+ .${actorExamplePreviewClassNames.SCHEMA_FIELD_NAME} {
174
+ min-width: 0;
175
+ text-overflow: ellipsis;
176
+ white-space: nowrap;
177
+ overflow: hidden;
178
+ }
179
+
180
+ .${actorExamplePreviewClassNames.SCHEMA_MORE} {
181
+ height: 2.4rem;
182
+ margin-top: 2rem;
183
+ padding: 0 ${theme.space.space8};
184
+ border: 1px solid ${theme.color.primary.borderSubtle};
185
+ border-radius: ${theme.radius.radius12};
186
+ background-color: ${theme.color.primary.background};
187
+ display: flex;
188
+ align-items: center;
189
+ justify-content: center;
190
+ position: relative;
191
+
192
+ &::before {
193
+ top: calc(-1px - 1.6rem);
194
+ left: calc(50% - 0.5px);
195
+ width: 1px;
196
+ height: 0.8rem;
197
+ background-color: ${theme.color.primary.text};
198
+ content: '';
199
+ display: block;
200
+ position: absolute;
201
+ }
202
+ }
203
+ `;
204
+ export const ActorExamplePreview = ({ actorName, actorTitle, actorPictureUrl, actorPictureFallbackUrl, outputFields, staticWebUrl, username, }) => {
205
+ const visibleFields = outputFields.slice(0, MAX_VISIBLE_FIELDS);
206
+ const remainingCount = Math.max(0, outputFields.length - MAX_VISIBLE_FIELDS);
207
+ return (_jsx(ActorExamplePreviewWrapper, { className: actorExamplePreviewClassNames.CONTAINER, "$noiseImageUrl": `${staticWebUrl}/img/pattern/noise.svg`, children: _jsxs("div", { className: actorExamplePreviewClassNames.CONTENT, children: [_jsxs("div", { className: actorExamplePreviewClassNames.BADGE, children: [_jsx(ActorExampleAvatar, { title: actorTitle, name: actorName, pictureUrl: actorPictureUrl, fallbackPictureUrl: actorPictureFallbackUrl, size: BADGE_PICTURE_SIZE, className: actorExamplePreviewClassNames.BADGE_PICTURE }), _jsxs("div", { className: actorExamplePreviewClassNames.BADGE_CONTENT, children: [_jsx(Heading, { as: 'span', type: 'titleS', className: actorExamplePreviewClassNames.BADGE_NAME, children: actorTitle ?? actorName }), _jsxs(Text, { as: 'span', type: 'code', size: 'small', color: theme.color.neutral.textSubtle, className: actorExamplePreviewClassNames.BADGE_TECHNICAL_NAME, children: [username, "/", actorName] })] })] }), visibleFields.length > 0 && (_jsxs("div", { className: actorExamplePreviewClassNames.SCHEMA, children: [visibleFields.map((field) => (_jsx("div", { className: actorExamplePreviewClassNames.SCHEMA_FIELD, children: _jsx(Text, { as: 'span', size: 'small', color: theme.color.neutral.text, className: actorExamplePreviewClassNames.SCHEMA_FIELD_NAME, children: field.title ?? field.name }) }, field.name))), remainingCount > 0 && (_jsxs(Text, { as: 'span', size: 'small', color: theme.color.primary.text, className: actorExamplePreviewClassNames.SCHEMA_MORE, children: ["+", remainingCount, " ", remainingCount === 1 ? 'field' : 'fields'] }))] }))] }) }));
208
+ };
209
+ //# sourceMappingURL=actor_example_preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_preview.js","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_preview.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,MAAM,CAAC,MAAM,6BAA6B,GAAG;IACzC,SAAS,EAAE,uBAAuB;IAClC,OAAO,EAAE,gCAAgC;IACzC,KAAK,EAAE,8BAA8B;IACrC,aAAa,EAAE,sCAAsC;IACrD,aAAa,EAAE,sCAAsC;IACrD,UAAU,EAAE,mCAAmC;IAC/C,oBAAoB,EAAE,6CAA6C;IACnE,MAAM,EAAE,+BAA+B;IACvC,YAAY,EAAE,qCAAqC;IACnD,iBAAiB,EAAE,0CAA0C;IAC7D,WAA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6BAA6B,CAAC,WAAW,kBAElD,cAAc,OAAG,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,IACzD,CACV,IACC,CACT,IACC,GACmB,CAChC,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { ActorExampleSchemaFieldSerialized } from '@apify-packages/types';
2
+ export declare const actorExampleSchemaClassNames: {
3
+ ROOT: string;
4
+ };
5
+ type Props = {
6
+ fields: ActorExampleSchemaFieldSerialized[];
7
+ canCollapse?: boolean;
8
+ className?: string;
9
+ /**
10
+ * Per-row slot rendered before the type badge on each top-level field
11
+ * (nested children render plain). Useful for configurators that need a
12
+ * checkbox or other control alongside each field.
13
+ */
14
+ LeadingSlot?: (props: {
15
+ field: ActorExampleSchemaFieldSerialized;
16
+ }) => React.ReactNode;
17
+ };
18
+ export declare const ActorExampleSchema: ({ fields, canCollapse, className, LeadingSlot }: Props) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
20
+ //# sourceMappingURL=actor_example_schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_schema.d.ts","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_schema.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAK/E,eAAO,MAAM,4BAA4B;;CAExC,CAAC;AAaF,KAAK,KAAK,GAAG;IACT,MAAM,EAAE,iCAAiC,EAAE,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,iCAAiC,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;CAC1F,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,iDAAyD,KAAK,4CAyBhG,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import { useState } from 'react';
4
+ import styled from 'styled-components';
5
+ import { theme } from '../../design_system/theme.js';
6
+ import { ActorExampleSchemaField } from './actor_example_schema_field.js';
7
+ export const actorExampleSchemaClassNames = {
8
+ ROOT: 'actor-example-schema',
9
+ };
10
+ const ActorExampleSchemaWrapper = styled.div `
11
+ width: 100%;
12
+ padding: ${theme.space.space16};
13
+ background-color: ${theme.color.neutral.background};
14
+ border-radius: 1rem;
15
+ display: flex;
16
+ flex-direction: column;
17
+ flex-grow: 1;
18
+ gap: ${theme.space.space16};
19
+ `;
20
+ export const ActorExampleSchema = ({ fields, canCollapse = false, className, LeadingSlot }) => {
21
+ const [collapsedFields, setCollapsedFields] = useState([]);
22
+ const handleToggleCollapse = (id) => {
23
+ setCollapsedFields((current) => (current.includes(id)
24
+ ? current.filter((currentId) => currentId !== id)
25
+ : [...current, id]));
26
+ };
27
+ return (_jsx(ActorExampleSchemaWrapper, { className: clsx(actorExampleSchemaClassNames.ROOT, className), children: fields.map((field) => (_jsx(ActorExampleSchemaField, { field: field, canCollapse: canCollapse, collapsedFields: collapsedFields, onToggleCollapsed: handleToggleCollapse, leadingSlot: LeadingSlot ? _jsx(LeadingSlot, { field: field }) : undefined }, field._id))) }));
28
+ };
29
+ //# sourceMappingURL=actor_example_schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_schema.js","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_schema.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAIvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,CAAC,MAAM,4BAA4B,GAAG;IACxC,IA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@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ActorExampleSchemaFieldSerialized } from '@apify-packages/types';
3
+ export declare const actorExampleSchemaFieldClassNames: {
4
+ FIELD: string;
5
+ CHILDREN: string;
6
+ };
7
+ type Props = {
8
+ field: ActorExampleSchemaFieldSerialized;
9
+ collapsedFields: string[];
10
+ canCollapse?: boolean;
11
+ onToggleCollapsed: (id: string) => void;
12
+ depth?: number;
13
+ className?: string;
14
+ /** Slot rendered on the outer property only — nested children render plain. */
15
+ leadingSlot?: ReactNode;
16
+ };
17
+ export declare const ActorExampleSchemaField: ({ field, collapsedFields, canCollapse, onToggleCollapsed, depth, className, leadingSlot, }: Props) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=actor_example_schema_field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_schema_field.d.ts","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_schema_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAK/E,eAAO,MAAM,iCAAiC;;;CAG7C,CAAC;AAmBF,KAAK,KAAK,GAAG;IACT,KAAK,EAAE,iCAAiC,CAAC;IACzC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,4FAQrC,KAAK,4CAiCP,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import styled from 'styled-components';
4
+ import { theme } from '../../design_system/theme.js';
5
+ import { ActorExampleSchemaProperty } from './actor_example_schema_property.js';
6
+ export const actorExampleSchemaFieldClassNames = {
7
+ FIELD: 'actor-example-schema-field',
8
+ CHILDREN: 'actor-example-schema-field__children',
9
+ };
10
+ const ActorExampleSchemaFieldWrapper = styled.div `
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: ${theme.space.space8};
14
+
15
+ .${actorExampleSchemaFieldClassNames.CHILDREN} {
16
+ margin-left: ${({ $canCollapse }) => ($canCollapse ? '5.6rem' : '2.8rem')};
17
+ padding-left: 0.8rem;
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: ${theme.space.space8};
21
+ border-left: 1px solid ${theme.color.neutral.border};
22
+ }
23
+ `;
24
+ const MAX_SCHEMA_FIELD_DEPTH = 1;
25
+ export const ActorExampleSchemaField = ({ field, collapsedFields, canCollapse = false, onToggleCollapsed, depth = 0, className, leadingSlot, }) => {
26
+ const subfields = field.properties ?? field.items ?? [];
27
+ const isCollapsed = collapsedFields.includes(field._id);
28
+ if (subfields.length === 0 || depth >= MAX_SCHEMA_FIELD_DEPTH) {
29
+ return _jsx(ActorExampleSchemaProperty, { ...field, className: className, leadingSlot: leadingSlot });
30
+ }
31
+ return (_jsxs(ActorExampleSchemaFieldWrapper, { "$canCollapse": canCollapse, className: clsx(actorExampleSchemaFieldClassNames.FIELD, className), children: [_jsx(ActorExampleSchemaProperty, { ...field, isCollapsable: canCollapse, isCollapsed: isCollapsed, onToggleCollapsed: onToggleCollapsed, leadingSlot: leadingSlot }), !isCollapsed && (_jsx("div", { className: actorExampleSchemaFieldClassNames.CHILDREN, children: subfields.map((subfield) => (_jsx(ActorExampleSchemaField, { field: subfield, collapsedFields: collapsedFields, canCollapse: canCollapse, onToggleCollapsed: onToggleCollapsed, depth: depth + 1 }, subfield._id))) }))] }));
32
+ };
33
+ //# sourceMappingURL=actor_example_schema_field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_schema_field.js","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_schema_field.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAIvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC7C,KAAK,EAAE,4BAA4B;IACnC,QAAQ,EAAE,sCAAsC;CACnD,CAAC;AAEF,MAAM,8BAA8B,GAAG,MAAM,CAAC,GAAG,CAA2B;;;WAGjE,KAAK,CAAC,KAAK,CAAC,MAAM;;OAEtB,iCAAiC,CAAC,QAAQ;uBAC1B,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;;;;eAIlE,KAAK,CAAC,KAAK,CAAC,MAAM;iCACA,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;;CAE1D,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAajC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACpC,KAAK,EACL,eAAe,EACf,WAAW,GAAG,KAAK,EACnB,iBAAiB,EACjB,KAAK,GAAG,CAAC,EACT,SAAS,EACT,WAAW,GACP,EAAE,EAAE;IACR,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;IACxD,MAAM,WAAW,GAAG,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,IAAI,sBAAsB,EAAE,CAAC;QAC5D,OAAO,KAAC,0BAA0B,OAAK,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,GAAI,CAAC;IACrG,CAAC;IAED,OAAO,CACH,MAAC,8BAA8B,oBAAe,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,iCAAiC,CAAC,KAAK,EAAE,SAAS,CAAC,aAC1H,KAAC,0BAA0B,OACnB,KAAK,EACT,aAAa,EAAE,WAAW,EAC1B,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,GAC1B,EACD,CAAC,WAAW,IAAI,CACb,cAAK,SAAS,EAAE,iCAAiC,CAAC,QAAQ,YACrD,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CACzB,KAAC,uBAAuB,IAEpB,KAAK,EAAE,QAAQ,EACf,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,KAAK,EAAE,KAAK,GAAG,CAAC,IALX,QAAQ,CAAC,GAAG,CAMnB,CACL,CAAC,GACA,CACT,IAC4B,CACpC,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ActorExampleSchemaFieldType } from '@apify-packages/types';
2
+ type Props = {
3
+ type?: ActorExampleSchemaFieldType;
4
+ title: string;
5
+ className?: string;
6
+ };
7
+ export declare const ActorExampleSchemaFieldBadge: ({ type, title, className }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=actor_example_schema_field_badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_schema_field_badge.d.ts","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_schema_field_badge.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AA6CzE,KAAK,KAAK,GAAG;IACT,IAAI,CAAC,EAAE,2BAA2B,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,4BAA4B,KAAK,4CAQ7E,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import styled from 'styled-components';
3
+ import { theme } from '../../design_system/theme.js';
4
+ import { actorExampleSchemaPropertyDefaultIcon, actorExampleSchemaPropertyMap } from './actor_example.utils.js';
5
+ // Per-type colour variables consumed via `var(--actor-schema-field-*)` in `actor_example.utils.ts`.
6
+ // Declared on this wrapper itself (rather than `:root`) so the badge is self-contained — no
7
+ // host-app globals required. Dark-mode overrides hook into the existing `html[data-theme='dark']`
8
+ // theming switch via a parent-selector cascade.
9
+ const ActorExampleSchemaFieldBadgeWrapper = styled.div `
10
+ --actor-schema-field-string-text: #018181;
11
+ --actor-schema-field-string-background: #EBFBF8;
12
+ --actor-schema-field-number-text: #8C4E02;
13
+ --actor-schema-field-number-background: #F9F0DB;
14
+ --actor-schema-field-boolean-text: #104B37;
15
+ --actor-schema-field-boolean-background: #DFFFF0;
16
+ --actor-schema-field-object-text: #4C41C0;
17
+ --actor-schema-field-object-background: #E8E6F9;
18
+ --actor-schema-field-array-text: #0043CA;
19
+ --actor-schema-field-array-background: #E0EBFF;
20
+
21
+ html[data-theme='dark'] & {
22
+ --actor-schema-field-string-text: #84F5E5;
23
+ --actor-schema-field-string-background: #0F2E2A;
24
+ --actor-schema-field-number-text: #FFD761;
25
+ --actor-schema-field-number-background: #5D2E0E;
26
+ --actor-schema-field-boolean-text: #A3E8CF;
27
+ --actor-schema-field-boolean-background: #0B3225;
28
+ --actor-schema-field-object-text: #A08CF2;
29
+ --actor-schema-field-object-background: #2A2544;
30
+ --actor-schema-field-array-text: #97BCFF;
31
+ --actor-schema-field-array-background: #152447;
32
+ }
33
+
34
+ width: 2rem;
35
+ height: 2rem;
36
+ color: ${({ $type }) => ($type ? actorExampleSchemaPropertyMap[$type].textColor : theme.color.neutral.text)};
37
+ background-color: ${({ $type }) => ($type ? actorExampleSchemaPropertyMap[$type].backgroundColor : theme.color.neutral.backgroundSubtle)};
38
+ border-radius: ${theme.radius.radius4};
39
+ display: flex;
40
+ flex-shrink: 0;
41
+ align-items: center;
42
+ justify-content: center;
43
+ `;
44
+ export const ActorExampleSchemaFieldBadge = ({ type, title, className }) => {
45
+ const Icon = (type ? actorExampleSchemaPropertyMap[type]?.Icon : undefined) ?? actorExampleSchemaPropertyDefaultIcon;
46
+ return (_jsx(ActorExampleSchemaFieldBadgeWrapper, { "$type": type, className: className, children: _jsx(Icon, { size: '12', title: title }) }));
47
+ };
48
+ //# sourceMappingURL=actor_example_schema_field_badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_schema_field_badge.js","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_schema_field_badge.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAMvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,qCAAqC,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAEhH,oGAAoG;AACpG,4FAA4F;AAC5F,kGAAkG;AAClG,gDAAgD;AAChD,MAAM,mCAAmC,GAAG,MAAM,CAAC,GAAG,CAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2BlF,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;wBACvF,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC;qBACvH,KAAK,CAAC,MAAM,CAAC,OAAO;;;;;CAKxC,CAAC;AAQF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAS,EAAE,EAAE;IAC9E,MAAM,IAAI,GAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,6BAA6B,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,qCAAqC,CAAC;IAEpI,OAAO,CACH,KAAC,mCAAmC,aAAQ,IAAI,EAAE,SAAS,EAAE,SAAS,YAClE,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAE,KAAK,GAAI,GACE,CACzC,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const actorExampleSchemaLegendClassNames: {
2
+ ROOT: string;
3
+ ITEM: string;
4
+ };
5
+ type Props = {
6
+ className?: string;
7
+ };
8
+ export declare const ActorExampleSchemaLegend: ({ className }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=actor_example_schema_legend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_schema_legend.d.ts","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_schema_legend.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,kCAAkC;;;CAG9C,CAAC;AAeF,KAAK,KAAK,GAAG;IACT,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,eAAe,KAAK,4CAY5D,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import styled from 'styled-components';
4
+ import { theme } from '../../design_system/theme.js';
5
+ import { Text } from '../text/index.js';
6
+ import { actorExampleSchemaPropertyMap } from './actor_example.utils.js';
7
+ import { ActorExampleSchemaFieldBadge } from './actor_example_schema_field_badge.js';
8
+ const LEGEND_TYPE_ORDER = ['string', 'number', 'boolean', 'array', 'object'];
9
+ export const actorExampleSchemaLegendClassNames = {
10
+ ROOT: 'actor-example-schema-legend',
11
+ ITEM: 'actor-example-schema-legend__item',
12
+ };
13
+ const ActorExampleSchemaLegendWrapper = styled.div `
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ align-items: center;
17
+ gap: ${theme.space.space12};
18
+
19
+ .${actorExampleSchemaLegendClassNames.ITEM} {
20
+ display: inline-flex;
21
+ align-items: center;
22
+ gap: ${theme.space.space4};
23
+ }
24
+ `;
25
+ export const ActorExampleSchemaLegend = ({ className }) => (_jsx(ActorExampleSchemaLegendWrapper, { className: clsx(actorExampleSchemaLegendClassNames.ROOT, className), children: LEGEND_TYPE_ORDER.map((type) => {
26
+ const config = actorExampleSchemaPropertyMap[type];
27
+ return (_jsxs("span", { className: actorExampleSchemaLegendClassNames.ITEM, children: [_jsx(ActorExampleSchemaFieldBadge, { type: type, title: config.title }), _jsx(Text, { as: 'span', size: 'small', weight: 'medium', children: config.title })] }, type));
28
+ }) }));
29
+ //# sourceMappingURL=actor_example_schema_legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actor_example_schema_legend.js","sourceRoot":"","sources":["../../../../src/components/actor_example/actor_example_schema_legend.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAIvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAErF,MAAM,iBAAiB,GAAkC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAE5G,MAAM,CAAC,MAAM,kCAAkC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