@vis3/kit 1.1.1 → 1.1.3
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.mjs +2 -2
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -88406,8 +88406,8 @@ function aD(e) {
|
|
|
88406
88406
|
const a = () => {
|
|
88407
88407
|
n && window.clearTimeout(n), n = window.setTimeout(() => {
|
|
88408
88408
|
const s = e.getBoundingClientRect(), l = e.parentElement?.getBoundingClientRect(), u = Math.floor(s.width), c = Math.floor(l ? l.height : 0);
|
|
88409
|
-
(Math.abs(u - i.width) >
|
|
88410
|
-
},
|
|
88409
|
+
(Math.abs(u - i.width) > 20 || Math.abs(c - i.height) > 20) && (i = { width: u, height: c }, r(i));
|
|
88410
|
+
}, 200);
|
|
88411
88411
|
}, o = new ResizeObserver(() => {
|
|
88412
88412
|
requestAnimationFrame(a);
|
|
88413
88413
|
});
|
package/dist/index.umd.js
CHANGED
|
@@ -385,7 +385,7 @@ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var I=se(Y,ne,re,oe,ae+"
|
|
|
385
385
|
`;function Yse({className:e,name:t,value:r,extraTail:n,titleExtra:i}){const a=G.useRef(null),[o,{wrap:s}]=ki(),[l]=Mi(r),[u,c]=G.useState(r);G.useEffect(()=>{c(r)},[r]);const Q=G.useMemo(()=>({wrap:s??!1,value:u,onChange:c}),[s,u]);return j.jsx(t4.Provider,{value:Q,children:j.jsx(R2,{ref:a,className:e,titleExtra:i,name:t,extra:j.jsxs(Gse,{children:[j.jsx(K2,{elementRef:a}),o,l,n]}),children:j.jsx(XQ,{})})})}const Mf={content_list:Hse,img_list:yse,html:Vse,markdown:Wse,json:Xse,image:Nse,raw:Yse,csv:wse},Kse={$schema:"http://json-schema.org/draft-07/schema#",type:"object",title:"文件类数据格式标准",properties:{track_id:{type:"string",description:"全局唯一id,不随获取、清洗方法的变化而变化。可以是uuid,也可以是hash值"},url:{type:"string",description:"文件的URL,通常适用于从互联网上获取的PDF/电子书,可为空。",default:""},path:{type:"string",description:"文件的存储路径,通常为S3路径。",default:""},date:{type:"integer",description:"采集的爬取时间"},content_length:{type:"integer",description:"文件大小,字节数"},content_type:{type:"string",description:"文件类型"},title:{type:"string",description:"网页的标题"},body_bytes:{type:"string",description:"文件的字节流采用base64编码表示"},remark:{type:"object",description:"备注信息,例如:点赞数,爬取时的主机名等。key-value结构体,key不要求在文档之间对其。"},doc_loc:{type:"string",description:"数据的唯一S3路径"},track_loc:{type:"array",description:"数据之前的S3路径列表",items:{type:"string"}}},required:["track_id","path","body_bytes"]},Jse={$schema:"http://json-schema.org/draft-07/schema#",type:"object",title:"HTML数据格式标准",properties:{track_id:{type:"string",description:"全局唯一id,不随获取、清洗方法的变化而变化。可以是uuid,也可以是hash值"},url:{type:"string",description:"网页的URL,电子书等网页数据,可留空。",default:""},status:{type:"integer",default:200,description:"采集的HTTP返回码",minimum:100,maximum:599},request_header:{type:"object",description:"采集的HTTP返回头"},response_header:{type:"object",description:"采集的HTTP返回头"},date:{type:"integer",description:"采集的爬取时间"},content_length:{type:"integer",description:"HTTP的响应体长度"},content_charset:{type:"string",description:"HTTP的响应体编码"},title:{type:"string",description:"网页的标题"},base_url:{type:"string",description:"网页的base url,如果有"},body_bytes:{type:"string",description:"网页的body部分的二进制数据"},html:{type:"string",description:"网页的完整HTML文本"},main_html:{type:"string",description:"网页的主要HTML文本"},remark:{type:"object",description:"备注信息,例如:点赞数,爬取时的主机名等。key-value结构体,key不要求在文档之间对其。"},doc_loc:{type:"string",description:"数据的唯一S3路径"},track_loc:{type:"array",description:"数据之前的S3路径列表",items:{type:"string"}}},anyOf:[{required:["main_html"]},{required:["body_bytes"]},{required:["html"]}],required:["track_id","url"]},e7e={$schema:"http://json-schema.org/draft-07/schema#",type:"object",title:"图文交错数据格式标准",properties:{track_id:{type:"string",description:"全局唯一id,不随获取、清洗方法的变化而变化。可以是uuid,也可以是hash值"},id:{type:"string",description:"全局唯一的数据ID。一条原始数据,经过多次清洗,其内容可能会发生变化,这种情况下,每次清洗出的数据,应该具有不同的ID。"},url:{type:"string",description:"来源URL。非网页数据,该字段可以留空。"},title:{type:"string",description:"网页的标题"},base_url:{type:"string",description:"网页的base url,如果有"},content_list:{type:"array",description:"文档中的内容列表,包含文本、图像、或其它媒体内容的信息。",items:{$ref:"#/definitions/ContentItem"}},language:{type:"string",description:"多语言数据集,可采用该字段标识每篇文档的语言。",enum:["zh","zh-Hans","en","zh-Hant","code-python","code-java","code-c","code-cpp"]},split:{type:"string",enum:["train","val","test","exam"]},data_source:{type:"string",enum:["code-github","zh-zhihu-article","zh-zhihu-answer","zh-baidu-jingyan","zh-cnnews","mm-laion-5b","zh-toutiao-news","mm-cc-12m"]},subset:{type:"string",description:"有些data_source,可能有多个子集,在这里记录。"},sub_path:{type:"string",description:"数据的子路径。"},labels:{type:"object",$ref:"#/definitions/LabelItem",description:"文档的标签。该字段是一个对象(字典),对象中的各个字段对应的值应该尽可能是基本类型(数值、布尔值、标签等)。"},pii:{type:"object",description:"个人隐私信息识别结果"},html:{type:"string",description:"网页的完整HTML文本"},main_html:{type:"string",description:"网页的主要HTML文本"},remark:{type:"object",description:"备注信息,例如:点赞数,爬取时的主机名等。key-value结构体,key不要求在文档之间对其。"},doc_loc:{type:"string",description:"数据的唯一S3路径"},track_loc:{type:"array",description:"数据之前的S3路径列表",items:{type:"string"}}},anyOf:[{required:["main_html"]},{required:["body_bytes"]},{required:["html"]}],required:["track_id","url"],definitions:{ContentItem:{type:"object",description:"content_list item",properties:{type:{type:"string",enum:["image","text","audio","video","table","list","code","quote","hr","equation"]},html:{type:"string"},text_level:{type:"integer",maximum:9,minimum:0,default:0,description:"文本的heading级别,0表示普通正文,1表示一级标题,以此类推。当type为text时,该字段才有意义。"},text_format:{type:"string",enum:["text","md","latex"]},text:{type:"string"},table_caption:{type:"string",description:"表格的caption,当type为table时,该字段才有意义。"},img_urls:{type:"array",items:{type:"string"},description:"当type为image时,该字段为图片的url"},img_url_hash:{type:"string",description:"当type为image时,该字段为图片的hash值"},img_path:{type:"string",description:"图像的s3路径"},img_alt:{type:"string",description:"图像的alt属性"},img_data:{type:"string",description:"当type为image,且图像链接为data url时,该字段为data url的内容。"},img_title:{type:"string",description:"图像的title属性"},img_caption:{type:"string",description:"图像的caption"},sources:{type:"array",items:{type:"string"},description:"当type为video/audio时,该字段包含了媒体文件的链接。"}},required:["type"]},LabelItem:{type:"object",properties:{is_safe:{type:"boolean",description:"表示内容是安全的,无需进行其他内容相关的过滤。"},pjwk_cates:{type:"object",description:"世界知识树分类"},subject_cates:{type:"object",description:"学科分类"},xp_num:{type:"string",description:"抽取时名中的规则"},drop_list:{type:"boolean",description:"抽取时是否有丢弃正文中的列表"},has_gov_cn:{type:"boolean",description:"是否有gov.cn域名"},is_url_gfwed:{type:"boolean",description:"域名是否在防火墙名单中"},source_charset:{type:"string",description:"源网页的字符集"},en_fluency_bert_prob:{type:"number",description:"英文流利度"},en_non_ad_bert_prob:{type:"number",description:"英文非广告概率"},en_politics_ft_prob:{type:"number",description:"涉政概率"},en_toxic_ft_prob:{type:"number",description:"毒害概率"},domain_level:{type:"string",description:"域名等级"},unsafe_word_min_level:{type:"string",description:"关键字等级"}}}}},t7e=new Au(e7e),r7e=new Au(Jse),n7e=new Au(Kse),i7e={html:"html",main_html:"html",content:"markdown",content_list:"content_list",img_list:"img_list"},a7e=["html","main_html","body_bytes"],o7e=["content_list"],s7e=["path","track_loc"],l7e=["content","img_list"],u7e=Ee(Yk)`
|
|
386
386
|
height: 100%;
|
|
387
387
|
overflow: auto;
|
|
388
|
-
`;function Yk({renderAs:e,...t}){const[r,{renderType:n}]=Hee(e),i=Mf[n??e]??Mf.raw,a=G.useMemo(()=>({builtIns:r}),[r]);return j.jsx(oS.Provider,{value:a,children:j.jsx(i,{...t})})}function Kk(e){const[t,r]=G.useState({width:0,height:0});return G.useLayoutEffect(()=>{if(!e)return;let n,i={width:0,height:0};const a=()=>{n&&window.clearTimeout(n),n=window.setTimeout(()=>{const s=e.getBoundingClientRect(),l=e.parentElement?.getBoundingClientRect(),u=Math.floor(s.width),c=Math.floor(l?l.height:0);(Math.abs(u-i.width)>
|
|
388
|
+
`;function Yk({renderAs:e,...t}){const[r,{renderType:n}]=Hee(e),i=Mf[n??e]??Mf.raw,a=G.useMemo(()=>({builtIns:r}),[r]);return j.jsx(oS.Provider,{value:a,children:j.jsx(i,{...t})})}function Kk(e){const[t,r]=G.useState({width:0,height:0});return G.useLayoutEffect(()=>{if(!e)return;let n,i={width:0,height:0};const a=()=>{n&&window.clearTimeout(n),n=window.setTimeout(()=>{const s=e.getBoundingClientRect(),l=e.parentElement?.getBoundingClientRect(),u=Math.floor(s.width),c=Math.floor(l?l.height:0);(Math.abs(u-i.width)>20||Math.abs(c-i.height)>20)&&(i={width:u,height:c},r(i))},200)},o=new ResizeObserver(()=>{requestAnimationFrame(a)});return o.observe(e),()=>{o.disconnect(),n&&window.clearTimeout(n)}},[e]),t}function Jk(e,t){return e==="content"?"markdown":typeof t=="string"&&t.replace(/\r|\n/g,"").startsWith("<!DOCTYPE html>")||e==="html"||e==="main_html"?"html":e==="content_list"||e==="img_list"?e:(Array.isArray(t),"raw")}class h8{current;parent;constructor(t,r){this.current=t,this.parent=r}get fullPath(){let t=this.current,r=this.parent;for(;r;)r.current!==""?t=`${r.current}.${t}`:t=`${t}`,r=r.parent;return t}}const c7e=Ee.div`
|
|
389
389
|
display: flex;
|
|
390
390
|
gap: 0.5rem;
|
|
391
391
|
align-items: center;
|