slack-blocks-to-jsx 0.0.3 → 0.0.4

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # slack-blocks-to-jsx
2
2
 
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - c8d42a6: minor fix in emoji formating
8
+
3
9
  ## 0.0.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -47,16 +47,16 @@ var dateToTime = (timestamp) => {
47
47
  // src/utils/emojis.ts
48
48
  var import_node_emoji = require("node-emoji");
49
49
  var missing_emojis = {
50
- "heart_hands": "\u{1FAF6}",
51
- "white_frowning_face": "\u{1F641}"
50
+ heart_hands: "\u{1FAF6}",
51
+ white_frowning_face: "\u{1F641}"
52
52
  };
53
53
  var parseEmojis = (text) => {
54
- return (0, import_node_emoji.emojify)(text, {
55
- fallback: (name) => {
56
- var _a;
57
- return (_a = missing_emojis[name]) != null ? _a : `:${name}:`;
58
- }
59
- });
54
+ let emojified = text;
55
+ for (const [key, value] of Object.entries(missing_emojis)) {
56
+ emojified = emojified.replace(key, value);
57
+ }
58
+ emojified = (0, import_node_emoji.emojify)(emojified);
59
+ return emojified;
60
60
  };
61
61
 
62
62
  // src/utils/markdown.tsx
package/dist/index.mjs CHANGED
@@ -11,16 +11,16 @@ var dateToTime = (timestamp) => {
11
11
  // src/utils/emojis.ts
12
12
  import { emojify } from "node-emoji";
13
13
  var missing_emojis = {
14
- "heart_hands": "\u{1FAF6}",
15
- "white_frowning_face": "\u{1F641}"
14
+ heart_hands: "\u{1FAF6}",
15
+ white_frowning_face: "\u{1F641}"
16
16
  };
17
17
  var parseEmojis = (text) => {
18
- return emojify(text, {
19
- fallback: (name) => {
20
- var _a;
21
- return (_a = missing_emojis[name]) != null ? _a : `:${name}:`;
22
- }
23
- });
18
+ let emojified = text;
19
+ for (const [key, value] of Object.entries(missing_emojis)) {
20
+ emojified = emojified.replace(key, value);
21
+ }
22
+ emojified = emojify(emojified);
23
+ return emojified;
24
24
  };
25
25
 
26
26
  // src/utils/markdown.tsx
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "repository": "https://github.com/themashcodee/slack-blocks-to-jsx.git",
13
13
  "license": "MIT",
14
- "version": "0.0.3",
14
+ "version": "0.0.4",
15
15
  "main": "dist/index.js",
16
16
  "module": "dist/index.mjs",
17
17
  "types": "dist/index.d.ts",
@@ -19,11 +19,6 @@
19
19
  "url": "https://github.com/themashcodee/slack-blocks-to-jsx/issues"
20
20
  },
21
21
  "homepage": "https://github.com/themashcodee/slack-blocks-to-jsx#readme",
22
- "scripts": {
23
- "build": "tsup ./src/index.ts --format cjs,esm --dts",
24
- "release": "pnpm run build && changeset publish",
25
- "lint": "tsc"
26
- },
27
22
  "dependencies": {
28
23
  "html-react-parser": "^4.2.2",
29
24
  "node-emoji": "^2.1.0"
@@ -38,5 +33,10 @@
38
33
  "@types/react-dom": "17.0.0",
39
34
  "tsup": "^7.2.0",
40
35
  "typescript": "^5.2.2"
36
+ },
37
+ "scripts": {
38
+ "build": "tsup ./src/index.ts --format cjs,esm --dts",
39
+ "release": "pnpm run build && changeset publish",
40
+ "lint": "tsc"
41
41
  }
42
42
  }