@useago/sdk 0.2.1 → 0.3.1

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/react.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CNZpIYwj.js";
2
2
  import { t as AgoClient } from "./AgoClient-CNT-8sh_.js";
3
3
  import { t as createMockClient } from "./createMockClient-U0ae_AYy.js";
4
- import React, { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
4
+ import React, { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/react/hooks/useAgo.ts
7
7
  /**
@@ -21627,7 +21627,9 @@ var makeHeading = (level, fontSize) => {
21627
21627
  var MarkdownUnorderedList = ({ children, ...props }) => /* @__PURE__ */ jsx("ul", {
21628
21628
  style: {
21629
21629
  margin: "0 0 8px 0",
21630
- paddingLeft: "20px"
21630
+ paddingLeft: "20px",
21631
+ listStyleType: "disc",
21632
+ listStylePosition: "outside"
21631
21633
  },
21632
21634
  ...props,
21633
21635
  children
@@ -21635,13 +21637,16 @@ var MarkdownUnorderedList = ({ children, ...props }) => /* @__PURE__ */ jsx("ul"
21635
21637
  var MarkdownOrderedList = ({ children, ...props }) => /* @__PURE__ */ jsx("ol", {
21636
21638
  style: {
21637
21639
  margin: "0 0 8px 0",
21638
- paddingLeft: "20px"
21640
+ paddingLeft: "20px",
21641
+ listStyleType: "decimal",
21642
+ listStylePosition: "outside"
21639
21643
  },
21640
21644
  ...props,
21641
21645
  children
21642
21646
  });
21643
21647
  var MarkdownListItem = ({ children, ...props }) => /* @__PURE__ */ jsx("li", {
21644
21648
  style: {
21649
+ display: "list-item",
21645
21650
  margin: "2px 0",
21646
21651
  lineHeight: "1.6"
21647
21652
  },
@@ -22395,6 +22400,26 @@ function useAgoContext(entryOrProvider, key) {
22395
22400
  ]);
22396
22401
  }
22397
22402
  //#endregion
22398
- export { AgoProvider, ChatInput, ChatWidget, Markdown, Message, createMockClient, useAgo, useAgoClient, useAgoContext, useAgoFunction, useAgoNavigation, useChat, useConversation, useMessages, useOptionalAgoClient };
22403
+ //#region src/react/hooks/useAgoStore.ts
22404
+ /**
22405
+ * Read a framework-agnostic AGO store (`createStore`) reactively in React.
22406
+ *
22407
+ * Re-renders the component whenever the store's value changes. Mutate the store
22408
+ * via `store.set(...)`, not the value returned here.
22409
+ *
22410
+ * ```tsx
22411
+ * const cart = createStore({ items: [] as string[] });
22412
+ *
22413
+ * function CartBadge() {
22414
+ * const { items } = useAgoStore(cart);
22415
+ * return <span>{items.length}</span>;
22416
+ * }
22417
+ * ```
22418
+ */
22419
+ function useAgoStore(store) {
22420
+ return useSyncExternalStore(store.subscribe, store.get, store.get);
22421
+ }
22422
+ //#endregion
22423
+ export { AgoProvider, ChatInput, ChatWidget, Markdown, Message, createMockClient, useAgo, useAgoClient, useAgoContext, useAgoFunction, useAgoNavigation, useAgoStore, useChat, useConversation, useMessages, useOptionalAgoClient };
22399
22424
 
22400
22425
  //# sourceMappingURL=react.js.map