@tryghost/activitypub 3.0.8 → 3.1.0
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/activitypub.js +2 -2
- package/dist/{at-sign-Fsk3x72r.mjs → at-sign-l8HMU0fk.mjs} +2 -2
- package/dist/{at-sign-Fsk3x72r.mjs.map → at-sign-l8HMU0fk.mjs.map} +1 -1
- package/dist/{avatar-flipboard-C10JfFS_.mjs → avatar-flipboard-D12yCmyH.mjs} +2 -2
- package/dist/{avatar-flipboard-C10JfFS_.mjs.map → avatar-flipboard-D12yCmyH.mjs.map} +1 -1
- package/dist/{bluesky-sharing-C1xeGSL6.mjs → bluesky-sharing-D65sfQFX.mjs} +4 -4
- package/dist/{bluesky-sharing-C1xeGSL6.mjs.map → bluesky-sharing-D65sfQFX.mjs.map} +1 -1
- package/dist/{copy-C1fElSkQ.mjs → copy-DCHXVz-9.mjs} +2 -2
- package/dist/{copy-C1fElSkQ.mjs.map → copy-DCHXVz-9.mjs.map} +1 -1
- package/dist/{deleted-feed-item-Bun4tY2_.mjs → deleted-feed-item-BkXeOOSC.mjs} +4 -4
- package/dist/{deleted-feed-item-Bun4tY2_.mjs.map → deleted-feed-item-BkXeOOSC.mjs.map} +1 -1
- package/dist/{edit-profile-CYh00FZ7.mjs → edit-profile-DdCJ6UkE.mjs} +3 -3
- package/dist/{edit-profile-CYh00FZ7.mjs.map → edit-profile-DdCJ6UkE.mjs.map} +1 -1
- package/dist/{feed-BxUqmcN9.mjs → feed-D4gYSgoO.mjs} +4 -4
- package/dist/{feed-BxUqmcN9.mjs.map → feed-D4gYSgoO.mjs.map} +1 -1
- package/dist/{hash-CNgwAx-U.mjs → hash-D_Ql6FHR.mjs} +2 -2
- package/dist/{hash-CNgwAx-U.mjs.map → hash-D_Ql6FHR.mjs.map} +1 -1
- package/dist/{inbox-DqNqII4a.mjs → inbox-BIeU-G-G.mjs} +2 -2
- package/dist/{inbox-DqNqII4a.mjs.map → inbox-BIeU-G-G.mjs.map} +1 -1
- package/dist/{index-CJJXnqq1.mjs → index-BlNT1f8K.mjs} +38 -38
- package/dist/index-BlNT1f8K.mjs.map +1 -0
- package/dist/{index-C9pnotJK.mjs → index-BurflorF.mjs} +466 -375
- package/dist/index-BurflorF.mjs.map +1 -0
- package/dist/{index-CONoLlDU.mjs → index-BvOcRwis.mjs} +2 -2
- package/dist/{index-CONoLlDU.mjs.map → index-BvOcRwis.mjs.map} +1 -1
- package/dist/{index-Dvh9q3jy.mjs → index-CPG1Xmp8.mjs} +6 -6
- package/dist/{index-Dvh9q3jy.mjs.map → index-CPG1Xmp8.mjs.map} +1 -1
- package/dist/{index--Q6orQkb.mjs → index-DIicyWvr.mjs} +10224 -9581
- package/dist/index-DIicyWvr.mjs.map +1 -0
- package/dist/{index-jhjmoHwu.mjs → index-DK0316YP.mjs} +13 -13
- package/dist/{index-jhjmoHwu.mjs.map → index-DK0316YP.mjs.map} +1 -1
- package/dist/{index-C3KJXzZE.mjs → index-DiYjJ67s.mjs} +115 -115
- package/dist/index-DiYjJ67s.mjs.map +1 -0
- package/dist/{index-BueIufRq.mjs → index-l72TqahD.mjs} +5 -5
- package/dist/{index-BueIufRq.mjs.map → index-l72TqahD.mjs.map} +1 -1
- package/dist/{moderation-CYhwUFi2.mjs → moderation-B0rtiaEH.mjs} +3 -3
- package/dist/{moderation-CYhwUFi2.mjs.map → moderation-B0rtiaEH.mjs.map} +1 -1
- package/dist/{note-COVa8CMw.mjs → note-DjaU27En.mjs} +4 -4
- package/dist/{note-COVa8CMw.mjs.map → note-DjaU27En.mjs.map} +1 -1
- package/dist/{reply-BHpKVBxx.mjs → reply-4cqNFwLY.mjs} +2 -2
- package/dist/{reply-BHpKVBxx.mjs.map → reply-4cqNFwLY.mjs.map} +1 -1
- package/dist/{separator-DP7q5sFH.mjs → separator-Dgj8LPTF.mjs} +12 -12
- package/dist/{separator-DP7q5sFH.mjs.map → separator-Dgj8LPTF.mjs.map} +1 -1
- package/dist/{settings-3n7zo_3K.mjs → settings-qNWc2HyW.mjs} +3 -3
- package/dist/{settings-3n7zo_3K.mjs.map → settings-qNWc2HyW.mjs.map} +1 -1
- package/dist/{step-1-BmUukywZ.mjs → step-1-CuRWXSkm.mjs} +12 -12
- package/dist/{step-1-BmUukywZ.mjs.map → step-1-CuRWXSkm.mjs.map} +1 -1
- package/dist/{step-2-C--I3xxp.mjs → step-2-BsxjLzY8.mjs} +5 -5
- package/dist/{step-2-C--I3xxp.mjs.map → step-2-BsxjLzY8.mjs.map} +1 -1
- package/dist/{step-3-0Deh5N9c.mjs → step-3-NBvYqr7R.mjs} +7 -7
- package/dist/{step-3-0Deh5N9c.mjs.map → step-3-NBvYqr7R.mjs.map} +1 -1
- package/dist/{tabs-D_vmoLBo.mjs → tabs-ROut24vi.mjs} +3 -3
- package/dist/{tabs-D_vmoLBo.mjs.map → tabs-ROut24vi.mjs.map} +1 -1
- package/dist/{topic-filter-DJMrhH-c.mjs → topic-filter-YL1wy3Q1.mjs} +2 -2
- package/dist/{topic-filter-DJMrhH-c.mjs.map → topic-filter-YL1wy3Q1.mjs.map} +1 -1
- package/package.json +3 -1
- package/dist/index--Q6orQkb.mjs.map +0 -1
- package/dist/index-C3KJXzZE.mjs.map +0 -1
- package/dist/index-C9pnotJK.mjs.map +0 -1
- package/dist/index-CJJXnqq1.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ae as U, R as g, af as D, j as d, ag as G, ah as X, ai as Z, aj as P, ak as ee, e as k, al as B, am as x, c as L, an as te, b as K, ao as oe, W as y } from "./index-DIicyWvr.mjs";
|
|
2
2
|
function ne(e) {
|
|
3
3
|
const o = e + "CollectionProvider", [i, r] = U(o), [w, I] = i(
|
|
4
4
|
o,
|
|
@@ -216,4 +216,4 @@ export {
|
|
|
216
216
|
Ce as c,
|
|
217
217
|
ce as u
|
|
218
218
|
};
|
|
219
|
-
//# sourceMappingURL=index-
|
|
219
|
+
//# sourceMappingURL=index-BvOcRwis.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-CONoLlDU.mjs","sources":["../../../node_modules/@radix-ui/react-collection/dist/index.mjs","../../../node_modules/@radix-ui/react-direction/dist/index.mjs","../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b","DirectionContext","React.createContext","useDirection","localDir","globalDir","React.useContext","ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","createRovingFocusGroupContext","createRovingFocusGroupScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React.forwardRef","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","React.useRef","direction","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","React.useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","React.useEffect","node","React.useCallback","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","itemProps","autoId","useId","id","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";AAQA,SAASA,GAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAG,EAAE;AAAA,EAC1E,GACQM,IAAqB,CAACC,MAAU;AACpC,UAAM,EAAE,OAAAC,GAAO,UAAAC,EAAQ,IAAKF,GACtBG,IAAMC,EAAM,OAAO,IAAI,GACvBC,IAAUD,EAAM,OAAuB,oBAAI,IAAG,CAAE,EAAE;AACxD,WAAuBE,gBAAAA,EAAAA,IAAIT,GAAwB,EAAE,OAAAI,GAAO,SAAAI,GAAS,eAAeF,GAAK,UAAAD,GAAU;AAAA,EACrG;AACA,EAAAH,EAAmB,cAAcN;AACjC,QAAMc,IAAuBf,IAAO,kBAC9BgB,IAAqBC,EAAWF,CAAoB,GACpDG,IAAiBN,EAAM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AE,SAASwD,CAAG;AACzE,WAAOF,GAAwBE,CAAG;AACpC;AACA,SAASlB,EAAWmB,GAAYC,IAAgB,IAAO;AACrD,QAAMC,IAA6B,SAAS;AAC5C,aAAWC,KAAaH;AAGtB,QAFIG,MAAcD,MAClBC,EAAU,MAAM,EAAE,eAAAF,GAAe,GAC7B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAOrE,GACPsE,KAAO1B;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"index-BvOcRwis.mjs","sources":["../../../node_modules/@radix-ui/react-collection/dist/index.mjs","../../../node_modules/@radix-ui/react-direction/dist/index.mjs","../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b","DirectionContext","React.createContext","useDirection","localDir","globalDir","React.useContext","ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","createRovingFocusGroupContext","createRovingFocusGroupScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React.forwardRef","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","React.useRef","direction","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","React.useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","React.useEffect","node","React.useCallback","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","itemProps","autoId","useId","id","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";AAQA,SAASA,GAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAG,EAAE;AAAA,EAC1E,GACQM,IAAqB,CAACC,MA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A,EACN,UAAU;AAAA,EACV,KAAK;AACP;AACA,SAASC,GAAqBC,GAAKtD,GAAK;AACtC,SAAIA,MAAQ,QAAcsD,IACnBA,MAAQ,cAAc,eAAeA,MAAQ,eAAe,cAAcA;AACnF;AACA,SAASL,GAAerB,GAAO9B,GAAaE,GAAK;AAC/C,QAAMsD,IAAMD,GAAqBzB,EAAM,KAAK5B,CAAG;AAC/C,MAAI,EAAAF,MAAgB,cAAc,CAAC,aAAa,YAAY,EAAE,SAASwD,CAAG,MACtE,EAAAxD,MAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAASwD,CAAG;AACzE,WAAOF,GAAwBE,CAAG;AACpC;AACA,SAASlB,EAAWmB,GAAYC,IAAgB,IAAO;AACrD,QAAMC,IAA6B,SAAS;AAC5C,aAAWC,KAAaH;AAGtB,QAFIG,MAAcD,MAClBC,EAAU,MAAM,EAAE,eAAAF,GAAe,GAC7B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAOrE,GACPsE,KAAO1B;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a6 as E, j as t,
|
|
2
|
-
import { A as ae } from "./at-sign-
|
|
3
|
-
import { R as ne } from "./reply-
|
|
1
|
+
import { a6 as E, j as t, aP as H, R as u, d as C, aQ as D, c as g, e as L, aw as O, ax as V, L as q, E as G, f as Q, aR as K, S as w, A as $, B as Z, aS as J, aa as P, h as b, r as X, ad as U, aT as Y, aU as ee, k as te, P as se } from "./index-DIicyWvr.mjs";
|
|
2
|
+
import { A as ae } from "./at-sign-l8HMU0fk.mjs";
|
|
3
|
+
import { R as ne } from "./reply-4cqNFwLY.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* @license lucide-react v0.553.0 - ISC
|
|
6
6
|
*
|
|
@@ -169,7 +169,7 @@ const fe = ({ group: a }) => {
|
|
|
169
169
|
[e]: !m[e]
|
|
170
170
|
}));
|
|
171
171
|
}, s = () => {
|
|
172
|
-
}, n = 5, { data: i, error: o, fetchNextPage: x, hasNextPage: h, isFetchingNextPage: p, isLoading: y } =
|
|
172
|
+
}, n = 5, { data: i, error: o, fetchNextPage: x, hasNextPage: h, isFetchingNextPage: p, isLoading: y } = D("index"), k = (i == null ? void 0 : i.pages.flatMap((e) => ye(e.notifications))) ?? Array(10).fill({ actors: [{}] }), j = g(null), v = g(null);
|
|
173
173
|
L(() => (j.current && j.current.disconnect(), j.current = new IntersectionObserver((e) => {
|
|
174
174
|
e[0].isIntersecting && h && !p && x();
|
|
175
175
|
}), v.current && j.current.observe(v.current), () => {
|
|
@@ -194,7 +194,7 @@ const fe = ({ group: a }) => {
|
|
|
194
194
|
break;
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
|
-
return o &&
|
|
197
|
+
return o && O(o) ? /* @__PURE__ */ t.jsx(V, { errorCode: o.code, statusCode: o.statusCode }) : /* @__PURE__ */ t.jsx(q, { children: /* @__PURE__ */ t.jsxs("div", { className: "z-0 flex w-full flex-col items-center", children: [
|
|
198
198
|
y === !1 && k.length === 0 && /* @__PURE__ */ t.jsxs(G, { children: [
|
|
199
199
|
/* @__PURE__ */ t.jsx(Q, { children: /* @__PURE__ */ t.jsx(K, {}) }),
|
|
200
200
|
"Quiet for now, but not for long! When someone likes, boosts, or replies to you, you'll find it here."
|
|
@@ -364,4 +364,4 @@ const fe = ({ group: a }) => {
|
|
|
364
364
|
export {
|
|
365
365
|
Ne as default
|
|
366
366
|
};
|
|
367
|
-
//# sourceMappingURL=index-
|
|
367
|
+
//# sourceMappingURL=index-CPG1Xmp8.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-Dvh9q3jy.mjs","sources":["../../../node_modules/lucide-react/dist/esm/icons/repeat-2.js","../../../node_modules/lucide-react/dist/esm/icons/user-round-check.js","../src/views/notifications/components/notification-icon.tsx","../src/views/notifications/components/notification-item.tsx","../src/components/global/separator.tsx","../src/views/notifications/notifications.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m2 9 3-3 3 3\", key: \"1ltn5i\" }],\n [\"path\", { d: \"M13 18H7a2 2 0 0 1-2-2V6\", key: \"1r6tfw\" }],\n [\"path\", { d: \"m22 15-3 3-3-3\", key: \"4rnwn2\" }],\n [\"path\", { d: \"M11 6h6a2 2 0 0 1 2 2v10\", key: \"2f72bc\" }]\n];\nconst Repeat2 = createLucideIcon(\"repeat-2\", __iconNode);\n\nexport { __iconNode, Repeat2 as default };\n//# sourceMappingURL=repeat-2.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M2 21a8 8 0 0 1 13.292-6\", key: \"bjp14o\" }],\n [\"circle\", { cx: \"10\", cy: \"8\", r: \"5\", key: \"o932ke\" }],\n [\"path\", { d: \"m16 19 2 2 4-4\", key: \"1b14m6\" }]\n];\nconst UserRoundCheck = createLucideIcon(\"user-round-check\", __iconNode);\n\nexport { __iconNode, UserRoundCheck as default };\n//# sourceMappingURL=user-round-check.js.map\n","import React from 'react';\nimport {LucideIcon} from '@tryghost/shade';\n\nexport type NotificationType = 'like' | 'follow' | 'reply' | 'repost' | 'mention';\nexport type NotificationIconSize = 'sm' | 'lg';\n\ninterface NotificationIconProps {\n notificationType: NotificationType;\n size?: NotificationIconSize;\n className?: string;\n}\n\nconst NotificationIcon: React.FC<NotificationIconProps> = ({notificationType, size = 'lg', className}) => {\n let icon;\n let badgeColor = '';\n const iconColor = 'white';\n const iconSize = size === 'sm' ? 13 : 20;\n const strokeWidth = size === 'sm' ? 2 : 1.5;\n\n switch (notificationType) {\n case 'follow':\n icon = <LucideIcon.UserRoundCheck className={`-mr-0.5 -mt-0.5 ${size === 'sm' && 'size-[11px]'}`} color={iconColor} size={iconSize} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-blue-600';\n break;\n case 'like':\n icon = <LucideIcon.Heart className={`${size === 'sm' ? 'size-[11px]' : 'mt-px size-5'}`} color={iconColor} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-pink-600';\n break;\n case 'reply':\n icon = <LucideIcon.Reply className='mb-px mr-px' color={iconColor} size={iconSize} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-purple-600';\n break;\n case 'repost':\n icon = <LucideIcon.Repeat2 color={iconColor} size={iconSize} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-green-500';\n break;\n case 'mention':\n icon = <LucideIcon.AtSign className={`${size === 'sm' ? 'size-[12px]' : 'size-5'}`} color={iconColor} size={iconSize} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-orange-500';\n break;\n }\n\n return (\n <div className={`flex ${size === 'sm' ? 'size-5' : 'size-9'} items-center justify-center rounded-full ${badgeColor} ${className && className}`}>\n {icon}\n </div>\n );\n};\n\nexport default NotificationIcon;\n","import NotificationIcon, {NotificationIconSize, NotificationType} from './notification-icon';\nimport React from 'react';\n\n// Context to share common props between compound components\ninterface NotificationContextType {\n onClick?: () => void;\n url?: string;\n}\n\nconst NotificationContext = React.createContext<NotificationContextType | undefined>(undefined);\n\n// Root component\ninterface NotificationItemProps {\n isGrouped?: boolean;\n centerAlign?: boolean;\n children: React.ReactNode;\n onClick?: () => void;\n url?: string;\n className?: string;\n}\n\nconst NotificationItem = ({isGrouped, centerAlign, children, onClick, url, className}: NotificationItemProps) => {\n return (\n <NotificationContext.Provider value={{onClick, url}}>\n <div className={`group relative -mx-4 -my-px ${isGrouped ? 'grid' : 'flex'} ${centerAlign ? 'items-center' : 'items-start'} cursor-pointer grid-cols-[auto_1fr] gap-x-4 gap-y-2.5 rounded-lg px-4 py-5 text-left break-anywhere hover:bg-gray-75 ${className}`}\n role='button'\n onClick={onClick}\n >\n {children}\n </div>\n </NotificationContext.Provider>\n );\n};\n\n// Sub-components\nconst Icon = ({size = 'lg', type}: {size?: NotificationIconSize; type: NotificationType}) => {\n return (\n <div className='col-start-1 row-start-1'>\n <NotificationIcon notificationType={type} size={size} />\n </div>\n );\n};\n\nconst Avatars = ({children}: {children: React.ReactNode}) => {\n return (\n <div className='col-start-2 row-start-1 flex gap-2'>\n {children}\n </div>\n );\n};\n\nconst Content = ({children}: {children: React.ReactNode}) => {\n return (\n <div className='col-start-2 row-start-2 -mt-0.5 grow overflow-hidden'>\n {children}\n </div>\n );\n};\n\n// Attach sub-components to the main component\nNotificationItem.Icon = Icon;\nNotificationItem.Avatars = Avatars;\nNotificationItem.Content = Content;\n\nexport default NotificationItem;\n","import React from 'react';\n\nconst Separator: React.FC = () => {\n return <div className='h-px w-full bg-gray-150 dark:bg-gray-950' />;\n};\n\nexport default Separator;","import React, {useEffect, useRef} from 'react';\nimport {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';\nimport {Button, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade';\n\nimport APAvatar from '@components/global/ap-avatar';\nimport AppError from '@components/layout/error';\nimport FeedItemStats from '@components/feed/feed-item-stats';\nimport FollowButton from '@components/global/follow-button';\nimport Layout from '@components/layout';\nimport NotificationIcon from './components/notification-icon';\nimport NotificationItem from './components/notification-item';\nimport ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';\nimport Separator from '@components/global/separator';\nimport {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';\nimport {Notification, isApiError} from '@src/api/activitypub';\nimport {handleProfileClick} from '@utils/handle-profile-click';\nimport {renderFeedAttachment} from '@components/feed/feed-item';\nimport {renderTimestamp} from '@src/utils/render-timestamp';\nimport {stripHtml} from '@src/utils/content-formatters';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\nimport {useNotificationsForUser} from '@hooks/use-activity-pub-queries';\n\ninterface NotificationGroup {\n id: string;\n type: Notification['type'];\n actors: Notification['actor'][];\n post: Notification['post'];\n inReplyTo: Notification['inReplyTo'];\n createdAt: string;\n}\n\ninterface NotificationGroupDescriptionProps {\n group: NotificationGroup;\n}\n\n/**\n * Calculate a time bucket for grouping notifications\n * Groups notifications into time windows\n */\nfunction getTimeBucket(timestamp: string): string {\n const TIME_WINDOW_MS = 24 * 60 * 60 * 1000; // 24 hours\n const date = new Date(timestamp);\n const timeMs = date.getTime();\n const bucketStart = Math.floor(timeMs / TIME_WINDOW_MS) * TIME_WINDOW_MS;\n return bucketStart.toString();\n}\n\nfunction groupNotifications(notifications: Notification[]): NotificationGroup[] {\n const groups: {\n [key: string]: NotificationGroup\n } = {};\n\n let lastType: string | null = null;\n let sequenceCounter = 0;\n\n notifications.forEach((notification) => {\n // Increment sequence counter when we encounter a different type\n // This preserves chronological order by preventing grouping across type boundaries\n if (notification.type !== lastType) {\n sequenceCounter += 1;\n lastType = notification.type;\n }\n\n let groupKey = '';\n const timeBucket = `_${getTimeBucket(notification.createdAt)}`;\n const sequence = `_seq${sequenceCounter}`;\n\n switch (notification.type) {\n case 'like':\n if (notification.post?.id) {\n groupKey = `like_${notification.post.id}${timeBucket}${sequence}`;\n }\n break;\n case 'reply':\n // Don't group replies\n groupKey = `reply_${notification.id}`;\n break;\n case 'repost':\n if (notification.post?.id) {\n groupKey = `repost_${notification.post.id}${timeBucket}${sequence}`;\n }\n break;\n case 'follow':\n groupKey = `follow_${timeBucket}${sequence}`;\n break;\n case 'mention':\n // Don't group mentions\n groupKey = `mention_${notification.id}`;\n break;\n }\n\n if (!groups[groupKey]) {\n groups[groupKey] = {\n id: notification.id,\n type: notification.type,\n actors: [],\n post: notification.post,\n inReplyTo: notification.inReplyTo,\n createdAt: notification.createdAt\n };\n }\n\n // Add actor if not already in the group\n if (!groups[groupKey].actors.find(a => a.id === notification.actor.id)) {\n groups[groupKey].actors.push(notification.actor);\n }\n });\n\n return Object.values(groups);\n};\n\nconst NotificationGroupDescription: React.FC<NotificationGroupDescriptionProps> = ({group}) => {\n const [firstActor, ...otherActors] = group.actors;\n const hasOthers = otherActors.length > 0;\n\n const actorClass = 'cursor-pointer font-semibold hover:underline text-black dark:text-white';\n\n const navigate = useNavigateWithBasePath();\n\n const actorText = (\n <>\n <ProfilePreviewHoverCard actor={firstActor as unknown as ActorProperties} align=\"center\" isCurrentUser={false}>\n <span\n className={actorClass}\n onClick={(e) => {\n e?.stopPropagation();\n handleProfileClick(firstActor.handle, navigate);\n }}\n >\n {firstActor.name}\n </span>\n </ProfilePreviewHoverCard>\n {hasOthers && ` and ${otherActors.length} ${otherActors.length > 1 ? 'others' : 'other'}`}\n </>\n );\n\n switch (group.type) {\n case 'follow':\n return <>{actorText} followed you</>;\n case 'like':\n return <>{actorText} liked your {group.post?.type === 'article' ? 'post' : 'note'}</>;\n case 'repost':\n return <>{actorText} reposted your {group.post?.type === 'article' ? 'post' : 'note'}</>;\n case 'reply':\n if (group.inReplyTo && typeof group.inReplyTo !== 'string') {\n return actorText;\n }\n break;\n case 'mention':\n return actorText;\n }\n\n return <></>;\n};\n\nconst ProfileLinkedContent: React.FC<{\n content: string;\n className?: string;\n stripTags?: string[];\n}> = ({content, className, stripTags = []}) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const navigate = useNavigateWithBasePath();\n\n useEffect(() => {\n const element = contentRef.current;\n if (!element) {\n return;\n }\n\n const handleProfileLinkClick = (e: Event) => {\n const target = (e as MouseEvent).target as HTMLElement;\n const link = target.closest('a[data-profile]');\n\n if (link) {\n const handle = link.getAttribute('data-profile')?.trim();\n const isValidHandle = /^@([\\w.-]+)@([\\w-]+\\.[\\w.-]+[a-zA-Z])$/.test(handle || '');\n\n if (isValidHandle && handle) {\n e.preventDefault();\n e.stopPropagation();\n handleProfileClick(handle, navigate);\n }\n }\n };\n\n element.addEventListener('click', handleProfileLinkClick);\n return () => {\n element.removeEventListener('click', handleProfileLinkClick);\n };\n }, [navigate, content]);\n\n return (\n <div\n dangerouslySetInnerHTML={{__html: stripHtml(content || '', stripTags)}}\n ref={contentRef}\n className={className}\n />\n );\n};\n\nconst Notifications: React.FC = () => {\n const [openStates, setOpenStates] = React.useState<{[key: string]: boolean}>({});\n const navigate = useNavigateWithBasePath();\n\n const toggleOpen = (groupId: string) => {\n setOpenStates(prev => ({\n ...prev,\n [groupId]: !prev[groupId]\n }));\n };\n\n const handleLikeClick = () => {\n // Do API req or smth\n // Don't need to know about setting timeouts or anything like that\n };\n\n const maxAvatars = 5;\n\n const {data, error, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading} = useNotificationsForUser('index');\n\n const notificationGroups = (\n data?.pages.flatMap((page) => {\n return groupNotifications(page.notifications);\n })\n // If no notifications, return 10 empty groups for the loading state\n ?? Array(10).fill({actors: [{}]}));\n\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n\n observerRef.current = new IntersectionObserver((entries) => {\n if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) {\n fetchNextPage();\n }\n });\n\n if (loadMoreRef.current) {\n observerRef.current.observe(loadMoreRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [hasNextPage, isFetchingNextPage, fetchNextPage]);\n\n const handleNotificationClick = (group: NotificationGroup, index: number) => {\n switch (group.type) {\n case 'like':\n if (group.post) {\n navigate(`/${group.post.type === 'article' ? 'reader' : 'notes'}/${encodeURIComponent(group.post.id)}`);\n }\n break;\n case 'reply':\n if (group.post && group.inReplyTo) {\n navigate(`/notes/${encodeURIComponent(group.post.id)}`);\n }\n break;\n case 'repost':\n if (group.post) {\n navigate(`/${group.post.type === 'article' ? 'reader' : 'notes'}/${encodeURIComponent(group.post.id)}`);\n }\n break;\n case 'follow':\n if (group.actors.length > 1) {\n toggleOpen(group.id || `${group.type}_${index}`);\n } else {\n handleProfileClick(group.actors[0].handle, navigate);\n }\n break;\n case 'mention':\n if (group.post) {\n navigate(`/notes/${encodeURIComponent(group.post.id)}`);\n }\n break;\n }\n };\n\n if (error && isApiError(error)) {\n return <AppError errorCode={error.code} statusCode={error.statusCode}/>;\n }\n\n return (\n <Layout>\n <div className='z-0 flex w-full flex-col items-center'>\n {\n isLoading === false && notificationGroups.length === 0 && (\n <EmptyViewIndicator>\n <EmptyViewIcon><LucideIcon.Bell /></EmptyViewIcon>\n Quiet for now, but not for long! When someone likes, boosts, or replies to you, you'll find it here.\n </EmptyViewIndicator>\n )\n }\n {\n (notificationGroups.length > 0) && (\n <>\n <div className='my-8 flex w-full max-w-[620px] flex-col max-md:mt-5'>\n {notificationGroups.map((group, index) => (\n <React.Fragment key={group.id || `${group.type}_${index}`}>\n <NotificationItem\n centerAlign={group.actors.length < 2 && group.type === 'follow'}\n className='hover:bg-gray-75 dark:hover:bg-gray-950'\n isGrouped={group.actors.length > 1}\n onClick={() => handleNotificationClick(group, index)}\n >\n {isLoading ?\n <Skeleton className='rounded-full' containerClassName='flex h-10 w-10' /> :\n (group.actors.length > 1 ?\n <NotificationItem.Icon type={group.type} /> :\n <div className='relative'>\n <APAvatar\n key={group.actors[0].id}\n author={{\n icon: {\n url: group.actors[0].avatarUrl || ''\n },\n name: group.actors[0].name,\n handle: group.actors[0].handle\n }}\n size='notification'\n />\n <NotificationIcon className='absolute -bottom-1 -right-1 z-10 border-2 border-white dark:border-black' notificationType={group.type} size='sm' />\n </div>\n )\n }\n {group.actors.length > 1 && <NotificationItem.Avatars>\n <div className='flex w-full flex-col'>\n <div className='relative flex items-center pl-2'>\n {!openStates[group.id || `${group.type}_${index}`] && group.actors.slice(0, maxAvatars).map((actor: ActorProperties) => (\n <APAvatar\n key={actor.id}\n author={{\n icon: {\n url: actor.avatarUrl || ''\n },\n name: actor.name,\n handle: actor.handle\n }}\n className='-ml-2 !bg-[#F3F3F3] outline outline-2 outline-white group-hover:!bg-[#EDEEF0] group-hover:outline-gray-75 dark:outline-black group-hover:dark:outline-gray-950'\n size='notification'\n />\n ))}\n {group.actors.length > maxAvatars && (!openStates[group.id || `${group.type}_${index}`]) && (\n <div className='absolute right-[28px] z-10 flex size-9 items-center justify-center rounded-full bg-black/50 text-base font-semibold tracking-tightest text-white'>\n {`+${group.actors.length - maxAvatars}`}\n </div>\n )}\n\n {group.actors.length > 1 && (\n <Button className={`group flex items-center gap-0.5 text-gray-700 hover:bg-transparent hover:text-black dark:text-gray-600 dark:hover:text-white ${openStates[group.id || `${group.type}_${index}`] ? 'ml-[-20px]' : 'ml-0 w-[28px]'}`} variant='ghost' onClick={(event?: React.MouseEvent<HTMLElement>) => {\n event?.stopPropagation();\n toggleOpen(group.id || `${group.type}_${index}`);\n }}>\n <LucideIcon.ChevronDown className={`${openStates[group.id || `${group.type}_${index}`] ? 'rotate-180' : ''}`} size={20} strokeWidth={1.5} />\n {openStates[group.id || `${group.type}_${index}`] ? 'Hide' : <span className='sr-only'>Show all</span>}\n </Button>\n )}\n </div>\n <div className={`overflow-hidden transition-all duration-300 ease-in-out ${openStates[group.id || `${group.type}_${index}`] ? 'mb-2 max-h-[1384px] opacity-100' : 'max-h-0 opacity-0'}`}>\n {openStates[group.id || `${group.type}_${index}`] && group.actors.length > 1 && (\n <div className='flex flex-col gap-2 pt-2'>\n {group.actors.map((actor: ActorProperties) => (\n <div\n key={actor.id}\n className='group/item flex items-center justify-between gap-4 break-anywhere'\n onClick={(e) => {\n e?.stopPropagation();\n handleProfileClick(actor.handle, navigate);\n }}\n >\n <div className='flex min-w-0 items-center'>\n <APAvatar author={{\n icon: {\n url: actor.avatarUrl || ''\n },\n name: actor.name,\n handle: actor.handle\n }} size='xs' />\n <span className='ml-2 line-clamp-1 text-base font-semibold group-hover/item:underline dark:text-white'>{actor.name}</span>\n <span className='ml-1 line-clamp-1 text-base text-gray-700 dark:text-gray-600'>{actor.handle}</span>\n </div>\n {group.type === 'follow' && !actor.followedByMe && (\n <FollowButton\n following={false}\n handle={actor.handle}\n variant=\"link\"\n />\n )}\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n </NotificationItem.Avatars>}\n <NotificationItem.Content>\n <div>\n {isLoading ?\n <>\n <Skeleton />\n <Skeleton className='w-full max-w-60' />\n </> :\n <div className='flex justify-between'>\n <div className='flex items-center gap-1'>\n <span className='truncate'><NotificationGroupDescription group={group} /></span>\n {group.actors.length < 2 &&\n <>\n <span className='mt-px text-[8px] text-gray-700 dark:text-gray-600'>•</span>\n <span className='mt-0.5 text-sm text-gray-700 dark:text-gray-600'>{renderTimestamp(group, false)}</span>\n </>\n }\n </div>\n {/* Follow button for singular follow, reply, and mention */}\n {group.actors.length === 1 && (group.type === 'follow' || group.type === 'reply' || group.type === 'mention') && !group.actors[0].followedByMe && (\n <FollowButton\n following={false}\n handle={group.actors[0].handle}\n variant=\"link\"\n />\n )}\n </div>\n }\n </div>\n {(\n ((group.type === 'reply' && group.inReplyTo) || group.type === 'mention') ||\n (group.type === 'like' && !group.post?.name && group.post?.content) ||\n (group.type === 'repost' && !group.post?.name && group.post?.content)\n ) && (\n (group.type !== 'reply' && group.type !== 'mention' ?\n <div className='ap-note-content mt-0.5 line-clamp-1 text-pretty text-sm text-gray-700 dark:text-gray-600'>\n {group.post?.type === 'article' && group.post?.title && <>{group.post.title} — </>}\n <span dangerouslySetInnerHTML={{__html: stripHtml(group.post?.content || '')}} />\n </div> :\n <>\n <div className='mt-2.5 rounded-md bg-gray-100 px-5 py-[14px] group-hover:bg-gray-200 dark:bg-gray-925/30 group-hover:dark:bg-black/40'>\n <ProfileLinkedContent\n className='ap-note-content text-pretty'\n content={group.post?.content || ''}\n stripTags={['a']}\n />\n {group.post && group.post.attachments && group.post.attachments.length > 0 && (\n <div className='notification-attachments mb-1 [&_.attachment-gallery]:flex [&_.attachment-gallery]:flex-wrap [&_img]:aspect-square [&_img]:max-w-[calc(20%-6.4px)]'>\n {renderFeedAttachment(\n {...group.post, type: 'Note', attachment: group.post.attachments}\n )}\n </div>\n )}\n </div>\n </>\n )\n )}\n {((group.type === 'reply' && group.post) || group.type === 'mention') && (\n <div className=\"mt-1.5\">\n <FeedItemStats\n actor={{\n ...group.actors[0],\n icon: {\n url: group.actors[0].avatarUrl || ''\n },\n id: group.actors[0].url,\n preferredUsername: group.actors[0].handle?.replace(/^@([^@]+)@.*$/, '$1') || 'unknown'\n }}\n buttonClassName='hover:bg-gray-200'\n commentCount={group.post.replyCount || 0}\n layout=\"notification\"\n likeCount={group.post.likeCount || 0}\n object={{\n ...group.post,\n liked: group.post.likedByMe,\n reposted: group.post.repostedByMe\n }}\n repostCount={group.post.repostCount || 0}\n onLikeClick={handleLikeClick}\n />\n </div>\n )}\n </NotificationItem.Content>\n </NotificationItem>\n {index < notificationGroups.length - 1 &&\n <div className='pl-[52px]'><Separator /></div>\n }\n </React.Fragment>\n ))}\n </div>\n <div ref={loadMoreRef} className='h-1'></div>\n {isFetchingNextPage && (\n <div className='-mt-4 mb-8 flex flex-col items-center justify-center space-y-4 text-center'>\n <LoadingIndicator size='md' />\n </div>\n )}\n </>\n )\n }\n </div>\n </Layout>\n );\n};\n\nexport default Notifications;\n"],"names":["__iconNode","Repeat2","createLucideIcon","UserRoundCheck","NotificationIcon","notificationType","size","className","icon","badgeColor","iconColor","iconSize","strokeWidth","jsx","LucideIcon.UserRoundCheck","LucideIcon.Heart","LucideIcon.Reply","LucideIcon.Repeat2","LucideIcon.AtSign","NotificationContext","React","NotificationItem","isGrouped","centerAlign","children","onClick","url","Icon","type","Avatars","Content","Separator","getTimeBucket","timestamp","timeMs","groupNotifications","notifications","groups","lastType","sequenceCounter","notification","groupKey","timeBucket","sequence","_a","_b","a","NotificationGroupDescription","group","firstActor","otherActors","hasOthers","actorClass","navigate","useNavigateWithBasePath","actorText","jsxs","Fragment","ProfilePreviewHoverCard","e","handleProfileClick","ProfileLinkedContent","content","stripTags","contentRef","useRef","useEffect","element","handleProfileLinkClick","link","handle","stripHtml","Notifications","openStates","setOpenStates","toggleOpen","groupId","prev","handleLikeClick","maxAvatars","data","error","fetchNextPage","hasNextPage","isFetchingNextPage","isLoading","useNotificationsForUser","notificationGroups","page","observerRef","loadMoreRef","entries","handleNotificationClick","index","isApiError","AppError","Layout","EmptyViewIndicator","EmptyViewIcon","LucideIcon.Bell","Skeleton","APAvatar","actor","Button","event","LucideIcon.ChevronDown","FollowButton","renderTimestamp","_c","_d","_e","_f","_g","_h","renderFeedAttachment","FeedItemStats","_i","LoadingIndicator"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,gBAAgB,KAAK,SAAQ,CAAE;AAAA,EAC7C,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAQ,CAAE;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,kBAAkB,KAAK,SAAQ,CAAE;AAAA,EAC/C,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAQ,CAAE;AAC3D,GACMC,KAAUC,EAAiB,YAAYF,EAAU;ACfvD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAQ,CAAE;AAAA,EACzD,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,KAAK,GAAG,KAAK,KAAK,UAAU;AAAA,EACvD,CAAC,QAAQ,EAAE,GAAG,kBAAkB,KAAK,SAAQ,CAAE;AACjD,GACMG,KAAiBD,EAAiB,oBAAoBF,EAAU,GCFhEI,IAAoD,CAAC,EAAC,kBAAAC,GAAkB,MAAAC,IAAO,MAAM,WAAAC,QAAe;AACtG,MAAIC,GACAC,IAAa;AACjB,QAAMC,IAAY,SACZC,IAAWL,MAAS,OAAO,KAAK,IAChCM,IAAcN,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,OAAOA,EAAM,KAAK;AAAA,wBAClB,UAAUA,EAAM,KAAK;AAAA,sBAAA;AAAA,sBAEzB,aAAaA,EAAM,KAAK,eAAe;AAAA,sBACvC,aAAa8B;AAAA,oBAAA;AAAA,kBAAA,EACjB,CACJ;AAAA,gBAAA,EAAA,CAER;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAEHe,IAAQN,EAAmB,SAAS,KACjC1E,gBAAAA,EAAAA,IAAC,SAAI,WAAU,aAAY,UAAAA,gBAAAA,EAAAA,IAACkB,IAAA,CAAA,CAAU,EAAA,CAAE;AAAA,QAAA,EAAA,GArL3BiB,EAAM,MAAM,GAAGA,EAAM,IAAI,IAAI6C,CAAK,EAuLvD;AAAA,OACH,GACL;AAAA,MACAhF,gBAAAA,EAAAA,IAAC,OAAA,EAAI,KAAK6E,GAAa,WAAU,OAAM;AAAA,MACtCN,2BACI,OAAA,EAAI,WAAU,8EACX,UAAAvE,gBAAAA,EAAAA,IAACwG,IAAA,EAAiB,MAAK,KAAA,CAAK,EAAA,CAChC;AAAA,IAAA,EAAA,CAER;AAAA,EAAA,EAAA,CAGZ,EAAA,CACJ;AAER;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"index-CPG1Xmp8.mjs","sources":["../../../node_modules/lucide-react/dist/esm/icons/repeat-2.js","../../../node_modules/lucide-react/dist/esm/icons/user-round-check.js","../src/views/notifications/components/notification-icon.tsx","../src/views/notifications/components/notification-item.tsx","../src/components/global/separator.tsx","../src/views/notifications/notifications.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m2 9 3-3 3 3\", key: \"1ltn5i\" }],\n [\"path\", { d: \"M13 18H7a2 2 0 0 1-2-2V6\", key: \"1r6tfw\" }],\n [\"path\", { d: \"m22 15-3 3-3-3\", key: \"4rnwn2\" }],\n [\"path\", { d: \"M11 6h6a2 2 0 0 1 2 2v10\", key: \"2f72bc\" }]\n];\nconst Repeat2 = createLucideIcon(\"repeat-2\", __iconNode);\n\nexport { __iconNode, Repeat2 as default };\n//# sourceMappingURL=repeat-2.js.map\n","/**\n * @license lucide-react v0.553.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M2 21a8 8 0 0 1 13.292-6\", key: \"bjp14o\" }],\n [\"circle\", { cx: \"10\", cy: \"8\", r: \"5\", key: \"o932ke\" }],\n [\"path\", { d: \"m16 19 2 2 4-4\", key: \"1b14m6\" }]\n];\nconst UserRoundCheck = createLucideIcon(\"user-round-check\", __iconNode);\n\nexport { __iconNode, UserRoundCheck as default };\n//# sourceMappingURL=user-round-check.js.map\n","import React from 'react';\nimport {LucideIcon} from '@tryghost/shade';\n\nexport type NotificationType = 'like' | 'follow' | 'reply' | 'repost' | 'mention';\nexport type NotificationIconSize = 'sm' | 'lg';\n\ninterface NotificationIconProps {\n notificationType: NotificationType;\n size?: NotificationIconSize;\n className?: string;\n}\n\nconst NotificationIcon: React.FC<NotificationIconProps> = ({notificationType, size = 'lg', className}) => {\n let icon;\n let badgeColor = '';\n const iconColor = 'white';\n const iconSize = size === 'sm' ? 13 : 20;\n const strokeWidth = size === 'sm' ? 2 : 1.5;\n\n switch (notificationType) {\n case 'follow':\n icon = <LucideIcon.UserRoundCheck className={`-mr-0.5 -mt-0.5 ${size === 'sm' && 'size-[11px]'}`} color={iconColor} size={iconSize} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-blue-600';\n break;\n case 'like':\n icon = <LucideIcon.Heart className={`${size === 'sm' ? 'size-[11px]' : 'mt-px size-5'}`} color={iconColor} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-pink-600';\n break;\n case 'reply':\n icon = <LucideIcon.Reply className='mb-px mr-px' color={iconColor} size={iconSize} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-purple-600';\n break;\n case 'repost':\n icon = <LucideIcon.Repeat2 color={iconColor} size={iconSize} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-green-500';\n break;\n case 'mention':\n icon = <LucideIcon.AtSign className={`${size === 'sm' ? 'size-[12px]' : 'size-5'}`} color={iconColor} size={iconSize} strokeWidth={strokeWidth} />;\n badgeColor = 'bg-orange-500';\n break;\n }\n\n return (\n <div className={`flex ${size === 'sm' ? 'size-5' : 'size-9'} items-center justify-center rounded-full ${badgeColor} ${className && className}`}>\n {icon}\n </div>\n );\n};\n\nexport default NotificationIcon;\n","import NotificationIcon, {NotificationIconSize, NotificationType} from './notification-icon';\nimport React from 'react';\n\n// Context to share common props between compound components\ninterface NotificationContextType {\n onClick?: () => void;\n url?: string;\n}\n\nconst NotificationContext = React.createContext<NotificationContextType | undefined>(undefined);\n\n// Root component\ninterface NotificationItemProps {\n isGrouped?: boolean;\n centerAlign?: boolean;\n children: React.ReactNode;\n onClick?: () => void;\n url?: string;\n className?: string;\n}\n\nconst NotificationItem = ({isGrouped, centerAlign, children, onClick, url, className}: NotificationItemProps) => {\n return (\n <NotificationContext.Provider value={{onClick, url}}>\n <div className={`group relative -mx-4 -my-px ${isGrouped ? 'grid' : 'flex'} ${centerAlign ? 'items-center' : 'items-start'} cursor-pointer grid-cols-[auto_1fr] gap-x-4 gap-y-2.5 rounded-lg px-4 py-5 text-left break-anywhere hover:bg-gray-75 ${className}`}\n role='button'\n onClick={onClick}\n >\n {children}\n </div>\n </NotificationContext.Provider>\n );\n};\n\n// Sub-components\nconst Icon = ({size = 'lg', type}: {size?: NotificationIconSize; type: NotificationType}) => {\n return (\n <div className='col-start-1 row-start-1'>\n <NotificationIcon notificationType={type} size={size} />\n </div>\n );\n};\n\nconst Avatars = ({children}: {children: React.ReactNode}) => {\n return (\n <div className='col-start-2 row-start-1 flex gap-2'>\n {children}\n </div>\n );\n};\n\nconst Content = ({children}: {children: React.ReactNode}) => {\n return (\n <div className='col-start-2 row-start-2 -mt-0.5 grow overflow-hidden'>\n {children}\n </div>\n );\n};\n\n// Attach sub-components to the main component\nNotificationItem.Icon = Icon;\nNotificationItem.Avatars = Avatars;\nNotificationItem.Content = Content;\n\nexport default NotificationItem;\n","import React from 'react';\n\nconst Separator: React.FC = () => {\n return <div className='h-px w-full bg-gray-150 dark:bg-gray-950' />;\n};\n\nexport default Separator;","import React, {useEffect, useRef} from 'react';\nimport {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';\nimport {Button, LoadingIndicator, LucideIcon, Skeleton} from '@tryghost/shade';\n\nimport APAvatar from '@components/global/ap-avatar';\nimport AppError from '@components/layout/error';\nimport FeedItemStats from '@components/feed/feed-item-stats';\nimport FollowButton from '@components/global/follow-button';\nimport Layout from '@components/layout';\nimport NotificationIcon from './components/notification-icon';\nimport NotificationItem from './components/notification-item';\nimport ProfilePreviewHoverCard from '@components/global/profile-preview-hover-card';\nimport Separator from '@components/global/separator';\nimport {EmptyViewIcon, EmptyViewIndicator} from '@src/components/global/empty-view-indicator';\nimport {Notification, isApiError} from '@src/api/activitypub';\nimport {handleProfileClick} from '@utils/handle-profile-click';\nimport {renderFeedAttachment} from '@components/feed/feed-item';\nimport {renderTimestamp} from '@src/utils/render-timestamp';\nimport {stripHtml} from '@src/utils/content-formatters';\nimport {useNavigateWithBasePath} from '@src/hooks/use-navigate-with-base-path';\nimport {useNotificationsForUser} from '@hooks/use-activity-pub-queries';\n\ninterface NotificationGroup {\n id: string;\n type: Notification['type'];\n actors: Notification['actor'][];\n post: Notification['post'];\n inReplyTo: Notification['inReplyTo'];\n createdAt: string;\n}\n\ninterface NotificationGroupDescriptionProps {\n group: NotificationGroup;\n}\n\n/**\n * Calculate a time bucket for grouping notifications\n * Groups notifications into time windows\n */\nfunction getTimeBucket(timestamp: string): string {\n const TIME_WINDOW_MS = 24 * 60 * 60 * 1000; // 24 hours\n const date = new Date(timestamp);\n const timeMs = date.getTime();\n const bucketStart = Math.floor(timeMs / TIME_WINDOW_MS) * TIME_WINDOW_MS;\n return bucketStart.toString();\n}\n\nfunction groupNotifications(notifications: Notification[]): NotificationGroup[] {\n const groups: {\n [key: string]: NotificationGroup\n } = {};\n\n let lastType: string | null = null;\n let sequenceCounter = 0;\n\n notifications.forEach((notification) => {\n // Increment sequence counter when we encounter a different type\n // This preserves chronological order by preventing grouping across type boundaries\n if (notification.type !== lastType) {\n sequenceCounter += 1;\n lastType = notification.type;\n }\n\n let groupKey = '';\n const timeBucket = `_${getTimeBucket(notification.createdAt)}`;\n const sequence = `_seq${sequenceCounter}`;\n\n switch (notification.type) {\n case 'like':\n if (notification.post?.id) {\n groupKey = `like_${notification.post.id}${timeBucket}${sequence}`;\n }\n break;\n case 'reply':\n // Don't group replies\n groupKey = `reply_${notification.id}`;\n break;\n case 'repost':\n if (notification.post?.id) {\n groupKey = `repost_${notification.post.id}${timeBucket}${sequence}`;\n }\n break;\n case 'follow':\n groupKey = `follow_${timeBucket}${sequence}`;\n break;\n case 'mention':\n // Don't group mentions\n groupKey = `mention_${notification.id}`;\n break;\n }\n\n if (!groups[groupKey]) {\n groups[groupKey] = {\n id: notification.id,\n type: notification.type,\n actors: [],\n post: notification.post,\n inReplyTo: notification.inReplyTo,\n createdAt: notification.createdAt\n };\n }\n\n // Add actor if not already in the group\n if (!groups[groupKey].actors.find(a => a.id === notification.actor.id)) {\n groups[groupKey].actors.push(notification.actor);\n }\n });\n\n return Object.values(groups);\n};\n\nconst NotificationGroupDescription: React.FC<NotificationGroupDescriptionProps> = ({group}) => {\n const [firstActor, ...otherActors] = group.actors;\n const hasOthers = otherActors.length > 0;\n\n const actorClass = 'cursor-pointer font-semibold hover:underline text-black dark:text-white';\n\n const navigate = useNavigateWithBasePath();\n\n const actorText = (\n <>\n <ProfilePreviewHoverCard actor={firstActor as unknown as ActorProperties} align=\"center\" isCurrentUser={false}>\n <span\n className={actorClass}\n onClick={(e) => {\n e?.stopPropagation();\n handleProfileClick(firstActor.handle, navigate);\n }}\n >\n {firstActor.name}\n </span>\n </ProfilePreviewHoverCard>\n {hasOthers && ` and ${otherActors.length} ${otherActors.length > 1 ? 'others' : 'other'}`}\n </>\n );\n\n switch (group.type) {\n case 'follow':\n return <>{actorText} followed you</>;\n case 'like':\n return <>{actorText} liked your {group.post?.type === 'article' ? 'post' : 'note'}</>;\n case 'repost':\n return <>{actorText} reposted your {group.post?.type === 'article' ? 'post' : 'note'}</>;\n case 'reply':\n if (group.inReplyTo && typeof group.inReplyTo !== 'string') {\n return actorText;\n }\n break;\n case 'mention':\n return actorText;\n }\n\n return <></>;\n};\n\nconst ProfileLinkedContent: React.FC<{\n content: string;\n className?: string;\n stripTags?: string[];\n}> = ({content, className, stripTags = []}) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const navigate = useNavigateWithBasePath();\n\n useEffect(() => {\n const element = contentRef.current;\n if (!element) {\n return;\n }\n\n const handleProfileLinkClick = (e: Event) => {\n const target = (e as MouseEvent).target as HTMLElement;\n const link = target.closest('a[data-profile]');\n\n if (link) {\n const handle = link.getAttribute('data-profile')?.trim();\n const isValidHandle = /^@([\\w.-]+)@([\\w-]+\\.[\\w.-]+[a-zA-Z])$/.test(handle || '');\n\n if (isValidHandle && handle) {\n e.preventDefault();\n e.stopPropagation();\n handleProfileClick(handle, navigate);\n }\n }\n };\n\n element.addEventListener('click', handleProfileLinkClick);\n return () => {\n element.removeEventListener('click', handleProfileLinkClick);\n };\n }, [navigate, content]);\n\n return (\n <div\n dangerouslySetInnerHTML={{__html: stripHtml(content || '', stripTags)}}\n ref={contentRef}\n className={className}\n />\n );\n};\n\nconst Notifications: React.FC = () => {\n const [openStates, setOpenStates] = React.useState<{[key: string]: boolean}>({});\n const navigate = useNavigateWithBasePath();\n\n const toggleOpen = (groupId: string) => {\n setOpenStates(prev => ({\n ...prev,\n [groupId]: !prev[groupId]\n }));\n };\n\n const handleLikeClick = () => {\n // Do API req or smth\n // Don't need to know about setting timeouts or anything like that\n };\n\n const maxAvatars = 5;\n\n const {data, error, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading} = useNotificationsForUser('index');\n\n const notificationGroups = (\n data?.pages.flatMap((page) => {\n return groupNotifications(page.notifications);\n })\n // If no notifications, return 10 empty groups for the loading state\n ?? Array(10).fill({actors: [{}]}));\n\n const observerRef = useRef<IntersectionObserver | null>(null);\n const loadMoreRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n\n observerRef.current = new IntersectionObserver((entries) => {\n if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) {\n fetchNextPage();\n }\n });\n\n if (loadMoreRef.current) {\n observerRef.current.observe(loadMoreRef.current);\n }\n\n return () => {\n if (observerRef.current) {\n observerRef.current.disconnect();\n }\n };\n }, [hasNextPage, isFetchingNextPage, fetchNextPage]);\n\n const handleNotificationClick = (group: NotificationGroup, index: number) => {\n switch (group.type) {\n case 'like':\n if (group.post) {\n navigate(`/${group.post.type === 'article' ? 'reader' : 'notes'}/${encodeURIComponent(group.post.id)}`);\n }\n break;\n case 'reply':\n if (group.post && group.inReplyTo) {\n navigate(`/notes/${encodeURIComponent(group.post.id)}`);\n }\n break;\n case 'repost':\n if (group.post) {\n navigate(`/${group.post.type === 'article' ? 'reader' : 'notes'}/${encodeURIComponent(group.post.id)}`);\n }\n break;\n case 'follow':\n if (group.actors.length > 1) {\n toggleOpen(group.id || `${group.type}_${index}`);\n } else {\n handleProfileClick(group.actors[0].handle, navigate);\n }\n break;\n case 'mention':\n if (group.post) {\n navigate(`/notes/${encodeURIComponent(group.post.id)}`);\n }\n break;\n }\n };\n\n if (error && isApiError(error)) {\n return <AppError errorCode={error.code} statusCode={error.statusCode}/>;\n }\n\n return (\n <Layout>\n <div className='z-0 flex w-full flex-col items-center'>\n {\n isLoading === false && notificationGroups.length === 0 && (\n <EmptyViewIndicator>\n <EmptyViewIcon><LucideIcon.Bell /></EmptyViewIcon>\n Quiet for now, but not for long! When someone likes, boosts, or replies to you, you'll find it here.\n </EmptyViewIndicator>\n )\n }\n {\n (notificationGroups.length > 0) && (\n <>\n <div className='my-8 flex w-full max-w-[620px] flex-col max-md:mt-5'>\n {notificationGroups.map((group, index) => (\n <React.Fragment key={group.id || `${group.type}_${index}`}>\n <NotificationItem\n centerAlign={group.actors.length < 2 && group.type === 'follow'}\n className='hover:bg-gray-75 dark:hover:bg-gray-950'\n isGrouped={group.actors.length > 1}\n onClick={() => handleNotificationClick(group, index)}\n >\n {isLoading ?\n <Skeleton className='rounded-full' containerClassName='flex h-10 w-10' /> :\n (group.actors.length > 1 ?\n <NotificationItem.Icon type={group.type} /> :\n <div className='relative'>\n <APAvatar\n key={group.actors[0].id}\n author={{\n icon: {\n url: group.actors[0].avatarUrl || ''\n },\n name: group.actors[0].name,\n handle: group.actors[0].handle\n }}\n size='notification'\n />\n <NotificationIcon className='absolute -bottom-1 -right-1 z-10 border-2 border-white dark:border-black' notificationType={group.type} size='sm' />\n </div>\n )\n }\n {group.actors.length > 1 && <NotificationItem.Avatars>\n <div className='flex w-full flex-col'>\n <div className='relative flex items-center pl-2'>\n {!openStates[group.id || `${group.type}_${index}`] && group.actors.slice(0, maxAvatars).map((actor: ActorProperties) => (\n <APAvatar\n key={actor.id}\n author={{\n icon: {\n url: actor.avatarUrl || ''\n },\n name: actor.name,\n handle: actor.handle\n }}\n className='-ml-2 !bg-[#F3F3F3] outline outline-2 outline-white group-hover:!bg-[#EDEEF0] group-hover:outline-gray-75 dark:outline-black group-hover:dark:outline-gray-950'\n size='notification'\n />\n ))}\n {group.actors.length > maxAvatars && (!openStates[group.id || `${group.type}_${index}`]) && (\n <div className='absolute right-[28px] z-10 flex size-9 items-center justify-center rounded-full bg-black/50 text-base font-semibold tracking-tightest text-white'>\n {`+${group.actors.length - maxAvatars}`}\n </div>\n )}\n\n {group.actors.length > 1 && (\n <Button className={`group flex items-center gap-0.5 text-gray-700 hover:bg-transparent hover:text-black dark:text-gray-600 dark:hover:text-white ${openStates[group.id || `${group.type}_${index}`] ? 'ml-[-20px]' : 'ml-0 w-[28px]'}`} variant='ghost' onClick={(event?: React.MouseEvent<HTMLElement>) => {\n event?.stopPropagation();\n toggleOpen(group.id || `${group.type}_${index}`);\n }}>\n <LucideIcon.ChevronDown className={`${openStates[group.id || `${group.type}_${index}`] ? 'rotate-180' : ''}`} size={20} strokeWidth={1.5} />\n {openStates[group.id || `${group.type}_${index}`] ? 'Hide' : <span className='sr-only'>Show all</span>}\n </Button>\n )}\n </div>\n <div className={`overflow-hidden transition-all duration-300 ease-in-out ${openStates[group.id || `${group.type}_${index}`] ? 'mb-2 max-h-[1384px] opacity-100' : 'max-h-0 opacity-0'}`}>\n {openStates[group.id || `${group.type}_${index}`] && group.actors.length > 1 && (\n <div className='flex flex-col gap-2 pt-2'>\n {group.actors.map((actor: ActorProperties) => (\n <div\n key={actor.id}\n className='group/item flex items-center justify-between gap-4 break-anywhere'\n onClick={(e) => {\n e?.stopPropagation();\n handleProfileClick(actor.handle, navigate);\n }}\n >\n <div className='flex min-w-0 items-center'>\n <APAvatar author={{\n icon: {\n url: actor.avatarUrl || ''\n },\n name: actor.name,\n handle: actor.handle\n }} size='xs' />\n <span className='ml-2 line-clamp-1 text-base font-semibold group-hover/item:underline dark:text-white'>{actor.name}</span>\n <span className='ml-1 line-clamp-1 text-base text-gray-700 dark:text-gray-600'>{actor.handle}</span>\n </div>\n {group.type === 'follow' && !actor.followedByMe && (\n <FollowButton\n following={false}\n handle={actor.handle}\n variant=\"link\"\n />\n )}\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n </NotificationItem.Avatars>}\n <NotificationItem.Content>\n <div>\n {isLoading ?\n <>\n <Skeleton />\n <Skeleton className='w-full max-w-60' />\n </> :\n <div className='flex justify-between'>\n <div className='flex items-center gap-1'>\n <span className='truncate'><NotificationGroupDescription group={group} /></span>\n {group.actors.length < 2 &&\n <>\n <span className='mt-px text-[8px] text-gray-700 dark:text-gray-600'>•</span>\n <span className='mt-0.5 text-sm text-gray-700 dark:text-gray-600'>{renderTimestamp(group, false)}</span>\n </>\n }\n </div>\n {/* Follow button for singular follow, reply, and mention */}\n {group.actors.length === 1 && (group.type === 'follow' || group.type === 'reply' || group.type === 'mention') && !group.actors[0].followedByMe && (\n <FollowButton\n following={false}\n handle={group.actors[0].handle}\n variant=\"link\"\n />\n )}\n </div>\n }\n </div>\n {(\n ((group.type === 'reply' && group.inReplyTo) || group.type === 'mention') ||\n (group.type === 'like' && !group.post?.name && group.post?.content) ||\n (group.type === 'repost' && !group.post?.name && group.post?.content)\n ) && (\n (group.type !== 'reply' && group.type !== 'mention' ?\n <div className='ap-note-content mt-0.5 line-clamp-1 text-pretty text-sm text-gray-700 dark:text-gray-600'>\n {group.post?.type === 'article' && group.post?.title && <>{group.post.title} — </>}\n <span dangerouslySetInnerHTML={{__html: stripHtml(group.post?.content || '')}} />\n </div> :\n <>\n <div className='mt-2.5 rounded-md bg-gray-100 px-5 py-[14px] group-hover:bg-gray-200 dark:bg-gray-925/30 group-hover:dark:bg-black/40'>\n <ProfileLinkedContent\n className='ap-note-content text-pretty'\n content={group.post?.content || ''}\n stripTags={['a']}\n />\n {group.post && group.post.attachments && group.post.attachments.length > 0 && (\n <div className='notification-attachments mb-1 [&_.attachment-gallery]:flex [&_.attachment-gallery]:flex-wrap [&_img]:aspect-square [&_img]:max-w-[calc(20%-6.4px)]'>\n {renderFeedAttachment(\n {...group.post, type: 'Note', attachment: group.post.attachments}\n )}\n </div>\n )}\n </div>\n </>\n )\n )}\n {((group.type === 'reply' && group.post) || group.type === 'mention') && (\n <div className=\"mt-1.5\">\n <FeedItemStats\n actor={{\n ...group.actors[0],\n icon: {\n url: group.actors[0].avatarUrl || ''\n },\n id: group.actors[0].url,\n preferredUsername: group.actors[0].handle?.replace(/^@([^@]+)@.*$/, '$1') || 'unknown'\n }}\n buttonClassName='hover:bg-gray-200'\n commentCount={group.post.replyCount || 0}\n layout=\"notification\"\n likeCount={group.post.likeCount || 0}\n object={{\n ...group.post,\n liked: group.post.likedByMe,\n reposted: group.post.repostedByMe\n }}\n repostCount={group.post.repostCount || 0}\n onLikeClick={handleLikeClick}\n />\n </div>\n )}\n </NotificationItem.Content>\n </NotificationItem>\n {index < notificationGroups.length - 1 &&\n <div className='pl-[52px]'><Separator /></div>\n }\n </React.Fragment>\n ))}\n </div>\n <div ref={loadMoreRef} className='h-1'></div>\n {isFetchingNextPage && (\n <div className='-mt-4 mb-8 flex flex-col items-center justify-center space-y-4 text-center'>\n <LoadingIndicator size='md' />\n </div>\n )}\n </>\n )\n }\n </div>\n </Layout>\n );\n};\n\nexport default Notifications;\n"],"names":["__iconNode","Repeat2","createLucideIcon","UserRoundCheck","NotificationIcon","notificationType","size","className","icon","badgeColor","iconColor","iconSize","strokeWidth","jsx","LucideIcon.UserRoundCheck","LucideIcon.Heart","LucideIcon.Reply","LucideIcon.Repeat2","LucideIcon.AtSign","NotificationContext","React","NotificationItem","isGrouped","centerAlign","children","onClick","url","Icon","type","Avatars","Content","Separator","getTimeBucket","timestamp","timeMs","groupNotifications","notifications","groups","lastType","sequenceCounter","notification","groupKey","timeBucket","sequence","_a","_b","a","NotificationGroupDescription","group","firstActor","otherActors","hasOthers","actorClass","navigate","useNavigateWithBasePath","actorText","jsxs","Fragment","ProfilePreviewHoverCard","e","handleProfileClick","ProfileLinkedContent","content","stripTags","contentRef","useRef","useEffect","element","handleProfileLinkClick","link","handle","stripHtml","Notifications","openStates","setOpenStates","toggleOpen","groupId","prev","handleLikeClick","maxAvatars","data","error","fetchNextPage","hasNextPage","isFetchingNextPage","isLoading","useNotificationsForUser","notificationGroups","page","observerRef","loadMoreRef","entries","handleNotificationClick","index","isApiError","AppError","Layout","EmptyViewIndicator","EmptyViewIcon","LucideIcon.Bell","Skeleton","APAvatar","actor","Button","event","LucideIcon.ChevronDown","FollowButton","renderTimestamp","_c","_d","_e","_f","_g","_h","renderFeedAttachment","FeedItemStats","_i","LoadingI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