asma-doc-viewer 1.0.8 → 1.0.9

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.
@@ -0,0 +1,125 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="2420ee6f-9c38-476f-82bf-3c5a7aca550a" name="Changes" comment="">
8
+ <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/src/plugins/webp/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/plugins/webp/index.tsx" afterDir="false" />
10
+ </list>
11
+ <option name="SHOW_DIALOG" value="false" />
12
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
13
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14
+ <option name="LAST_RESOLUTION" value="IGNORE" />
15
+ </component>
16
+ <component name="ComposerSettings">
17
+ <execution />
18
+ </component>
19
+ <component name="Git.Settings">
20
+ <option name="RECENT_BRANCH_BY_REPOSITORY">
21
+ <map>
22
+ <entry key="$PROJECT_DIR$" value="master" />
23
+ </map>
24
+ </option>
25
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
26
+ <option name="RESET_MODE" value="HARD" />
27
+ </component>
28
+ <component name="GitLabMergeRequestsSettings">{}</component>
29
+ <component name="GitToolBoxStore">
30
+ <option name="recentBranches">
31
+ <RecentBranches>
32
+ <option name="branchesForRepo">
33
+ <list>
34
+ <RecentBranchesForRepo>
35
+ <option name="branches">
36
+ <list>
37
+ <RecentBranch>
38
+ <option name="branchName" value="feat/ASMA-2845-new-api-webp" />
39
+ <option name="lastUsedInstant" value="1708988811" />
40
+ </RecentBranch>
41
+ <RecentBranch>
42
+ <option name="branchName" value="master" />
43
+ <option name="lastUsedInstant" value="1708988796" />
44
+ </RecentBranch>
45
+ </list>
46
+ </option>
47
+ <option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
48
+ </RecentBranchesForRepo>
49
+ </list>
50
+ </option>
51
+ </RecentBranches>
52
+ </option>
53
+ </component>
54
+ <component name="GithubPullRequestsUISettings">{}</component>
55
+ <component name="KubernetesApiProvider">{}</component>
56
+ <component name="MarkdownSettingsMigration">
57
+ <option name="stateVersion" value="1" />
58
+ </component>
59
+ <component name="ProjectColorInfo">{}</component>
60
+ <component name="ProjectId" id="25ENHDhJCwOrfTBlC0Ap5oFVrBf" />
61
+ <component name="ProjectViewState">
62
+ <option name="hideEmptyMiddlePackages" value="true" />
63
+ <option name="showLibraryContents" value="true" />
64
+ </component>
65
+ <component name="PropertiesComponent"><![CDATA[{
66
+ "keyToString": {
67
+ "git-widget-placeholder": "feat/ASMA-2845-new-api-webp",
68
+ "last_opened_file_path": "/Users/utopiaeh/Developer/carasent/srv/doc-viewer/src/plugins",
69
+ "node.js.selected.package.tslint": "(autodetect)",
70
+ "npm.build.executor": "Run",
71
+ "ts.external.directory.path": "/Users/utopiaeh/Developer/carasent/srv/doc-viewer/node_modules/typescript/lib"
72
+ }
73
+ }]]></component>
74
+ <component name="RecentsManager">
75
+ <key name="CopyFile.RECENT_KEYS">
76
+ <recent name="$PROJECT_DIR$/src/plugins" />
77
+ </key>
78
+ <key name="MoveFile.RECENT_KEYS">
79
+ <recent name="$PROJECT_DIR$" />
80
+ </key>
81
+ </component>
82
+ <component name="RunManager">
83
+ <configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
84
+ <package-json value="$PROJECT_DIR$/package.json" />
85
+ <command value="run" />
86
+ <scripts>
87
+ <script value="build" />
88
+ </scripts>
89
+ <node-interpreter value="project" />
90
+ <envs />
91
+ <method v="2" />
92
+ </configuration>
93
+ <recent_temporary>
94
+ <list>
95
+ <item itemvalue="npm.build" />
96
+ </list>
97
+ </recent_temporary>
98
+ </component>
99
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
100
+ <component name="TaskManager">
101
+ <task active="true" id="Default" summary="Default task">
102
+ <changelist id="2420ee6f-9c38-476f-82bf-3c5a7aca550a" name="Changes" comment="" />
103
+ <created>1645088197123</created>
104
+ <option name="number" value="Default" />
105
+ <option name="presentableId" value="Default" />
106
+ <updated>1645088197123</updated>
107
+ <workItem from="1645088199643" duration="810000" />
108
+ </task>
109
+ <servers />
110
+ </component>
111
+ <component name="TypeScriptGeneratedFilesManager">
112
+ <option name="version" value="3" />
113
+ </component>
114
+ <component name="Vcs.Log.Tabs.Properties">
115
+ <option name="TAB_STATES">
116
+ <map>
117
+ <entry key="MAIN">
118
+ <value>
119
+ <State />
120
+ </value>
121
+ </entry>
122
+ </map>
123
+ </option>
124
+ </component>
125
+ </project>
@@ -10,49 +10,29 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
37
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
- var react_1 = __importStar(require("react"));
17
+ var react_1 = __importDefault(require("react"));
41
18
  var image_1 = __importDefault(require("../image"));
42
19
  var WEBPRenderer = function (props) {
43
- var _a;
44
- var _b = (0, react_1.useState)(), imageUrl = _b[0], setImageUrl = _b[1];
45
- var webpBuffer = (_a = props.mainState.currentDocument) === null || _a === void 0 ? void 0 : _a.fileData;
46
- (0, react_1.useEffect)(function () {
47
- if (webpBuffer) {
48
- var blob = new Blob([webpBuffer], { type: 'image/webp' });
49
- var url = URL.createObjectURL(blob);
50
- setImageUrl(url);
51
- }
52
- }, [webpBuffer]);
20
+ var _a, _b;
21
+ // const [imageUrl, setImageUrl] = useState<undefined | string | ArrayBuffer>();
22
+ // const webpBuffer = props.mainState.currentDocument?.fileData;
23
+ // useEffect(() => {
24
+ // if (webpBuffer) {
25
+ // const blob = new Blob([webpBuffer], {type: 'image/webp'});
26
+ // const url = URL.createObjectURL(blob);
27
+ // setImageUrl(url);
28
+ // }
29
+ // }, [webpBuffer]);
53
30
  return (react_1.default.createElement(image_1.default, __assign({}, props),
54
31
  react_1.default.createElement("picture", null,
55
- react_1.default.createElement("source", { srcSet: imageUrl }))));
32
+ react_1.default.createElement("source", { srcSet: (_a = props.mainState.currentDocument) === null || _a === void 0 ? void 0 : _a.uri }),
33
+ react_1.default.createElement("div", null,
34
+ react_1.default.createElement("span", null, "img tag"),
35
+ react_1.default.createElement("img", { src: (_b = props.mainState.currentDocument) === null || _b === void 0 ? void 0 : _b.uri })))));
56
36
  };
57
37
  WEBPRenderer.fileTypes = ["webp", "image/webp"];
58
38
  WEBPRenderer.weight = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asma-doc-viewer",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "test",
5
5
  "author": "",
6
6
  "license": "ISC",