@industry-theme/agent-panels 0.2.43 → 0.2.44

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SkillCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/skills/components/SkillCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAEjE,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACrC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAoED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA0a9C,CAAC"}
1
+ {"version":3,"file":"SkillCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/skills/components/SkillCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAEjE,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACrC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAoED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAyb9C,CAAC"}
@@ -2934,6 +2934,108 @@ const useSkillsData = ({
2934
2934
  refreshSkills
2935
2935
  };
2936
2936
  };
2937
+ createContext(null);
2938
+ class PanelErrorBoundary extends React2__default.Component {
2939
+ constructor(props) {
2940
+ super(props);
2941
+ __publicField(this, "reset", () => {
2942
+ this.setState({ error: null });
2943
+ });
2944
+ this.state = { error: null };
2945
+ }
2946
+ static getDerivedStateFromError(error) {
2947
+ return { error };
2948
+ }
2949
+ componentDidCatch(error, errorInfo) {
2950
+ console.error("Panel error:", error, errorInfo);
2951
+ }
2952
+ render() {
2953
+ if (this.state.error) {
2954
+ const Fallback = this.props.fallback;
2955
+ return /* @__PURE__ */ jsx(Fallback, {
2956
+ error: this.state.error,
2957
+ reset: this.reset
2958
+ });
2959
+ }
2960
+ return this.props.children;
2961
+ }
2962
+ }
2963
+ var DATA_TYPES = {
2964
+ FILE_PATH: "file-path"
2965
+ };
2966
+ var DRAG_ACTIONS = {
2967
+ OPEN: "open",
2968
+ INSERT_PATH: "insert-path"
2969
+ };
2970
+ var PANEL_DATA_MIME_TYPE = "application/x-panel-data";
2971
+ function createDragPreview(content2, options) {
2972
+ const preview = document.createElement("div");
2973
+ preview.style.cssText = `
2974
+ position: absolute;
2975
+ top: -1000px;
2976
+ left: -1000px;
2977
+ padding: 8px 12px;
2978
+ background: ${"#3b82f6"};
2979
+ color: ${"white"};
2980
+ border-radius: 6px;
2981
+ font-size: 12px;
2982
+ box-shadow: 0 2px 8px rgba(0,0,0,0.2);
2983
+ display: flex;
2984
+ align-items: center;
2985
+ gap: 8px;
2986
+ white-space: nowrap;
2987
+ `;
2988
+ const text2 = document.createElement("span");
2989
+ text2.textContent = content2;
2990
+ preview.appendChild(text2);
2991
+ return preview;
2992
+ }
2993
+ function useDraggable(config) {
2994
+ const [isDragging, setIsDragging] = useState(false);
2995
+ const handleDragStart = useCallback((e) => {
2996
+ var _a;
2997
+ setIsDragging(true);
2998
+ e.dataTransfer.setData("text/plain", config.primaryData);
2999
+ const panelData = {
3000
+ sourcePanel: config.sourcePanel || "unknown",
3001
+ dataType: config.dataType,
3002
+ primaryData: config.primaryData,
3003
+ metadata: config.metadata,
3004
+ suggestedActions: config.suggestedActions,
3005
+ version: "1.0"
3006
+ };
3007
+ e.dataTransfer.setData(PANEL_DATA_MIME_TYPE, JSON.stringify(panelData));
3008
+ e.dataTransfer.effectAllowed = "copy";
3009
+ if (e.currentTarget instanceof HTMLElement) {
3010
+ e.currentTarget.style.opacity = "0.5";
3011
+ }
3012
+ if (config.dragPreview) {
3013
+ if (config.dragPreview instanceof HTMLElement) {
3014
+ e.dataTransfer.setDragImage(config.dragPreview, 0, 0);
3015
+ } else {
3016
+ const preview = createDragPreview(config.dragPreview);
3017
+ document.body.appendChild(preview);
3018
+ e.dataTransfer.setDragImage(preview, 0, 0);
3019
+ setTimeout(() => document.body.removeChild(preview), 0);
3020
+ }
3021
+ }
3022
+ (_a = config.onDragStart) == null ? void 0 : _a.call(config, e);
3023
+ }, [config]);
3024
+ const handleDragEnd = useCallback((e) => {
3025
+ var _a;
3026
+ setIsDragging(false);
3027
+ if (e.currentTarget instanceof HTMLElement) {
3028
+ e.currentTarget.style.opacity = "1";
3029
+ }
3030
+ (_a = config.onDragEnd) == null ? void 0 : _a.call(config, e);
3031
+ }, [config]);
3032
+ return {
3033
+ draggable: true,
3034
+ onDragStart: handleDragStart,
3035
+ onDragEnd: handleDragEnd,
3036
+ isDragging
3037
+ };
3038
+ }
2937
3039
  const getSourceConfig$1 = (source2) => {
2938
3040
  switch (source2) {
2939
3041
  case "global-universal":
@@ -3008,6 +3110,19 @@ const SkillCard = ({
3008
3110
  const { theme: theme2 } = useTheme();
3009
3111
  const sourceConfig = getSourceConfig$1(skill.source);
3010
3112
  const [pathCopied, setPathCopied] = React2__default.useState(false);
3113
+ const { isDragging, ...dragProps } = useDraggable({
3114
+ dataType: DATA_TYPES.FILE_PATH,
3115
+ primaryData: skill.path,
3116
+ // Use skill path
3117
+ metadata: {
3118
+ name: skill.name,
3119
+ description: skill.description,
3120
+ source: skill.source
3121
+ },
3122
+ suggestedActions: [DRAG_ACTIONS.INSERT_PATH, DRAG_ACTIONS.OPEN],
3123
+ sourcePanel: "skills-panel",
3124
+ dragPreview: skill.name
3125
+ });
3011
3126
  const getPathToCopy = () => {
3012
3127
  if (!filterContext || !skill.installedLocations || skill.installedLocations.length <= 1) {
3013
3128
  return skill.path;
@@ -3040,12 +3155,13 @@ const SkillCard = ({
3040
3155
  "div",
3041
3156
  {
3042
3157
  onClick: () => onClick == null ? void 0 : onClick(skill),
3158
+ ...dragProps,
3043
3159
  style: {
3044
3160
  padding: "16px",
3045
3161
  background: isSelected ? `${theme2.colors.primary}10` : theme2.colors.surface,
3046
3162
  border: `1px solid ${isSelected ? theme2.colors.primary : theme2.colors.border}`,
3047
3163
  borderRadius: theme2.radii[2],
3048
- cursor: onClick ? "pointer" : "default",
3164
+ cursor: isDragging ? "grabbing" : onClick ? "pointer" : "default",
3049
3165
  transition: "all 0.2s ease",
3050
3166
  display: "flex",
3051
3167
  flexDirection: "column",
@@ -48758,6 +48874,7 @@ var DocumentView = ({
48758
48874
  content: content2,
48759
48875
  onCheckboxChange,
48760
48876
  maxWidth = "900px",
48877
+ width,
48761
48878
  slideIdPrefix = "document",
48762
48879
  enableHtmlPopout = true,
48763
48880
  enableKeyboardScrolling = true,
@@ -48802,7 +48919,8 @@ var DocumentView = ({
48802
48919
  handlePromptCopy,
48803
48920
  repositoryInfo,
48804
48921
  transparentBackground,
48805
- editable
48922
+ editable,
48923
+ containerWidth: width
48806
48924
  })));
48807
48925
  };
48808
48926
  function extractHeaders(markdown2) {