@arbidocs/react 0.5.54 → 0.5.55

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/index.cjs CHANGED
@@ -6289,6 +6289,32 @@ var ChatBubble = React.memo(function ChatBubble2({
6289
6289
  }
6290
6290
  );
6291
6291
  });
6292
+ function hashText(text) {
6293
+ let h = 5381;
6294
+ for (let i = 0; i < text.length; i++) h = h * 33 ^ text.charCodeAt(i);
6295
+ return (h >>> 0).toString(36);
6296
+ }
6297
+ function createSkillPack({ id, skills, marker }) {
6298
+ const version = hashText(skills.map((skill) => skill.markdown).join("\n"));
6299
+ const slug = marker?.slug ?? `${id}-version`;
6300
+ const note = marker?.note ?? "The version of the skills installed here. Not for use.";
6301
+ return {
6302
+ id,
6303
+ version,
6304
+ marker: {
6305
+ slug,
6306
+ markdown: `---
6307
+ name: ${slug}
6308
+ description: ${version}
6309
+ user-invocable: false
6310
+ ---
6311
+
6312
+ ${note}
6313
+ `
6314
+ },
6315
+ skills
6316
+ };
6317
+ }
6292
6318
  var installs = /* @__PURE__ */ new WeakMap();
6293
6319
  function useInstallSkillPack(pack) {
6294
6320
  const arbi = chunkYRY6DGRU_cjs.useArbi();
@@ -15628,6 +15654,7 @@ exports.connectOAuthCalendarAccount = connectOAuthCalendarAccount;
15628
15654
  exports.connectorErrorStatus = connectorErrorStatus;
15629
15655
  exports.connectorReturnTo = connectorReturnTo;
15630
15656
  exports.createMailClient = createMailClient;
15657
+ exports.createSkillPack = createSkillPack;
15631
15658
  exports.createStreamHandlers = createStreamHandlers;
15632
15659
  exports.createWorkspaceSwitch = createWorkspaceSwitch;
15633
15660
  exports.cropImage = cropImage;