@ai-matrx/associations 0.14.79 → 0.14.80
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 +11 -1
- package/dist/{CommentThread-iSMK-0Lb.d.cts → CommentThread-BKGU9jR-.d.cts} +7 -0
- package/dist/{CommentThread-iSMK-0Lb.d.ts → CommentThread-BKGU9jR-.d.ts} +7 -0
- package/dist/core/index.cjs +13 -5
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -6
- package/dist/core/index.d.ts +2 -6
- package/dist/core/index.js +13 -5
- package/dist/core/index.js.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react/index.cjs +18 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +9 -3
- package/dist/react/index.d.ts +9 -3
- package/dist/react/index.js +18 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/lazy/index.d.cts +1 -1
- package/dist/react/lazy/index.d.ts +1 -1
- package/dist/{results-DS6_WIIP.d.cts → results-DFj4RsFJ.d.cts} +7 -0
- package/dist/{results-DS6_WIIP.d.ts → results-DFj4RsFJ.d.ts} +7 -0
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { r as ASSOCIATION_TARGET_TYPES, s as AssociationDirection, h as AssociationEdge, t as AssociationPickerProps, j as AssociationSourceEdge, i as AssociationTargetEdge, f as AssociationTargetType, q as AssociationsConfig, d as AssociationsDataSource, n as AssociationsEntry, e as AssociationsIdentity, u as AssociationsNotifier, A as AssociationsRpcError, v as AssociationsRpcErrorCode, w as AssociationsRpcOnlyDataSource, g as AssociationsRpcResult, x as AuthorDisplayInput, y as AuthorDisplayPort, z as CapturePickOpts, B as CapturePort, D as CaptureShownTo, F as CaptureUploadOpts, G as CaptureUploadResult, o as CategoriesEntry, C as CategoryDimension, H as CommentAgentAuthor, l as CommentAnchor, I as CommentAuthor, p as CommentsEntry, J as ComponentEntityToken, K as ENTITY_TYPE_METADATA, L as ENTITY_TYPE_TOKENS, M as EntityDoorProps, N as EntityDoorsPort, b as EntityOverlayEntry, E as EntityOverlayMap, O as EntityRefProps, Q as EntityTypeMeta, a as EntityTypeToken, c as ErrorSink, R as ListedEntityToken, S as ModuleEntityToken, T as PartAnchor, V as PgError, W as PickerOverrideMap, P as PlatformCategory, m as PlatformComment, X as REFERENCE_CATEGORY_DISPLAY, Y as ReferencePickableEntityToken, Z as SCHEMA_DISPLAY, _ as ScopeableEntityToken, k as UserEntityState, U as UserStateKind, $ as WindowShellPort, a0 as isAssociationTargetType, a1 as isAssociationsRpcErr, a2 as isEntityTypeToken, a3 as partKeyOf } from './results-
|
|
1
|
+
export { r as ASSOCIATION_TARGET_TYPES, s as AssociationDirection, h as AssociationEdge, t as AssociationPickerProps, j as AssociationSourceEdge, i as AssociationTargetEdge, f as AssociationTargetType, q as AssociationsConfig, d as AssociationsDataSource, n as AssociationsEntry, e as AssociationsIdentity, u as AssociationsNotifier, A as AssociationsRpcError, v as AssociationsRpcErrorCode, w as AssociationsRpcOnlyDataSource, g as AssociationsRpcResult, x as AuthorDisplayInput, y as AuthorDisplayPort, z as CapturePickOpts, B as CapturePort, D as CaptureShownTo, F as CaptureUploadOpts, G as CaptureUploadResult, o as CategoriesEntry, C as CategoryDimension, H as CommentAgentAuthor, l as CommentAnchor, I as CommentAuthor, p as CommentsEntry, J as ComponentEntityToken, K as ENTITY_TYPE_METADATA, L as ENTITY_TYPE_TOKENS, M as EntityDoorProps, N as EntityDoorsPort, b as EntityOverlayEntry, E as EntityOverlayMap, O as EntityRefProps, Q as EntityTypeMeta, a as EntityTypeToken, c as ErrorSink, R as ListedEntityToken, S as ModuleEntityToken, T as PartAnchor, V as PgError, W as PickerOverrideMap, P as PlatformCategory, m as PlatformComment, X as REFERENCE_CATEGORY_DISPLAY, Y as ReferencePickableEntityToken, Z as SCHEMA_DISPLAY, _ as ScopeableEntityToken, k as UserEntityState, U as UserStateKind, $ as WindowShellPort, a0 as isAssociationTargetType, a1 as isAssociationsRpcErr, a2 as isEntityTypeToken, a3 as partKeyOf } from './results-DFj4RsFJ.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@ai-matrx/data/db';
|
|
4
4
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { r as ASSOCIATION_TARGET_TYPES, s as AssociationDirection, h as AssociationEdge, t as AssociationPickerProps, j as AssociationSourceEdge, i as AssociationTargetEdge, f as AssociationTargetType, q as AssociationsConfig, d as AssociationsDataSource, n as AssociationsEntry, e as AssociationsIdentity, u as AssociationsNotifier, A as AssociationsRpcError, v as AssociationsRpcErrorCode, w as AssociationsRpcOnlyDataSource, g as AssociationsRpcResult, x as AuthorDisplayInput, y as AuthorDisplayPort, z as CapturePickOpts, B as CapturePort, D as CaptureShownTo, F as CaptureUploadOpts, G as CaptureUploadResult, o as CategoriesEntry, C as CategoryDimension, H as CommentAgentAuthor, l as CommentAnchor, I as CommentAuthor, p as CommentsEntry, J as ComponentEntityToken, K as ENTITY_TYPE_METADATA, L as ENTITY_TYPE_TOKENS, M as EntityDoorProps, N as EntityDoorsPort, b as EntityOverlayEntry, E as EntityOverlayMap, O as EntityRefProps, Q as EntityTypeMeta, a as EntityTypeToken, c as ErrorSink, R as ListedEntityToken, S as ModuleEntityToken, T as PartAnchor, V as PgError, W as PickerOverrideMap, P as PlatformCategory, m as PlatformComment, X as REFERENCE_CATEGORY_DISPLAY, Y as ReferencePickableEntityToken, Z as SCHEMA_DISPLAY, _ as ScopeableEntityToken, k as UserEntityState, U as UserStateKind, $ as WindowShellPort, a0 as isAssociationTargetType, a1 as isAssociationsRpcErr, a2 as isEntityTypeToken, a3 as partKeyOf } from './results-
|
|
1
|
+
export { r as ASSOCIATION_TARGET_TYPES, s as AssociationDirection, h as AssociationEdge, t as AssociationPickerProps, j as AssociationSourceEdge, i as AssociationTargetEdge, f as AssociationTargetType, q as AssociationsConfig, d as AssociationsDataSource, n as AssociationsEntry, e as AssociationsIdentity, u as AssociationsNotifier, A as AssociationsRpcError, v as AssociationsRpcErrorCode, w as AssociationsRpcOnlyDataSource, g as AssociationsRpcResult, x as AuthorDisplayInput, y as AuthorDisplayPort, z as CapturePickOpts, B as CapturePort, D as CaptureShownTo, F as CaptureUploadOpts, G as CaptureUploadResult, o as CategoriesEntry, C as CategoryDimension, H as CommentAgentAuthor, l as CommentAnchor, I as CommentAuthor, p as CommentsEntry, J as ComponentEntityToken, K as ENTITY_TYPE_METADATA, L as ENTITY_TYPE_TOKENS, M as EntityDoorProps, N as EntityDoorsPort, b as EntityOverlayEntry, E as EntityOverlayMap, O as EntityRefProps, Q as EntityTypeMeta, a as EntityTypeToken, c as ErrorSink, R as ListedEntityToken, S as ModuleEntityToken, T as PartAnchor, V as PgError, W as PickerOverrideMap, P as PlatformCategory, m as PlatformComment, X as REFERENCE_CATEGORY_DISPLAY, Y as ReferencePickableEntityToken, Z as SCHEMA_DISPLAY, _ as ScopeableEntityToken, k as UserEntityState, U as UserStateKind, $ as WindowShellPort, a0 as isAssociationTargetType, a1 as isAssociationsRpcErr, a2 as isEntityTypeToken, a3 as partKeyOf } from './results-DFj4RsFJ.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@ai-matrx/data/db';
|
|
4
4
|
|
package/dist/react/index.cjs
CHANGED
|
@@ -98,6 +98,7 @@ function AssociationsProvider({
|
|
|
98
98
|
entityDoors,
|
|
99
99
|
authorDisplay,
|
|
100
100
|
commentBody,
|
|
101
|
+
signIn,
|
|
101
102
|
children
|
|
102
103
|
}) {
|
|
103
104
|
const notifierWarned = (0, import_react2.useRef)(false);
|
|
@@ -113,7 +114,8 @@ function AssociationsProvider({
|
|
|
113
114
|
...pickerOverrides !== void 0 ? { pickerOverrides } : {},
|
|
114
115
|
...entityDoors !== void 0 ? { entityDoors } : {},
|
|
115
116
|
...authorDisplay !== void 0 ? { authorDisplay } : {},
|
|
116
|
-
...commentBody !== void 0 ? { commentBody } : {}
|
|
117
|
+
...commentBody !== void 0 ? { commentBody } : {},
|
|
118
|
+
...signIn !== void 0 ? { signIn } : {}
|
|
117
119
|
},
|
|
118
120
|
children
|
|
119
121
|
}
|
|
@@ -1411,6 +1413,14 @@ function isEntityTypeToken(value) {
|
|
|
1411
1413
|
return typeof value === "string" && ENTITY_TYPE_TOKEN_SET.has(value);
|
|
1412
1414
|
}
|
|
1413
1415
|
|
|
1416
|
+
// src/core/rpcResult.ts
|
|
1417
|
+
var import_net = require("@ai-matrx/api/net");
|
|
1418
|
+
var SIGNED_OUT_LEAD = "You're signed out";
|
|
1419
|
+
var SIGNED_OUT_MESSAGE = `${SIGNED_OUT_LEAD}. Sign in again \u2014 your text is kept here.`;
|
|
1420
|
+
function isSignedOutMessage(text) {
|
|
1421
|
+
return typeof text === "string" && text.startsWith(SIGNED_OUT_LEAD);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1414
1424
|
// src/association-types.generated.ts
|
|
1415
1425
|
var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
|
|
1416
1426
|
"agent>agent",
|
|
@@ -6292,6 +6302,7 @@ function CommentComposer({
|
|
|
6292
6302
|
autoFocus = false
|
|
6293
6303
|
}) {
|
|
6294
6304
|
const notifier = useNotifier();
|
|
6305
|
+
const { signIn } = useAssociationsUiPorts();
|
|
6295
6306
|
const [body, setBody] = (0, import_react26.useState)(initialValue);
|
|
6296
6307
|
const [submitting, setSubmitting] = (0, import_react26.useState)(false);
|
|
6297
6308
|
const [error, setError] = (0, import_react26.useState)(null);
|
|
@@ -6337,6 +6348,7 @@ function CommentComposer({
|
|
|
6337
6348
|
origin: "associations/CommentThread"
|
|
6338
6349
|
}
|
|
6339
6350
|
),
|
|
6351
|
+
error && signIn && isSignedOutMessage(error) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SignInAgain, { onClick: signIn }),
|
|
6340
6352
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6341
6353
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_design_system15.Button, { type: "submit", size: "sm", disabled: !body.trim() || submitting, children: [
|
|
6342
6354
|
submitting && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SpinnerIcon, { className: "mr-1 h-3 w-3 animate-spin" }),
|
|
@@ -6582,6 +6594,7 @@ function CommentThread({
|
|
|
6582
6594
|
className
|
|
6583
6595
|
}) {
|
|
6584
6596
|
const thread = useComments({ token, id });
|
|
6597
|
+
const { signIn: signInPort } = useAssociationsUiPorts();
|
|
6585
6598
|
const tree = buildCommentTree(thread.comments);
|
|
6586
6599
|
const { childrenOf } = tree;
|
|
6587
6600
|
const roots = part ? tree.roots.filter((c) => partKeyOf(c) === part.key) : tree.roots;
|
|
@@ -6613,6 +6626,7 @@ function CommentThread({
|
|
|
6613
6626
|
origin: "associations/CommentThread",
|
|
6614
6627
|
children: [
|
|
6615
6628
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 flex-1", children: thread.error }),
|
|
6629
|
+
signInPort && isSignedOutMessage(thread.error) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SignInAgain, { onClick: signInPort }),
|
|
6616
6630
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
6617
6631
|
import_design_system15.Button,
|
|
6618
6632
|
{
|
|
@@ -6656,4 +6670,7 @@ function CommentThread({
|
|
|
6656
6670
|
)
|
|
6657
6671
|
] });
|
|
6658
6672
|
}
|
|
6673
|
+
function SignInAgain({ onClick }) {
|
|
6674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_design_system15.Button, { type: "button", size: "sm", variant: "outline", onClick, children: "Sign in" });
|
|
6675
|
+
}
|
|
6659
6676
|
//# sourceMappingURL=index.cjs.map
|