g-comments 0.1.0 → 0.2.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/CHANGELOG.md +17 -0
- package/README.md +40 -5
- package/dist/{chunk-X6RAR374.cjs → chunk-IBNNENCZ.cjs} +14 -2
- package/dist/chunk-IBNNENCZ.cjs.map +1 -0
- package/dist/{chunk-6E3M3PQN.js → chunk-WACVXJHD.js} +14 -2
- package/dist/chunk-WACVXJHD.js.map +1 -0
- package/dist/element.d.ts +58 -5
- package/dist/element.js +22 -18
- package/dist/element.js.map +1 -1
- package/dist/index.cjs +16 -16
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{messages-BlBkT6Kr.d.cts → messages-C9bMljl3.d.cts} +51 -1
- package/dist/{messages-BlBkT6Kr.d.ts → messages-C9bMljl3.d.ts} +51 -1
- package/dist/react.cjs +232 -35
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +20 -5
- package/dist/react.d.ts +20 -5
- package/dist/react.js +202 -6
- package/dist/react.js.map +1 -1
- package/package.json +9 -9
- package/dist/chunk-6E3M3PQN.js.map +0 -1
- package/dist/chunk-X6RAR374.cjs.map +0 -1
|
@@ -2658,6 +2658,7 @@ function createClientWithInternals(options, internals) {
|
|
|
2658
2658
|
const realtime = internals.realtime ?? new MessageBusPoller({ base: forum.base, fetch: http.fetch, log });
|
|
2659
2659
|
const batcher = new CountsBatcher(http);
|
|
2660
2660
|
let configGeneration = 0;
|
|
2661
|
+
let themePromise = null;
|
|
2661
2662
|
let degradedRecheck;
|
|
2662
2663
|
let degradedChecks = 0;
|
|
2663
2664
|
function config() {
|
|
@@ -2776,6 +2777,16 @@ function createClientWithInternals(options, internals) {
|
|
|
2776
2777
|
}
|
|
2777
2778
|
return http.request("POST", `${threadPath(threadId)}/attachments`, { form });
|
|
2778
2779
|
}
|
|
2780
|
+
function theme() {
|
|
2781
|
+
if (lifetime.signal.aborted) {
|
|
2782
|
+
return Promise.reject(disposedError());
|
|
2783
|
+
}
|
|
2784
|
+
themePromise ??= http.request("GET", "/theme").catch((error) => {
|
|
2785
|
+
themePromise = null;
|
|
2786
|
+
throw error;
|
|
2787
|
+
});
|
|
2788
|
+
return themePromise;
|
|
2789
|
+
}
|
|
2779
2790
|
const client = {
|
|
2780
2791
|
forum: forum.base,
|
|
2781
2792
|
forumOrigin: forum.origin,
|
|
@@ -2784,6 +2795,7 @@ function createClientWithInternals(options, internals) {
|
|
|
2784
2795
|
threads: { open },
|
|
2785
2796
|
attachments: { upload },
|
|
2786
2797
|
config,
|
|
2798
|
+
theme,
|
|
2787
2799
|
counts: (refs) => batcher.request(refs),
|
|
2788
2800
|
count: async (ref) => (await batcher.request([ref]))[encodeRef(ref)] ?? 0,
|
|
2789
2801
|
preview: async (body) => (await http.request("POST", "/preview", { json: { raw: body } })).html,
|
|
@@ -3052,5 +3064,5 @@ function createTranslator(locale, overrides = {}) {
|
|
|
3052
3064
|
}
|
|
3053
3065
|
|
|
3054
3066
|
export { CommentsError, PACKAGE_NAME, STORAGE_PREFIX, clientRegistry, createClient, createClientRegistry, createComposerTimer, createTranslator, currentUrlWithoutHash, defaultPageUrl, en, encodeRef, findComment, isCommentsError, isVirtualThread, locales, memoryStorage, normalizeForum, ptBR, resolveLocale };
|
|
3055
|
-
//# sourceMappingURL=chunk-
|
|
3056
|
-
//# sourceMappingURL=chunk-
|
|
3067
|
+
//# sourceMappingURL=chunk-WACVXJHD.js.map
|
|
3068
|
+
//# sourceMappingURL=chunk-WACVXJHD.js.map
|