@netless/app-slide 0.0.44 → 0.0.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/app-slide",
3
- "version": "0.0.44",
3
+ "version": "0.0.48",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "devDependencies": {
13
13
  "@netless/app-shared": "^0.1.1",
14
- "@netless/slide": "^0.1.48",
14
+ "@netless/slide": "^0.1.51",
15
15
  "@types/color-string": "^1.5.2",
16
16
  "color-string": "^1.9.0",
17
17
  "side-effect-manager": "^0.1.5",
@@ -22,5 +22,6 @@
22
22
  "build": "vite build && npm run types",
23
23
  "build:dev": "vite build --mode development && npm run types",
24
24
  "cleanup": "rimraf ./dist"
25
- }
25
+ },
26
+ "readme": "## @netless/app-slide\n\nNetless App for viewing animated slides, in our new engine.\n\n[中文](./README-zh.md)\n\n### Usage\n\n```ts\nimport type { Attributes as SlideAttributes } from \"@netless/app-slide\";\n\n// 1. register before joining room\nWindowManager.register({\n kind: \"Slide\",\n appOptions: {\n // turn on to show debug controller\n debug: false,\n },\n src: async () => {\n const app = await import(\"@netless/app-slide\");\n return app.default ?? app;\n },\n});\n\n// 2. when joined room, add ppt to whiteboard\nmanager.addApp({\n kind: \"Slide\",\n options: {\n scenePath: `/ppt/${uuid}`, // [1]\n title: \"a.pptx\",\n },\n attributes: {\n taskId: \"1234567...\", // [2]\n url: \"https://convertcdn.netless.link/dynamicConvert\", // [3]\n } as SlideAttributes,\n});\n```\n\nParameters:\n\n1. (**required**) `scenePath`\n\n Which scene to be put on top of slides.\n\n2. (**required**) `taskId`\n\n The [PPT conversion](https://developer.netless.link/server-en/home/server-conversion) task id.\n\n3. (optional) `url`\n\n The base url of ppt resources, `https://convertcdn.netless.link/dynamicConvert` by default.\n\n### Preview\n\n```ts\nimport { previewSlide } from \"@netless/app-slide\";\n\nconst previewer = previewSlide({\n container: document.getElementById(\"preview\"),\n taskId: \"1234567...\",\n});\n\npreviewer.destroy();\n```\n\n### License\n\nMIT @ [netless](https://github.com/netless-io)\n"
26
27
  }
@@ -122,11 +122,18 @@ $namespace: $slide-namespace;
122
122
  transition: background 0.4s;
123
123
  cursor: pointer;
124
124
  user-select: none;
125
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
125
126
 
126
127
  &:hover {
127
128
  background: rgba(237, 237, 240, 0.9);
128
129
  }
129
130
 
131
+ @media (hover: none) {
132
+ &:hover {
133
+ background: transparent !important;
134
+ }
135
+ }
136
+
130
137
  & > svg {
131
138
  width: 100%;
132
139
  height: 100%;
@@ -170,12 +177,19 @@ $namespace: $slide-namespace;
170
177
  border: none;
171
178
  outline: none;
172
179
  width: 1.5em;
180
+ margin: 0;
181
+ padding: 0 2px;
173
182
  text-align: right;
183
+ font-size: 13px;
184
+ line-height: 1;
185
+ font-weight: normal;
186
+ font-family: inherit;
174
187
  border-radius: 2px;
175
188
  color: currentColor;
176
189
  background: transparent;
177
190
  transition: background 0.4s;
178
191
  user-select: text;
192
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
179
193
 
180
194
  &:hover,
181
195
  &:focus,
@@ -186,30 +200,7 @@ $namespace: $slide-namespace;
186
200
  }
187
201
 
188
202
  .#{$namespace}-readonly {
189
- .#{$namespace}-footer-btn {
190
- cursor: not-allowed;
191
-
192
- &:hover {
193
- background: transparent;
194
- }
195
- }
196
-
197
- .#{$namespace}-page-number-input {
198
- cursor: not-allowed;
199
-
200
- &:hover,
201
- &:focus,
202
- &:active {
203
- background: transparent;
204
- box-shadow: none;
205
- }
206
-
207
- &:disabled {
208
- color: inherit;
209
- }
210
- }
211
-
212
- &.#{$namespace}-float-footer {
203
+ &.#{$namespace}-footer {
213
204
  display: none;
214
205
  }
215
206
  }
@@ -235,4 +226,3 @@ $namespace: $slide-namespace;
235
226
  background: rgba(50, 50, 50, 0.9);
236
227
  }
237
228
  }
238
-
package/src/index.ts CHANGED
@@ -22,7 +22,7 @@ export { SlidePreviewer, default as previewSlide } from "./SlidePreviewer";
22
22
 
23
23
  export type { Attributes, AddHooks, FreezableSlide };
24
24
 
25
- export const version = "0.0.44";
25
+ export const version = "0.0.48";
26
26
 
27
27
  export { DefaultUrl, apps, FreezerLength, addHooks };
28
28