From de18b667b924e5fb5f04d8e66bb4b6f2d1693e51 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Thu, 22 Sep 2022 16:26:53 -0400 Subject: [PATCH] unpkg issues with tfjs --- docz/docs/03-demos/43-ml.mdx | 9 ++++----- docz/docs/08-api/07-write-options.md | 2 ++ docz/static/tfjs/tf.min.js | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 docz/static/tfjs/tf.min.js diff --git a/docz/docs/03-demos/43-ml.mdx b/docz/docs/03-demos/43-ml.mdx index 854278f..b0a2119 100644 --- a/docz/docs/03-demos/43-ml.mdx +++ b/docz/docs/03-demos/43-ml.mdx @@ -3,7 +3,7 @@ title: Typed Arrays and ML --- - + Machine learning libraries in JS typically use "Typed Arrays". Typed Arrays are @@ -15,11 +15,10 @@ This demo covers conversions between worksheets and Typed Arrays for use with :::note -The live code blocks in this demo load the standalone TensorFlow.js build: +The live code blocks in this demo load the standalone TensorFlow.js build from +version `3.18.0`. It is shipped in the NodeJS package at `/dist/tf.min.js`. -```html - -``` +[Official installation notes](https://www.tensorflow.org/js/tutorials/setup) ::: diff --git a/docz/docs/08-api/07-write-options.md b/docz/docs/08-api/07-write-options.md index ddfd609..ef2cb2e 100644 --- a/docz/docs/08-api/07-write-options.md +++ b/docz/docs/08-api/07-write-options.md @@ -125,6 +125,8 @@ The scripts will be available at `xlsx/dist/xlsx.zahl` (CommonJS) and ```js import * as XLSX from "xlsx"; import XLSX_ZAHL_PAYLOAD from "xlsx/dist/xlsx.zahl"; +import * as fs from "fs"; +XLSX.set_fs(fs); var wb = XLSX.utils.book_new(); var ws = XLSX.utils.aoa_to_sheet([ ["SheetJS", "<3","விரிதாள்"], [72,,"Arbeitsblätter"], diff --git a/docz/static/tfjs/tf.min.js b/docz/static/tfjs/tf.min.js new file mode 100644 index 0000000..1b510b4 --- /dev/null +++ b/docz/static/tfjs/tf.min.js @@ -0,0 +1,18 @@ +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).tf=e.tf||{})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=function(e){return e&&e.Math==Math&&e},a=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},o=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l={f:u&&!s.call({1:2},1)?function(e){var t=u(this,e);return!!t&&t.enumerable}:s},c=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},p={}.toString,h=function(e){return p.call(e).slice(8,-1)},f="".split,d=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==h(e)?f.call(e,""):Object(e)}:Object,m=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},v=function(e){return d(m(e))},g=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e,t){if(!g(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!g(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!g(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!g(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},b={}.hasOwnProperty,x=function(e,t){return b.call(e,t)},w=a.document,k=g(w)&&g(w.createElement),N=function(e){return k?w.createElement(e):{}},I=!o&&!i((function(){return 7!=Object.defineProperty(N("div"),"a",{get:function(){return 7}}).a})),S=Object.getOwnPropertyDescriptor,T={f:o?S:function(e,t){if(e=v(e),t=y(t,!0),I)try{return S(e,t)}catch(e){}if(x(e,t))return c(!l.f.call(e,t),e[t])}},E=function(e){if(!g(e))throw TypeError(String(e)+" is not an object");return e},C=Object.defineProperty,R={f:o?C:function(e,t,n){if(E(e),t=y(t,!0),E(n),I)try{return C(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},A=o?function(e,t,n){return R.f(e,t,c(1,n))}:function(e,t,n){return e[t]=n,e},_=function(e,t){try{A(a,e,t)}catch(n){a[e]=t}return t},F="__core-js_shared__",D=a[F]||_(F,{}),O=Function.toString;"function"!=typeof D.inspectSource&&(D.inspectSource=function(e){return O.call(e)});var M,L,z,P=D.inspectSource,B=a.WeakMap,W="function"==typeof B&&/native code/.test(P(B)),U=n((function(e){(e.exports=function(e,t){return D[e]||(D[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),V=0,G=Math.random(),j=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++V+G).toString(36)},H=U("keys"),q=function(e){return H[e]||(H[e]=j(e))},K={},X=a.WeakMap;if(W){var Y=D.state||(D.state=new X),J=Y.get,Z=Y.has,Q=Y.set;M=function(e,t){return t.facade=e,Q.call(Y,e,t),t},L=function(e){return J.call(Y,e)||{}},z=function(e){return Z.call(Y,e)}}else{var $=q("state");K[$]=!0,M=function(e,t){return t.facade=e,A(e,$,t),t},L=function(e){return x(e,$)?e[$]:{}},z=function(e){return x(e,$)}}var ee,te,ne={set:M,get:L,has:z,enforce:function(e){return z(e)?L(e):M(e,{})},getterFor:function(e){return function(t){var n;if(!g(t)||(n=L(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},re=n((function(e){var t=ne.get,n=ne.enforce,r=String(String).split("String");(e.exports=function(e,t,i,o){var s,u=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof t||x(i,"name")||A(i,"name",t),(s=n(i)).source||(s.source=r.join("string"==typeof t?t:""))),e!==a?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=i:A(e,t,i)):l?e[t]=i:_(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||P(this)}))})),ae=a,ie=function(e){return"function"==typeof e?e:void 0},oe=function(e,t){return arguments.length<2?ie(ae[e])||ie(a[e]):ae[e]&&ae[e][t]||a[e]&&a[e][t]},se=Math.ceil,ue=Math.floor,le=function(e){return isNaN(e=+e)?0:(e>0?ue:se)(e)},ce=Math.min,pe=function(e){return e>0?ce(le(e),9007199254740991):0},he=Math.max,fe=Math.min,de=function(e,t){var n=le(e);return n<0?he(n+t,0):fe(n,t)},me=function(e){return function(t,n,r){var a,i=v(t),o=pe(i.length),s=de(r,o);if(e&&n!=n){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},ve={includes:me(!0),indexOf:me(!1)},ge=ve.indexOf,ye=function(e,t){var n,r=v(e),a=0,i=[];for(n in r)!x(K,n)&&x(r,n)&&i.push(n);for(;t.length>a;)x(r,n=t[a++])&&(~ge(i,n)||i.push(n));return i},be=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xe=be.concat("length","prototype"),we={f:Object.getOwnPropertyNames||function(e){return ye(e,xe)}},ke={f:Object.getOwnPropertySymbols},Ne=oe("Reflect","ownKeys")||function(e){var t=we.f(E(e)),n=ke.f;return n?t.concat(n(e)):t},Ie=function(e,t){for(var n=Ne(t),r=R.f,a=T.f,i=0;i=74)&&(ee=Me.match(/Chrome\/(\d+)/))&&(te=ee[1]);var Be,We=te&&+te,Ue=!!Object.getOwnPropertySymbols&&!i((function(){return!Symbol.sham&&(Oe?38===We:We>37&&We<41)})),Ve=Ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ge=Array.isArray||function(e){return"Array"==h(e)},je=function(e){return Object(m(e))},He=Object.keys||function(e){return ye(e,be)},qe=o?Object.defineProperties:function(e,t){E(e);for(var n,r=He(t),a=r.length,i=0;a>i;)R.f(e,n=r[i++],t[n]);return e},Ke=oe("document","documentElement"),Xe=q("IE_PROTO"),Ye=function(){},Je=function(e){return"