@flamingo-stack/openframe-frontend-core 0.0.568 → 0.0.569
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/dist/{chunk-P7QGTNEW.cjs → chunk-2DSDGWWU.cjs} +101 -101
- package/dist/{chunk-P7QGTNEW.cjs.map → chunk-2DSDGWWU.cjs.map} +1 -1
- package/dist/{chunk-ZARYIFCI.js → chunk-3UPQAOES.js} +5 -3
- package/dist/{chunk-ZARYIFCI.js.map → chunk-3UPQAOES.js.map} +1 -1
- package/dist/{chunk-KL6ZDLDF.js → chunk-4NN7V443.js} +2 -2
- package/dist/{chunk-G2PAUMV6.js → chunk-6STF67EF.js} +4 -4
- package/dist/{chunk-6RSKK4E7.cjs → chunk-74DB5H5T.cjs} +1258 -1162
- package/dist/chunk-74DB5H5T.cjs.map +1 -0
- package/dist/{chunk-6TDWCBQM.js → chunk-A2T266F3.js} +7 -7
- package/dist/{chunk-HKG7BZON.cjs → chunk-AAROYQ4O.cjs} +14 -14
- package/dist/{chunk-HKG7BZON.cjs.map → chunk-AAROYQ4O.cjs.map} +1 -1
- package/dist/{chunk-CEAAOVCV.cjs → chunk-AJPGQCZ2.cjs} +1 -1
- package/dist/chunk-AJPGQCZ2.cjs.map +1 -0
- package/dist/{chunk-ZXASQL3E.js → chunk-C5GKBUT7.js} +4 -4
- package/dist/{chunk-RBYMJF2V.cjs → chunk-D6SBYELJ.cjs} +35 -35
- package/dist/{chunk-RBYMJF2V.cjs.map → chunk-D6SBYELJ.cjs.map} +1 -1
- package/dist/{chunk-LNUXUOPN.cjs → chunk-EBE22KOQ.cjs} +4 -4
- package/dist/{chunk-LNUXUOPN.cjs.map → chunk-EBE22KOQ.cjs.map} +1 -1
- package/dist/{chunk-EYXZF46V.js → chunk-FE5QR7PT.js} +995 -899
- package/dist/chunk-FE5QR7PT.js.map +1 -0
- package/dist/{chunk-6PWUUWCO.cjs → chunk-FMWIA5IH.cjs} +42 -42
- package/dist/{chunk-6PWUUWCO.cjs.map → chunk-FMWIA5IH.cjs.map} +1 -1
- package/dist/{chunk-DHTT77AG.cjs → chunk-GY22CIEF.cjs} +78 -78
- package/dist/{chunk-DHTT77AG.cjs.map → chunk-GY22CIEF.cjs.map} +1 -1
- package/dist/{chunk-O3JCKEVG.js → chunk-HOMYI5RR.js} +2 -2
- package/dist/{chunk-BZ7B255K.js → chunk-KCAGMTJ6.js} +9 -9
- package/dist/{chunk-DZ2Z7HRF.js → chunk-KO333Q2B.js} +3 -3
- package/dist/{chunk-MQQM4NCN.js → chunk-LJBNHO6B.js} +3 -3
- package/dist/{chunk-KZS2DFC2.cjs → chunk-ME346OJF.cjs} +42 -42
- package/dist/{chunk-KZS2DFC2.cjs.map → chunk-ME346OJF.cjs.map} +1 -1
- package/dist/{chunk-UWY722RH.js → chunk-MR6RRXSD.js} +1 -1
- package/dist/chunk-MR6RRXSD.js.map +1 -0
- package/dist/{chunk-ZIZJDXUI.js → chunk-MZG3QQUR.js} +2 -2
- package/dist/{chunk-HB3IG2MC.js → chunk-OS5RFMW5.js} +3 -3
- package/dist/{chunk-VEXTUGUA.js → chunk-OWCN3BM6.js} +7 -7
- package/dist/{chunk-QVQLNKFS.js → chunk-P7ZENKIA.js} +2 -2
- package/dist/{chunk-T7AE7CKV.cjs → chunk-PCL6WYYT.cjs} +7 -7
- package/dist/{chunk-T7AE7CKV.cjs.map → chunk-PCL6WYYT.cjs.map} +1 -1
- package/dist/{chunk-2LKVYI7H.js → chunk-PLJAOZYZ.js} +6 -6
- package/dist/{chunk-L22CSZZU.cjs → chunk-QY3VTOB6.cjs} +18 -18
- package/dist/{chunk-L22CSZZU.cjs.map → chunk-QY3VTOB6.cjs.map} +1 -1
- package/dist/{chunk-Y2BYHTEN.cjs → chunk-SMW5Z4NW.cjs} +23 -23
- package/dist/{chunk-Y2BYHTEN.cjs.map → chunk-SMW5Z4NW.cjs.map} +1 -1
- package/dist/{chunk-LXWQLUBR.cjs → chunk-SW3K3JSP.cjs} +9 -7
- package/dist/chunk-SW3K3JSP.cjs.map +1 -0
- package/dist/{chunk-NKEOD2AD.cjs → chunk-TDYTAED2.cjs} +3 -3
- package/dist/{chunk-NKEOD2AD.cjs.map → chunk-TDYTAED2.cjs.map} +1 -1
- package/dist/{chunk-ZNEVGXMU.js → chunk-TXEI4PES.js} +112 -4
- package/dist/chunk-TXEI4PES.js.map +1 -0
- package/dist/{chunk-KZ3PIUCH.cjs → chunk-VNE2EHCD.cjs} +14 -14
- package/dist/{chunk-KZ3PIUCH.cjs.map → chunk-VNE2EHCD.cjs.map} +1 -1
- package/dist/{chunk-6I76UK2Z.cjs → chunk-XMECOGLY.cjs} +3 -3
- package/dist/{chunk-6I76UK2Z.cjs.map → chunk-XMECOGLY.cjs.map} +1 -1
- package/dist/{chunk-NK3M6F5A.cjs → chunk-Z3SRMLMK.cjs} +121 -13
- package/dist/chunk-Z3SRMLMK.cjs.map +1 -0
- package/dist/components/case-studies/index.cjs +10 -10
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/index.cjs +4 -17
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +3 -16
- package/dist/components/chat/utils/index.d.ts +0 -2
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/claude-embed.d.ts +15 -8
- package/dist/components/embeds/claude-embed.d.ts.map +1 -1
- package/dist/components/embeds/embed-viewer-frame.d.ts +8 -1
- package/dist/components/embeds/embed-viewer-frame.d.ts.map +1 -1
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +25 -25
- package/dist/components/help-center-pages/index.js +16 -16
- package/dist/components/index.cjs +142 -154
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +14 -26
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +36 -36
- package/dist/components/meeting-scheduler/index.js +5 -5
- package/dist/components/navigation/index.cjs +4 -4
- package/dist/components/navigation/index.js +3 -3
- package/dist/components/onboarding-guides/index.cjs +8 -8
- package/dist/components/onboarding-guides/index.js +7 -7
- package/dist/components/related-content/index.cjs +6 -6
- package/dist/components/related-content/index.js +5 -5
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +4 -16
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +3 -15
- package/dist/components/ui/markdown/sanitize.d.ts.map +1 -1
- package/dist/components/ui/table/table.d.ts +1 -1
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/table/types.d.ts +9 -0
- package/dist/components/ui/table/types.d.ts.map +1 -1
- package/dist/contexts/endpoints-runtime-context.d.ts +6 -0
- package/dist/contexts/endpoints-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +5 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/use-claude-mirror-src.d.ts +17 -0
- package/dist/hooks/use-claude-mirror-src.d.ts.map +1 -0
- package/dist/index.cjs +10 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -13
- package/dist/utils/embed-proxy-auth-storage.d.ts.map +1 -1
- package/dist/utils/embed-url-converters.d.ts +20 -0
- package/dist/utils/embed-url-converters.d.ts.map +1 -1
- package/dist/utils/fullscreen-switch.d.ts +85 -0
- package/dist/utils/fullscreen-switch.d.ts.map +1 -0
- package/dist/utils/index.cjs +114 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +113 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/hooks/use-chat-attachments.ts +3 -3
- package/src/components/chat/hooks/use-chat-history-hydration.ts +2 -2
- package/src/components/chat/hooks/use-chat-identity.ts +5 -5
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +3 -3
- package/src/components/chat/utils/.index.md +1 -2
- package/src/components/chat/utils/chat-conversation-storage.ts +2 -2
- package/src/components/chat/utils/index.ts +3 -10
- package/src/components/embeds/claude-embed.tsx +41 -14
- package/src/components/embeds/embed-viewer-frame.tsx +77 -4
- package/src/components/ui/markdown/__tests__/sanitize-invariant.test.ts +30 -0
- package/src/components/ui/markdown/rich/__tests__/shortcodes.test.ts +8 -0
- package/src/components/ui/markdown/sanitize.ts +4 -0
- package/src/components/ui/table/table.tsx +7 -2
- package/src/components/ui/table/types.ts +9 -0
- package/src/contexts/endpoints-runtime-context.tsx +6 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/use-claude-mirror-src.ts +43 -0
- package/src/utils/.embed-proxy-auth-storage.md +2 -2
- package/src/utils/embed-proxy-auth-storage.ts +19 -14
- package/src/utils/embed-url-converters.ts +45 -0
- package/src/utils/fullscreen-switch.ts +180 -0
- package/src/utils/index.ts +8 -6
- package/dist/chunk-6RSKK4E7.cjs.map +0 -1
- package/dist/chunk-CEAAOVCV.cjs.map +0 -1
- package/dist/chunk-EYXZF46V.js.map +0 -1
- package/dist/chunk-LXWQLUBR.cjs.map +0 -1
- package/dist/chunk-NK3M6F5A.cjs.map +0 -1
- package/dist/chunk-UWY722RH.js.map +0 -1
- package/dist/chunk-ZNEVGXMU.js.map +0 -1
- package/dist/components/chat/utils/chat-authed-fetch.d.ts +0 -15
- package/dist/components/chat/utils/chat-authed-fetch.d.ts.map +0 -1
- package/dist/components/chat/utils/chat-proxy-auth-storage.d.ts +0 -16
- package/dist/components/chat/utils/chat-proxy-auth-storage.d.ts.map +0 -1
- package/src/components/chat/utils/.chat-authed-fetch.md +0 -25
- package/src/components/chat/utils/.chat-proxy-auth-storage.md +0 -38
- package/src/components/chat/utils/chat-authed-fetch.ts +0 -17
- package/src/components/chat/utils/chat-proxy-auth-storage.ts +0 -25
- /package/dist/{chunk-KL6ZDLDF.js.map → chunk-4NN7V443.js.map} +0 -0
- /package/dist/{chunk-G2PAUMV6.js.map → chunk-6STF67EF.js.map} +0 -0
- /package/dist/{chunk-6TDWCBQM.js.map → chunk-A2T266F3.js.map} +0 -0
- /package/dist/{chunk-ZXASQL3E.js.map → chunk-C5GKBUT7.js.map} +0 -0
- /package/dist/{chunk-O3JCKEVG.js.map → chunk-HOMYI5RR.js.map} +0 -0
- /package/dist/{chunk-BZ7B255K.js.map → chunk-KCAGMTJ6.js.map} +0 -0
- /package/dist/{chunk-DZ2Z7HRF.js.map → chunk-KO333Q2B.js.map} +0 -0
- /package/dist/{chunk-MQQM4NCN.js.map → chunk-LJBNHO6B.js.map} +0 -0
- /package/dist/{chunk-ZIZJDXUI.js.map → chunk-MZG3QQUR.js.map} +0 -0
- /package/dist/{chunk-HB3IG2MC.js.map → chunk-OS5RFMW5.js.map} +0 -0
- /package/dist/{chunk-VEXTUGUA.js.map → chunk-OWCN3BM6.js.map} +0 -0
- /package/dist/{chunk-QVQLNKFS.js.map → chunk-P7ZENKIA.js.map} +0 -0
- /package/dist/{chunk-2LKVYI7H.js.map → chunk-PLJAOZYZ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -297,6 +297,7 @@ import {
|
|
|
297
297
|
FloatingWalkthroughVideo,
|
|
298
298
|
FormLoader,
|
|
299
299
|
FormPageContainer,
|
|
300
|
+
FullscreenSwitchController,
|
|
300
301
|
GENERIC_EMAIL_DOMAINS,
|
|
301
302
|
GenericEntityCard,
|
|
302
303
|
GenericEntityCardSkeleton,
|
|
@@ -909,7 +910,6 @@ import {
|
|
|
909
910
|
isApprovalNotification,
|
|
910
911
|
isCrossOriginUrl,
|
|
911
912
|
isDismissedCookieValue,
|
|
912
|
-
isFigmaSlidesUrl,
|
|
913
913
|
isGenericDomain,
|
|
914
914
|
isGenericWebsiteDomain,
|
|
915
915
|
isGuideApproval,
|
|
@@ -1008,12 +1008,7 @@ import {
|
|
|
1008
1008
|
tagVariants,
|
|
1009
1009
|
tintOnDark,
|
|
1010
1010
|
titleCaseFromSlug,
|
|
1011
|
-
toClaudeEmbedUrl,
|
|
1012
1011
|
toDocSlug,
|
|
1013
|
-
toFigmaEmbedUrl,
|
|
1014
|
-
toFigmaOriginalUrl,
|
|
1015
|
-
toGoogleSheetsEmbedUrl,
|
|
1016
|
-
toGoogleSheetsOriginalUrl,
|
|
1017
1012
|
toStripProfile,
|
|
1018
1013
|
toToolLabel,
|
|
1019
1014
|
toggleVariants,
|
|
@@ -1079,7 +1074,7 @@ import {
|
|
|
1079
1074
|
withFirstTouchAttribution,
|
|
1080
1075
|
withWalkthroughOpenParam,
|
|
1081
1076
|
writeDismissCookie
|
|
1082
|
-
} from "./chunk-
|
|
1077
|
+
} from "./chunk-FE5QR7PT.js";
|
|
1083
1078
|
import "./chunk-7EUIW46X.js";
|
|
1084
1079
|
import "./chunk-LXC6P2EO.js";
|
|
1085
1080
|
import "./chunk-EL5YVPD5.js";
|
|
@@ -1136,6 +1131,7 @@ import {
|
|
|
1136
1131
|
getSmallPlatformIcon,
|
|
1137
1132
|
introspector,
|
|
1138
1133
|
isBlankLine,
|
|
1134
|
+
isFigmaSlidesUrl,
|
|
1139
1135
|
isInputObjectType,
|
|
1140
1136
|
isScalarType,
|
|
1141
1137
|
mergeDefaults,
|
|
@@ -1163,6 +1159,12 @@ import {
|
|
|
1163
1159
|
slugifyHeadingText,
|
|
1164
1160
|
splitCsvEnv,
|
|
1165
1161
|
stripHeadingEmojis,
|
|
1162
|
+
toClaudeEmbedUrl,
|
|
1163
|
+
toClaudeMirrorPath,
|
|
1164
|
+
toFigmaEmbedUrl,
|
|
1165
|
+
toFigmaOriginalUrl,
|
|
1166
|
+
toGoogleSheetsEmbedUrl,
|
|
1167
|
+
toGoogleSheetsOriginalUrl,
|
|
1166
1168
|
toast,
|
|
1167
1169
|
toolLabels,
|
|
1168
1170
|
transformPlatformConfigsToOptions,
|
|
@@ -1174,6 +1176,7 @@ import {
|
|
|
1174
1176
|
useAuthenticatedImage,
|
|
1175
1177
|
useAutoLimitTags,
|
|
1176
1178
|
useBatchImages,
|
|
1179
|
+
useClaudeMirrorSrc,
|
|
1177
1180
|
useContactSubmission,
|
|
1178
1181
|
useCopyToClipboard,
|
|
1179
1182
|
useCursorPaginationState,
|
|
@@ -1217,7 +1220,7 @@ import {
|
|
|
1217
1220
|
validateSchema,
|
|
1218
1221
|
validateVariables,
|
|
1219
1222
|
variablesToUrlParams
|
|
1220
|
-
} from "./chunk-
|
|
1223
|
+
} from "./chunk-TXEI4PES.js";
|
|
1221
1224
|
import "./chunk-ZJJERZUA.js";
|
|
1222
1225
|
import {
|
|
1223
1226
|
AboutIcon,
|
|
@@ -1378,7 +1381,7 @@ import {
|
|
|
1378
1381
|
PLAY_ICON_PATH
|
|
1379
1382
|
} from "./chunk-JMZH4KMJ.js";
|
|
1380
1383
|
import "./chunk-W72U7OU7.js";
|
|
1381
|
-
import "./chunk-
|
|
1384
|
+
import "./chunk-MR6RRXSD.js";
|
|
1382
1385
|
import {
|
|
1383
1386
|
Checkbox,
|
|
1384
1387
|
DropdownMenu,
|
|
@@ -1794,6 +1797,7 @@ export {
|
|
|
1794
1797
|
FolderShieldIcon,
|
|
1795
1798
|
FormLoader,
|
|
1796
1799
|
FormPageContainer,
|
|
1800
|
+
FullscreenSwitchController,
|
|
1797
1801
|
G2Icon,
|
|
1798
1802
|
GENERIC_EMAIL_DOMAINS,
|
|
1799
1803
|
GenericEntityCard,
|
|
@@ -2352,13 +2356,11 @@ export {
|
|
|
2352
2356
|
captureFirstTouchAttribution,
|
|
2353
2357
|
cardAwareUrlTransform,
|
|
2354
2358
|
changelogLabels,
|
|
2355
|
-
embedAuthedFetch as chatAuthedFetch,
|
|
2356
2359
|
chatChipClass,
|
|
2357
2360
|
cleanEmailDomain,
|
|
2358
2361
|
clearAnnouncementDismissals,
|
|
2359
2362
|
clearAuthedAssetCache,
|
|
2360
2363
|
clearAuthedImageCache,
|
|
2361
|
-
clearEmbedProxyAuth as clearChatProxyAuth,
|
|
2362
2364
|
clearDismissCookie,
|
|
2363
2365
|
clearEmbedProxyAuth,
|
|
2364
2366
|
clearFirstTouchAttribution,
|
|
@@ -2486,7 +2488,6 @@ export {
|
|
|
2486
2488
|
getBaseUrl,
|
|
2487
2489
|
getBestContrastColor,
|
|
2488
2490
|
getCaptionsUrl,
|
|
2489
|
-
getEmbedProxyAuth as getChatProxyAuth,
|
|
2490
2491
|
getCommandText,
|
|
2491
2492
|
getConfidenceBgClass,
|
|
2492
2493
|
getConfidenceBorderClass,
|
|
@@ -2678,7 +2679,6 @@ export {
|
|
|
2678
2679
|
schedulingAudienceKey,
|
|
2679
2680
|
scrollElementIntoView,
|
|
2680
2681
|
serializeJsonLd,
|
|
2681
|
-
setEmbedProxyAuth as setChatProxyAuth,
|
|
2682
2682
|
setEmbedAuthAdapter,
|
|
2683
2683
|
setEmbedProxyAuth,
|
|
2684
2684
|
setNestedValue,
|
|
@@ -2705,6 +2705,7 @@ export {
|
|
|
2705
2705
|
tintOnDark,
|
|
2706
2706
|
titleCaseFromSlug,
|
|
2707
2707
|
toClaudeEmbedUrl,
|
|
2708
|
+
toClaudeMirrorPath,
|
|
2708
2709
|
toDocSlug,
|
|
2709
2710
|
toFigmaEmbedUrl,
|
|
2710
2711
|
toFigmaOriginalUrl,
|
|
@@ -2740,6 +2741,7 @@ export {
|
|
|
2740
2741
|
useChatIdentity,
|
|
2741
2742
|
useChatStreamReducer,
|
|
2742
2743
|
useChunkCatchup,
|
|
2744
|
+
useClaudeMirrorSrc,
|
|
2743
2745
|
useCloseOnNavigation,
|
|
2744
2746
|
useCollapsible,
|
|
2745
2747
|
useConfirm,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed-proxy-auth-storage.d.ts","sourceRoot":"","sources":["../../src/utils/embed-proxy-auth-storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embed-proxy-auth-storage.d.ts","sourceRoot":"","sources":["../../src/utils/embed-proxy-auth-storage.ts"],"names":[],"mappings":"AA8CA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb;;2EAEuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAwCD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,IAAI,CAUzD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAGtD;AAED;gDACgD;AAChD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAQ7D;AAED,gCAAgC;AAChC,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA0C,GAC3E;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAelD"}
|
|
@@ -13,6 +13,26 @@ export declare function toFigmaEmbedUrl(url: string, opts?: {
|
|
|
13
13
|
}): string;
|
|
14
14
|
export declare function isFigmaSlidesUrl(url: string): boolean;
|
|
15
15
|
export declare function toFigmaOriginalUrl(url: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* The self-hosted MIRROR url for a claude artifact url — the whole
|
|
18
|
+
* mirror mechanism is UNDER THE HOOD: the viewer detects a claude url,
|
|
19
|
+
* DERIVES the mirror location from the artifact's own id under the
|
|
20
|
+
* host's configured storage-view proxy base, and frames the downloaded
|
|
21
|
+
* copy from there. No per-link data, no props, no shortcode changes —
|
|
22
|
+
* 100% transparent to every consumer.
|
|
23
|
+
*
|
|
24
|
+
* `storageViewBaseUrl` comes from `EndpointsRuntime` — the SAME
|
|
25
|
+
* host-overridable proxy-path mechanism every other lib→API call uses
|
|
26
|
+
* (a reverse-proxied embedder remaps it; a host without the proxy omits
|
|
27
|
+
* it and gets `null` here, i.e. no mirror leg at all).
|
|
28
|
+
*
|
|
29
|
+
* `null` when the base is absent or the url carries no artifact id. The
|
|
30
|
+
* derived url is the configured base + a validated uuid — safe as a
|
|
31
|
+
* frame source without further checks. KEEP THE OBJECT NAMING IN SYNC
|
|
32
|
+
* with the hub's `lib/data/design-brief-mirror.cjs` (bucket +
|
|
33
|
+
* `<uuid>.html`) — that module owns the ingest/audit half.
|
|
34
|
+
*/
|
|
35
|
+
export declare function toClaudeMirrorPath(url: string | null | undefined, storageViewBaseUrl: string | null | undefined): string | null;
|
|
16
36
|
/**
|
|
17
37
|
* The EMBED url for a published Claude artifact, or `null` when the link is not
|
|
18
38
|
* one we can frame — the Claude counterpart of `toFigmaEmbedUrl`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed-url-converters.d.ts","sourceRoot":"","sources":["../../src/utils/embed-url-converters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU1D;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ7D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,GAC3C,MAAM,CA8BR;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAc9E"}
|
|
1
|
+
{"version":3,"file":"embed-url-converters.d.ts","sourceRoot":"","sources":["../../src/utils/embed-url-converters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU1D;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ7D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,GAC3C,MAAM,CA8BR;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,kBAAkB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC5C,MAAM,GAAG,IAAI,CAqBf;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAc9E"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FullscreenSwitchController — the ONE place fullscreen enter/exit lives.
|
|
3
|
+
*
|
|
4
|
+
* Framework-agnostic (no React): the consumer passes callbacks (and, for
|
|
5
|
+
* page-level surfaces, the <html> mask classes); the controller owns the
|
|
6
|
+
* Fullscreen API calls, webkit fallbacks, and the flicker-free switch
|
|
7
|
+
* choreography. Originally extracted from the hub's company-hub deck (PR
|
|
8
|
+
* #737); moved into the lib so EVERY fullscreen surface — the deck, the
|
|
9
|
+
* embed viewers — shares one implementation instead of re-deriving the
|
|
10
|
+
* event-ordering lessons below. The hub's `lib/utils/fullscreen-switch.ts`
|
|
11
|
+
* re-exports from here (extractItems shim precedent).
|
|
12
|
+
*
|
|
13
|
+
* Two shapes of consumer:
|
|
14
|
+
* - PAGE-LEVEL (the deck): no `target` — fullscreens
|
|
15
|
+
* `document.documentElement`, uses the mask classes + geometry pulses.
|
|
16
|
+
* - ELEMENT-LEVEL (embed viewers): pass `target` — fullscreens one
|
|
17
|
+
* element; classes/pulses are optional and simply skipped when absent.
|
|
18
|
+
*
|
|
19
|
+
* Invariants (each guards a bug found while building the deck's fullscreen):
|
|
20
|
+
* - Fullscreen STATE follows the fullscreenchange event exclusively (never
|
|
21
|
+
* set optimistically): Esc, keyboard shortcuts, buttons and browser
|
|
22
|
+
* chrome all converge on one listener.
|
|
23
|
+
* - The switching mask (when configured) goes up PRE-EMPTIVELY:
|
|
24
|
+
* Chrome/Safari PAINT resized frames BEFORE fullscreenchange fires
|
|
25
|
+
* (whatwg/fullscreen#74), so masking inside the change event is already
|
|
26
|
+
* too late. `toggle()` masks before requesting; an Escape keydown
|
|
27
|
+
* listener (capture) masks the one exit path that skips toggle(); the
|
|
28
|
+
* change event remains the fallback for browser-chrome-initiated
|
|
29
|
+
* transitions.
|
|
30
|
+
* - The swap is a multi-frame viewport animation (macOS especially): one
|
|
31
|
+
* rAF re-anchor is NOT enough. While masked, every resize fires
|
|
32
|
+
* onGeometryPulse (re-measure + re-anchor under a constant scrollY);
|
|
33
|
+
* quiet resizes for `quietMs` (or the `capMs` hard cap — a rejected
|
|
34
|
+
* fullscreen request after a pre-emptive mask must never wedge the mask
|
|
35
|
+
* up) end the switch.
|
|
36
|
+
*/
|
|
37
|
+
export interface FullscreenSwitchOptions {
|
|
38
|
+
/** The element to fullscreen. Omit for page-level surfaces (the deck):
|
|
39
|
+
* `document.documentElement` — window scrolling survives, which
|
|
40
|
+
* element-level fullscreen would freeze. A callback so refs resolve at
|
|
41
|
+
* toggle time, not construction time. */
|
|
42
|
+
target?: () => HTMLElement | null;
|
|
43
|
+
/** Held on <html> while fullscreen is ACTIVE (steady-state styling).
|
|
44
|
+
* Optional — element-level consumers style off their own state. */
|
|
45
|
+
activeClass?: string;
|
|
46
|
+
/** Held on <html> for the DURATION of an enter/exit swap (the
|
|
47
|
+
* mask/curtain). Optional — see `activeClass`. */
|
|
48
|
+
switchingClass?: string;
|
|
49
|
+
/** New fullscreen state, straight from the change event. For a `target`
|
|
50
|
+
* consumer this is "MY element is the fullscreen element". */
|
|
51
|
+
onFullscreenChange: (isFullscreen: boolean) => void;
|
|
52
|
+
/** Geometry moved under a constant scrollY — re-measure + re-anchor.
|
|
53
|
+
* Optional; fired once per resize during the swap and once more when
|
|
54
|
+
* the switch ends. */
|
|
55
|
+
onGeometryPulse?: () => void;
|
|
56
|
+
/** Switch ends after resizes have been quiet this long (default 200ms). */
|
|
57
|
+
quietMs?: number;
|
|
58
|
+
/** Hard cap on a switch, mask-wedge failsafe (default 1000ms). */
|
|
59
|
+
capMs?: number;
|
|
60
|
+
}
|
|
61
|
+
export declare class FullscreenSwitchController {
|
|
62
|
+
private readonly opts;
|
|
63
|
+
private quietTimer;
|
|
64
|
+
private capTimer;
|
|
65
|
+
private attached;
|
|
66
|
+
constructor(opts: FullscreenSwitchOptions);
|
|
67
|
+
/** SSR-safe feature detection — call post-mount to gate the affordance. */
|
|
68
|
+
static isSupported(): boolean;
|
|
69
|
+
get isFullscreen(): boolean;
|
|
70
|
+
attach(): void;
|
|
71
|
+
detach(): void;
|
|
72
|
+
/** Mask first (pre-emptive — see header), then request/exit. */
|
|
73
|
+
toggle: () => void;
|
|
74
|
+
/** Raise the mask + start tracking. Idempotent — safe from the pre-emptive
|
|
75
|
+
* paths (toggle, Escape) AND again from the change event. */
|
|
76
|
+
private beginSwitch;
|
|
77
|
+
private endSwitch;
|
|
78
|
+
private armQuiet;
|
|
79
|
+
private onResize;
|
|
80
|
+
/** Escape is the one exit path that skips toggle() — pre-mask on the
|
|
81
|
+
* keydown (capture phase), before the browser begins the swap. */
|
|
82
|
+
private onEscape;
|
|
83
|
+
private onChange;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=fullscreen-switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullscreen-switch.d.ts","sourceRoot":"","sources":["../../src/utils/fullscreen-switch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAaH,MAAM,WAAW,uBAAuB;IACtC;;;8CAG0C;IAC1C,MAAM,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,CAAA;IACjC;wEACoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;uDACmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;mEAC+D;IAC/D,kBAAkB,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAA;IACnD;;2BAEuB;IACvB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAKD,qBAAa,0BAA0B;IAKzB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJjC,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,QAAQ,CAAI;IACpB,OAAO,CAAC,QAAQ,CAAQ;gBAEK,IAAI,EAAE,uBAAuB;IAE1D,2EAA2E;IAC3E,MAAM,CAAC,WAAW,IAAI,OAAO;IAU7B,IAAI,YAAY,IAAI,OAAO,CAI1B;IAED,MAAM,IAAI,IAAI;IASd,MAAM,IAAI,IAAI;IAcd,gEAAgE;IAChE,MAAM,QAAO,IAAI,CAYhB;IAED;kEAC8D;IAC9D,OAAO,CAAC,WAAW,CAKlB;IAED,OAAO,CAAC,SAAS,CAMhB;IAED,OAAO,CAAC,QAAQ,CAGf;IAED,OAAO,CAAC,QAAQ,CAGf;IAED;uEACmE;IACnE,OAAO,CAAC,QAAQ,CAEf;IAED,OAAO,CAAC,QAAQ,CAOf;CACF"}
|
package/dist/utils/index.cjs
CHANGED
|
@@ -4305,6 +4305,103 @@ function extractItemId(type, item) {
|
|
|
4305
4305
|
return null;
|
|
4306
4306
|
}
|
|
4307
4307
|
|
|
4308
|
+
// src/utils/fullscreen-switch.ts
|
|
4309
|
+
var fullscreenElementOf = (doc) => doc.fullscreenElement ?? doc.webkitFullscreenElement ?? null;
|
|
4310
|
+
var DEFAULT_QUIET_MS = 200;
|
|
4311
|
+
var DEFAULT_CAP_MS = 1e3;
|
|
4312
|
+
var FullscreenSwitchController = class {
|
|
4313
|
+
constructor(opts) {
|
|
4314
|
+
this.opts = opts;
|
|
4315
|
+
this.quietTimer = 0;
|
|
4316
|
+
this.capTimer = 0;
|
|
4317
|
+
this.attached = false;
|
|
4318
|
+
/** Mask first (pre-emptive — see header), then request/exit. */
|
|
4319
|
+
this.toggle = () => {
|
|
4320
|
+
const doc = document;
|
|
4321
|
+
this.beginSwitch();
|
|
4322
|
+
if (fullscreenElementOf(doc)) {
|
|
4323
|
+
if (doc.exitFullscreen) doc.exitFullscreen().catch(() => {
|
|
4324
|
+
});
|
|
4325
|
+
else doc.webkitExitFullscreen?.();
|
|
4326
|
+
} else {
|
|
4327
|
+
const el = this.opts.target?.() ?? document.documentElement;
|
|
4328
|
+
if (el.requestFullscreen) el.requestFullscreen({ navigationUI: "hide" }).catch(() => {
|
|
4329
|
+
});
|
|
4330
|
+
else el.webkitRequestFullscreen?.();
|
|
4331
|
+
}
|
|
4332
|
+
};
|
|
4333
|
+
/** Raise the mask + start tracking. Idempotent — safe from the pre-emptive
|
|
4334
|
+
* paths (toggle, Escape) AND again from the change event. */
|
|
4335
|
+
this.beginSwitch = () => {
|
|
4336
|
+
if (this.opts.switchingClass) document.documentElement.classList.add(this.opts.switchingClass);
|
|
4337
|
+
window.addEventListener("resize", this.onResize);
|
|
4338
|
+
window.clearTimeout(this.capTimer);
|
|
4339
|
+
this.capTimer = window.setTimeout(this.endSwitch, this.opts.capMs ?? DEFAULT_CAP_MS);
|
|
4340
|
+
};
|
|
4341
|
+
this.endSwitch = () => {
|
|
4342
|
+
window.clearTimeout(this.quietTimer);
|
|
4343
|
+
window.clearTimeout(this.capTimer);
|
|
4344
|
+
window.removeEventListener("resize", this.onResize);
|
|
4345
|
+
this.opts.onGeometryPulse?.();
|
|
4346
|
+
if (this.opts.switchingClass) document.documentElement.classList.remove(this.opts.switchingClass);
|
|
4347
|
+
};
|
|
4348
|
+
this.armQuiet = () => {
|
|
4349
|
+
window.clearTimeout(this.quietTimer);
|
|
4350
|
+
this.quietTimer = window.setTimeout(this.endSwitch, this.opts.quietMs ?? DEFAULT_QUIET_MS);
|
|
4351
|
+
};
|
|
4352
|
+
this.onResize = () => {
|
|
4353
|
+
this.opts.onGeometryPulse?.();
|
|
4354
|
+
this.armQuiet();
|
|
4355
|
+
};
|
|
4356
|
+
/** Escape is the one exit path that skips toggle() — pre-mask on the
|
|
4357
|
+
* keydown (capture phase), before the browser begins the swap. */
|
|
4358
|
+
this.onEscape = (e) => {
|
|
4359
|
+
if (e.key === "Escape" && this.isFullscreen) this.beginSwitch();
|
|
4360
|
+
};
|
|
4361
|
+
this.onChange = () => {
|
|
4362
|
+
const fs = this.isFullscreen;
|
|
4363
|
+
if (this.opts.activeClass) document.documentElement.classList.toggle(this.opts.activeClass, fs);
|
|
4364
|
+
this.beginSwitch();
|
|
4365
|
+
requestAnimationFrame(() => this.opts.onGeometryPulse?.());
|
|
4366
|
+
this.armQuiet();
|
|
4367
|
+
this.opts.onFullscreenChange(fs);
|
|
4368
|
+
};
|
|
4369
|
+
}
|
|
4370
|
+
/** SSR-safe feature detection — call post-mount to gate the affordance. */
|
|
4371
|
+
static isSupported() {
|
|
4372
|
+
if (typeof document === "undefined") return false;
|
|
4373
|
+
const doc = document;
|
|
4374
|
+
const el = document.documentElement;
|
|
4375
|
+
return Boolean(el.requestFullscreen || el.webkitRequestFullscreen) && (doc.fullscreenEnabled ?? doc.webkitFullscreenEnabled ?? true) !== false;
|
|
4376
|
+
}
|
|
4377
|
+
get isFullscreen() {
|
|
4378
|
+
const fs = fullscreenElementOf(document);
|
|
4379
|
+
const target = this.opts.target?.();
|
|
4380
|
+
return target ? fs === target : Boolean(fs);
|
|
4381
|
+
}
|
|
4382
|
+
attach() {
|
|
4383
|
+
if (this.attached) return;
|
|
4384
|
+
this.attached = true;
|
|
4385
|
+
const doc = document;
|
|
4386
|
+
doc.addEventListener("fullscreenchange", this.onChange);
|
|
4387
|
+
doc.addEventListener("webkitfullscreenchange", this.onChange);
|
|
4388
|
+
window.addEventListener("keydown", this.onEscape, true);
|
|
4389
|
+
}
|
|
4390
|
+
detach() {
|
|
4391
|
+
if (!this.attached) return;
|
|
4392
|
+
this.attached = false;
|
|
4393
|
+
const doc = document;
|
|
4394
|
+
doc.removeEventListener("fullscreenchange", this.onChange);
|
|
4395
|
+
doc.removeEventListener("webkitfullscreenchange", this.onChange);
|
|
4396
|
+
window.removeEventListener("keydown", this.onEscape, true);
|
|
4397
|
+
window.removeEventListener("resize", this.onResize);
|
|
4398
|
+
window.clearTimeout(this.quietTimer);
|
|
4399
|
+
window.clearTimeout(this.capTimer);
|
|
4400
|
+
if (this.opts.activeClass) doc.documentElement.classList.remove(this.opts.activeClass);
|
|
4401
|
+
if (this.opts.switchingClass) doc.documentElement.classList.remove(this.opts.switchingClass);
|
|
4402
|
+
}
|
|
4403
|
+
};
|
|
4404
|
+
|
|
4308
4405
|
// src/utils/suggestion-url.ts
|
|
4309
4406
|
function buildSuggestionUrl(path, opts = {}) {
|
|
4310
4407
|
const qs = new URLSearchParams();
|
|
@@ -4657,6 +4754,21 @@ function toFigmaOriginalUrl(url) {
|
|
|
4657
4754
|
}
|
|
4658
4755
|
return url.replace(/\?.*$/, "");
|
|
4659
4756
|
}
|
|
4757
|
+
function toClaudeMirrorPath(url, storageViewBaseUrl) {
|
|
4758
|
+
if (!url || !storageViewBaseUrl) return null;
|
|
4759
|
+
try {
|
|
4760
|
+
const u = new URL(url);
|
|
4761
|
+
const host = u.hostname.toLowerCase();
|
|
4762
|
+
const id = host === "claude.ai" && /^\/(?:code\/artifact|public\/artifacts)\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[/?#]|$)/i.exec(
|
|
4763
|
+
u.pathname
|
|
4764
|
+
)?.[1] || host === "claude.site" && /^\/artifacts\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[/?#]|$)/i.exec(
|
|
4765
|
+
u.pathname
|
|
4766
|
+
)?.[1] || null;
|
|
4767
|
+
return id ? `${storageViewBaseUrl.replace(/\/$/, "")}/design-briefs/${id.toLowerCase()}.html` : null;
|
|
4768
|
+
} catch {
|
|
4769
|
+
return null;
|
|
4770
|
+
}
|
|
4771
|
+
}
|
|
4660
4772
|
function toClaudeEmbedUrl(url) {
|
|
4661
4773
|
if (!url) return null;
|
|
4662
4774
|
try {
|
|
@@ -4805,6 +4917,7 @@ exports.DESIGN_PALETTE = DESIGN_PALETTE;
|
|
|
4805
4917
|
exports.DEV_SECTION_PARAM_KEYS = DEV_SECTION_PARAM_KEYS;
|
|
4806
4918
|
exports.ELAPSED_MS_FIELD = ELAPSED_MS_FIELD;
|
|
4807
4919
|
exports.FIRST_TOUCH_ATTRIBUTION_KEY = FIRST_TOUCH_ATTRIBUTION_KEY;
|
|
4920
|
+
exports.FullscreenSwitchController = FullscreenSwitchController;
|
|
4808
4921
|
exports.GENERIC_EMAIL_DOMAINS = GENERIC_EMAIL_DOMAINS;
|
|
4809
4922
|
exports.HEADING_EMOJI_RE = HEADING_EMOJI_RE;
|
|
4810
4923
|
exports.HEX_PATTERN = HEX_PATTERN;
|
|
@@ -5050,6 +5163,7 @@ exports.stripHtml = stripHtml;
|
|
|
5050
5163
|
exports.stripInlineMarkdown = stripInlineMarkdown;
|
|
5051
5164
|
exports.titleCaseFromSlug = titleCaseFromSlug;
|
|
5052
5165
|
exports.toClaudeEmbedUrl = toClaudeEmbedUrl;
|
|
5166
|
+
exports.toClaudeMirrorPath = toClaudeMirrorPath;
|
|
5053
5167
|
exports.toDocSlug = toDocSlug;
|
|
5054
5168
|
exports.toFigmaEmbedUrl = toFigmaEmbedUrl;
|
|
5055
5169
|
exports.toFigmaOriginalUrl = toFigmaOriginalUrl;
|