Plugin Directory

Changeset 2994709

Timestamp:
11/12/2023 03:03:40 PM (9 months ago)
Author:
looswebstudio
Message:

Update to version 2.0.1 from GitHub

Location:
highlighting-code-block
Files:
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • highlighting-code-block/tags/2.0.1/build/js/code-block/index.asset.php

    r2994656 r2994709  
    1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'eee4433c3b38834bd373');
     1<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '');
  • highlighting-code-block/tags/2.0.1/build/js/code-block/index.js

    r2994656 r2994709  
    1 (()=>{var e={184:(e,t)=>{var a;!function(){"use strict";var l={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var r=n.apply(null,a);r&&e.push(r)}}else if("object"===o){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var c in a)l.call(a,c)&&a[c]&&e.push(c)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()}},t={};function a(l){var n=t[l];if(void 0!==n)return n.exports;var o=t[l]={exports:{}};return e[l](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.React,l=window.wp.i18n,n=window.wp.blockEditor,o=window.wp.components,r=window.wp.element;var c=a(184),s=a.n(c);const i=window.hcbVars?.showLang,u=window.hcbVars?.showLinenum;let d=window?.hcbLangs||null;const p=[["plain","Plain"],...Object.entries(d)],m=[{value:"",label:"Plain"},...Object.entries(d).map((([e,t])=>({value:e,label:t})))],g=(e="")=>{const t=e.match(/\r\n|\n/g);return null!==t?t.length+1:1};function h(e){return e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):e}const b=JSON.parse('{"u2":"loos-hcb/code-block"}'),f=(0,t.createElement)("svg",{x:"0px",y:"0px",viewBox:"0 0 512 512"},(0,t.createElement)("g",null,(0,t.createElement)("path",{d:"M54.4,348.2H89v51h31.2v-51h34.6V484h-34.6v-54.6H89v54.5H54.4V348.2z"}),(0,t.createElement)("path",{d:"M267.5,345.7c17.5,0,31.6,8.3,41,17.3l-19,21.6c-6.2-5.6-12.8-9.2-22-9.2c-17.3,0-30.5,15.2-30.5,40.4 c0,26.1,13.2,40.6,32,40.6c9,0,16.4-4.5,22.4-11.1l19,21.1c-11.5,13.4-26.7,19.9-43.4,19.9c-35.3,0-65.4-23.1-65.4-69.4 C201.6,371.7,230.9,345.7,267.5,345.7z"}),(0,t.createElement)("path",{d:"M356.5,348.2h44.4c28.2,0,50.6,7.1,50.6,33.7c0,11.8-7.1,25.4-22.9,29.5v0.8c19.2,3.6,29,13.7,29,31.8 c0,28-23.1,40-52.6,40h-48.5V348.2z M399.8,402c12.6,0,17.7-6,17.7-14.9c0-8.6-5.3-12.2-17.7-12.2h-8.5V402H399.8z M402.3,457.2 c14.7,0,21.1-5.5,21.1-16.2c0-10.5-6.4-14.9-21.1-14.9h-11.1v31h11.1V457.2z"})),(0,t.createElement)("polygon",{points:"172,311.6 195,288.6 76.2,165.7 195,42.9 172,19.8 30.1,165.7 "}),(0,t.createElement)("polygon",{points:"340,19.8 317,42.9 435.8,165.7 317,288.6 340,311.6 481.9,165.7 "})),y=[{supports:{className:!1},attributes:{code:{type:"string",source:"text",selector:"code"},className:{type:"string",default:""},langType:{type:"string",default:""},langName:{type:"string",default:""},fileName:{type:"string",default:""},dataLineNum:{type:"string",default:""},isLineShow:{type:"string",default:"undefined"},isShowLang:{type:"string",default:""}},save:({attributes:e})=>{const{code:a,fileName:l,langName:o,dataLineNum:r,isLineShow:c,isShowLang:i}=e,u=e.langType||"plain";let d=s()("prism",`lang-${u}`);return"undefined"!==c&&(d=s()(d,`${c}-numbers`)),(0,t.createElement)("div",{className:"hcb_wrap"},(0,t.createElement)("pre",{className:d,"data-file":l||null,"data-lang":o||null,"data-line":r||null,"data-show-lang":i||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))}},{supports:{className:!1},attributes:{code:{type:"string",source:"text",selector:"code"},className:{type:"string",default:""},langType:{type:"string",default:"plane"},langName:{type:"string",default:""},fileName:{type:"string",default:""},dataLineNum:{type:"string",default:""},isLineShow:{type:"string",default:"undefined"},isShowLang:{type:"string",default:""}},migrate:e=>("plane"===e.langType&&(e.langType=""),e),save:({attributes:e})=>{const{code:a,langType:l,fileName:o,langName:r,dataLineNum:c,isLineShow:s,isShowLang:i}=e,u="prism "+s+"-numbers lang-"+l;return(0,t.createElement)("div",{className:"hcb_wrap"},(0,t.createElement)("pre",{className:u,"data-file":o||null,"data-lang":r||null,"data-line":c||null,"data-show-lang":i||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))}}];(0,e.registerBlockType)(b.u2,{icon:f,transforms:{from:[{type:"block",blocks:["core/code"],transform:t=>(0,e.createBlock)("loos-hcb/code-block",{code:t.content})}],to:[{type:"block",blocks:["core/code"],transform:t=>(0,e.createBlock)("core/code",{content:t.code})}]},edit:({attributes:e,setAttributes:a,clientId:c})=>{const h=(0,r.useRef)(),{className:b,code:f="",langType:y,fileName:v,langName:w,dataLineNum:N,dataStart:E,isShowLang:_,isLineShow:S}=e,[L,x]=(0,r.useState)(g(f)),C=s()("hcb-block","hcb_wrap");(0,r.useEffect)((()=>{const e=b||"";if(!e)return;const t=e.split(" "),l=[...new Set(t)];a({className:s()(l)})}),[b,a]),(0,r.useEffect)((()=>{const{ownerDocument:e}=h.current;if(e){const t=e.querySelector(`#block-${c}`),a=t.querySelector(".hcb_textarea");if(t.style.setProperty("--hcb--code-linenum",L),a.scrollWidth>a.offsetWidth){const e=a.offsetHeight-a.clientHeight;t.style.setProperty("--hcb--scbarH",e+"px")}}}),[c,L]);let T="0";("1"===_||""===_&&"on"===i)&&(T="1");let k=null;("on"===S||"undefined"===S&&"on"===u)&&(k="1");const P=(0,n.useBlockProps)({ref:h,className:C,"data-file":v||null,"data-lang":w||null,"data-show-lang":T,"data-show-linenum":k}),B=[...p];return y||B.shift(),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.BlockControls,null,(0,t.createElement)(o.ToolbarGroup,{isCollapsed:!0,icon:(0,t.createElement)(t.Fragment,null,w||(0,l.__)("Language","loos-hcb")),title:"Lnaguage",controls:B.map((([e,t])=>({key:e,isActive:e===y,title:t,onClick:()=>{a("plain"===e?{langType:"",langName:""}:{langType:e,langName:t})}})))})),(0,t.createElement)(n.InspectorControls,null,(0,t.createElement)(o.PanelBody,{title:(0,l.__)("HCB settings","loos-hcb"),initialOpen:!0},(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Language","loos-hcb"),value:e.langType,options:m,onChange:e=>{a(""===e?{langType:"",langName:""}:{langType:e,langName:d[e]})}}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Display number of rows","loos-hcb"),value:S,options:[{label:(0,l.__)("Do not set individually","loos-hcb"),value:"undefined"},{label:(0,l.__)("Display row count","loos-hcb"),value:"on"},{label:(0,l.__)("Do not display row count","loos-hcb"),value:"off"}],onChange:e=>{a({isLineShow:e})}}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Display language name","loos-hcb"),value:_,options:[{label:(0,l.__)("Do not set individually","loos-hcb"),value:""},{label:(0,l.__)("Display language","loos-hcb"),value:"1"},{label:(0,l.__)("Do not display language","loos-hcb"),value:"0"}],onChange:e=>{a({isShowLang:e})}}),(0,t.createElement)(o.TextControl,{label:(0,l.__)("File name","loos-hcb"),value:v,onChange:e=>{a({fileName:e})}}),(0,t.createElement)(o.TextControl,{label:(0,t.createElement)(t.Fragment,null,(0,l.__)("Highlight Number","loos-hcb")+" ( ",(0,t.createElement)("code",{className:"hcb-code-in-label"},"[data-line]")," )"),value:N,onChange:e=>{a({dataLineNum:e})}}),(0,t.createElement)(o.TextControl,{type:"number",label:(0,t.createElement)(t.Fragment,null,(0,l.__)("First line number","loos-hcb")+" ( ",(0,t.createElement)("code",{className:"hcb-code-in-label"},"[data-start]")," )"),value:E||1,onChange:e=>{a({dataStart:parseInt(e||1)})},style:{opacity:k?1:.5},disabled:!k}))),(0,t.createElement)("div",{...P},(0,t.createElement)("div",{className:"hcb_codewrap"},k&&(0,t.createElement)("div",{className:"hcb_linenum"},(0,t.createElement)("div",{className:"hcb-startNum"},E)),(0,t.createElement)("textarea",{className:"hcb_textarea",placeholder:"Your Code...",value:f,onChange:e=>{const t=e.target.value;a({code:t});const l=g(t);L!==l&&x(l)}}),N&&(0,t.createElement)("div",{className:"hcb-datapreview"},(0,t.createElement)("div",{className:"hcb-datapreview__items"},`{${N}}`)))))},save:({attributes:e})=>{const{code:a,fileName:l,langName:o,dataLineNum:r,dataStart:c,isLineShow:i,isShowLang:u}=e,d=e.langType||"plain",p=s()("prism",`${i}-numbers`,`lang-${d}`),m=n.useBlockProps.save({className:"hcb_wrap"});return(0,t.createElement)("div",{...m},(0,t.createElement)("pre",{className:p,"data-file":l||null,"data-lang":o||null,"data-line":r||null,"data-start":1===c?null:c,"data-show-lang":u||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))},deprecated:y})})()})();
     1(()=>{var e={184:(e,t)=>{var a;!function(){"use strict";var l={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var r=n.apply(null,a);r&&e.push(r)}}else if("object"===o){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var c in a)l.call(a,c)&&a[c]&&e.push(c)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()}},t={};function a(l){var n=t[l];if(void 0!==n)return n.exports;var o=t[l]={exports:{}};return e[l](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.React,l=window.wp.i18n,n=window.wp.blockEditor,o=window.wp.components,r=window.wp.element;var c=a(184),s=a.n(c);const i=window.hcbVars?.showLang,u=window.hcbVars?.showLinenum;let d=window?.hcbLangs||null;const p=[["plain","Plain"],...Object.entries(d)],m=[{value:"",label:"Plain"},...Object.entries(d).map((([e,t])=>({value:e,label:t})))],g=(e="")=>{const t=e.match(/\r\n|\n/g);return null!==t?t.length+1:1};function h(e){return e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):e}const b=JSON.parse('{"u2":"loos-hcb/code-block"}'),f=(0,t.createElement)("svg",{x:"0px",y:"0px",viewBox:"0 0 512 512"},(0,t.createElement)("g",null,(0,t.createElement)("path",{d:"M54.4,348.2H89v51h31.2v-51h34.6V484h-34.6v-54.6H89v54.5H54.4V348.2z"}),(0,t.createElement)("path",{d:"M267.5,345.7c17.5,0,31.6,8.3,41,17.3l-19,21.6c-6.2-5.6-12.8-9.2-22-9.2c-17.3,0-30.5,15.2-30.5,40.4 c0,26.1,13.2,40.6,32,40.6c9,0,16.4-4.5,22.4-11.1l19,21.1c-11.5,13.4-26.7,19.9-43.4,19.9c-35.3,0-65.4-23.1-65.4-69.4 C201.6,371.7,230.9,345.7,267.5,345.7z"}),(0,t.createElement)("path",{d:"M356.5,348.2h44.4c28.2,0,50.6,7.1,50.6,33.7c0,11.8-7.1,25.4-22.9,29.5v0.8c19.2,3.6,29,13.7,29,31.8 c0,28-23.1,40-52.6,40h-48.5V348.2z M399.8,402c12.6,0,17.7-6,17.7-14.9c0-8.6-5.3-12.2-17.7-12.2h-8.5V402H399.8z M402.3,457.2 c14.7,0,21.1-5.5,21.1-16.2c0-10.5-6.4-14.9-21.1-14.9h-11.1v31h11.1V457.2z"})),(0,t.createElement)("polygon",{points:"172,311.6 195,288.6 76.2,165.7 195,42.9 172,19.8 30.1,165.7 "}),(0,t.createElement)("polygon",{points:"340,19.8 317,42.9 435.8,165.7 317,288.6 340,311.6 481.9,165.7 "})),y=[{supports:{className:!1},attributes:{code:{type:"string",source:"text",selector:"code"},className:{type:"string",default:""},langType:{type:"string",default:""},langName:{type:"string",default:""},fileName:{type:"string",default:""},dataLineNum:{type:"string",default:""},isLineShow:{type:"string",default:"undefined"},isShowLang:{type:"string",default:""}},save:({attributes:e})=>{const{code:a,fileName:l,langName:o,dataLineNum:r,isLineShow:c,isShowLang:i}=e,u=e.langType||"plain";let d=s()("prism",`lang-${u}`);return"undefined"!==c&&(d=s()(d,`${c}-numbers`)),(0,t.createElement)("div",{className:"hcb_wrap"},(0,t.createElement)("pre",{className:d,"data-file":l||null,"data-lang":o||null,"data-line":r||null,"data-show-lang":i||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))}},{supports:{className:!1},attributes:{code:{type:"string",source:"text",selector:"code"},className:{type:"string",default:""},langType:{type:"string",default:"plane"},langName:{type:"string",default:""},fileName:{type:"string",default:""},dataLineNum:{type:"string",default:""},isLineShow:{type:"string",default:"undefined"},isShowLang:{type:"string",default:""}},migrate:e=>("plane"===e.langType&&(e.langType=""),e),save:({attributes:e})=>{const{code:a,langType:l,fileName:o,langName:r,dataLineNum:c,isLineShow:s,isShowLang:i}=e,u="prism "+s+"-numbers lang-"+l;return(0,t.createElement)("div",{className:"hcb_wrap"},(0,t.createElement)("pre",{className:u,"data-file":o||null,"data-lang":r||null,"data-line":c||null,"data-show-lang":i||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))}}];(0,e.registerBlockType)(b.u2,{icon:f,transforms:{from:[{type:"block",blocks:["core/code"],transform:t=>(0,e.createBlock)("loos-hcb/code-block",{code:t.content})}],to:[{type:"block",blocks:["core/code"],transform:t=>(0,e.createBlock)("core/code",{content:t.code})}]},edit:({attributes:e,setAttributes:a,clientId:c})=>{const h=(0,r.useRef)(),{className:b,code:f="",langType:y,fileName:v,langName:w,dataLineNum:N,dataStart:E,isShowLang:_,isLineShow:S}=e,[L,x]=(0,r.useState)(g(f)),C=s()("hcb-block","hcb_wrap");(0,r.useEffect)((()=>{const e=b||"";if(!e)return;const t=e.split(" "),l=[...new Set(t)];a({className:s()(l)})}),[b,a]),(0,r.useEffect)((()=>{const{ownerDocument:e}=h.current;if(e){const t=e.querySelector(`#block-${c}`),a=t.querySelector(".hcb_textarea");if(t.style.setProperty("--hcb--code-linenum",L),a.scrollWidth>a.offsetWidth){const e=a.offsetHeight-a.clientHeight;t.style.setProperty("--hcb--scbarH",e+"px")}}}),[c,L]);let T="0";("1"===_||""===_&&"on"===i)&&(T="1");let k=null;("on"===S||"undefined"===S&&"on"===u)&&(k="1");const P=(0,n.useBlockProps)({ref:h,className:C,"data-file":v||null,"data-lang":w||null,"data-show-lang":T,"data-show-linenum":k}),B=[...p];return y||B.shift(),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.BlockControls,null,(0,t.createElement)(o.ToolbarGroup,{isCollapsed:!0,icon:(0,t.createElement)(t.Fragment,null,w||(0,l.__)("Language","loos-hcb")),title:"Lnaguage",controls:B.map((([e,t])=>({key:e,isActive:e===y,title:t,onClick:()=>{a("plain"===e?{langType:"",langName:""}:{langType:e,langName:t})}})))})),(0,t.createElement)(n.InspectorControls,null,(0,t.createElement)(o.PanelBody,{title:(0,l.__)("HCB settings","loos-hcb"),initialOpen:!0},(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Language","loos-hcb"),value:e.langType,options:m,onChange:e=>{a(""===e?{langType:"",langName:""}:{langType:e,langName:d[e]})}}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Display s","loos-hcb"),value:S,options:[{label:(0,l.__)("Do not set individually","loos-hcb"),value:"undefined"},{label:(0,l.__)("Display row count","loos-hcb"),value:"on"},{label:(0,l.__)("Do not display row count","loos-hcb"),value:"off"}],onChange:e=>{a({isLineShow:e})}}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Display language name","loos-hcb"),value:_,options:[{label:(0,l.__)("Do not set individually","loos-hcb"),value:""},{label:(0,l.__)("Display language","loos-hcb"),value:"1"},{label:(0,l.__)("Do not display language","loos-hcb"),value:"0"}],onChange:e=>{a({isShowLang:e})}}),(0,t.createElement)(o.TextControl,{label:(0,l.__)("File name","loos-hcb"),value:v,onChange:e=>{a({fileName:e})}}),(0,t.createElement)(o.TextControl,{label:(0,t.createElement)(t.Fragment,null,(0,l.__)("Highlight Number","loos-hcb")+" ( ",(0,t.createElement)("code",{className:"hcb-code-in-label"},"[data-line]")," )"),value:N,onChange:e=>{a({dataLineNum:e})}}),(0,t.createElement)(o.TextControl,{type:"number",label:(0,t.createElement)(t.Fragment,null,(0,l.__)("First line number","loos-hcb")+" ( ",(0,t.createElement)("code",{className:"hcb-code-in-label"},"[data-start]")," )"),value:E||1,onChange:e=>{a({dataStart:parseInt(e||1)})},style:{opacity:k?1:.5},disabled:!k}))),(0,t.createElement)("div",{...P},(0,t.createElement)("div",{className:"hcb_codewrap"},k&&(0,t.createElement)("div",{className:"hcb_linenum"},(0,t.createElement)("div",{className:"hcb-startNum"},E)),(0,t.createElement)("textarea",{className:"hcb_textarea",placeholder:"Your Code...",value:f,onChange:e=>{const t=e.target.value;a({code:t});const l=g(t);L!==l&&x(l)}}),N&&(0,t.createElement)("div",{className:"hcb-datapreview"},(0,t.createElement)("div",{className:"hcb-datapreview__items"},`{${N}}`)))))},save:({attributes:e})=>{const{code:a,fileName:l,langName:o,dataLineNum:r,dataStart:c,isLineShow:i,isShowLang:u}=e,d=e.langType||"plain",p=s()("prism",`${i}-numbers`,`lang-${d}`),m=n.useBlockProps.save({className:"hcb_wrap"});return(0,t.createElement)("div",{...m},(0,t.createElement)("pre",{className:p,"data-file":l||null,"data-lang":o||null,"data-line":r||null,"data-start":1===c?null:c,"data-show-lang":u||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))},deprecated:y})})()})();
  • highlighting-code-block/tags/2.0.1/highlighting-code-block.php

    r2994656 r2994709  
    44 * Plugin URI: https://wordpress.org/plugins/highlighting-code-block/
    55 * Description: Add code block with syntax highlighting using prism.js. (Available for Gutenberg and Classic Editor)
    6  * Version: 2.0.0
     6 * Version: 2.0.
    77 * Requires at least: 5.6
    88 * Author: LOOS, Inc.
  • highlighting-code-block/tags/2.0.1/languages/loos-hcb-ja-hcb-blocks.json

    r2994656 r2994709  
    1 {"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0;","lang":"ja_JP"},"HCB settings":["HCB設定"],"Language":["言語"],"Display number of rows":["行数の表示"],"Do not set individually":["個別で設定はしない"],"Display row count":["行数を表示する"],"Do not display row count":["行数を表示しない"],"Display language name":["言語の表示"],"Display language":["言語を表示する"],"Do not display language":["言語を表示しない"],"File name":["ファイル名"],"Highlight Number":["ハイライトする行番号"],"First line number":["開始行番号"],"[HCB] Settings":["[HCB] 設定"],"Basic settings":["基本設定"],"Display language name in code block":["コードブロックに言語名を表示する"],"If checked, the language type is displayed in the code on the site display side.":["チェックすると、サイト表示側のコードに言語の種���が表示されます。"],"Display settings for the number of rows":["行数の表示設定"],"Show line count in code block":["コードブロックに行数を表示する"],"If checked, the number of lines will be displayed on the left end of the code on the site display side.":["チェックすると、サイト表示側のコードの左端に行数が表示されます。"],"Copy button":["コピーボタン"],"Show copy button in code block":["コードブロックにコピーボタンを表示する"],"Font smoothing":["フォントスムージング"],"Turn on font smoothing":["フォントスムージングをオンにする"],"Add %s and %s to the code block.":["コードブロックに %s と %s が追加されます。"],"Cord coloring (front side)":["コードカラーリング(フロント側)"],"Code coloring (editor side)":["コードカラーリング(エディター側)"],"Font Size":["フォントサイズ"],"\"Font-family\" in code":["コードの “font-family”"],"Advanced settings":["高度な設定"],"When you use each original file, please upload it in the theme folder.":["各独自ファイルを使用する場合は、テーマフォルダの中にアップロードしてください。"],"If you set the path to your own file, the default coloring file and prism.js file will not be loaded..":["独自ファイルへのパスを設定すると、デフォルトのカラーリングファイルやprism.jsファイルは読み込まれなくなります。"],"* The currently loaded prism.js file can be downloaded at %s.":["※ 現在読み込んでいるprism.jsファイルは、 %s でダウンロードできます。"],"Here":["こちら"],"Language set to use":["使用する言語セット"],"Write in the format of %s, separated by \",\" (comma).":["%s の形式で、”,”(カンマ)区切りで記述してください。"],"class-key:\"language-name\"":["クラスキー:”言語名”"],"\"class-key\" is the class name used in prism.js (the part corresponding to \"◯◯\" in \"lang- ◯◯\")":["「クラスキー」は、prism.jsで使用されるクラス名(「lang-◯◯」の「◯◯」に該当する部分)です。"],"* If you use a language that is not supported by default, please use it together with \"Original prism.js\" setting.":["※ デフォルトでサポートされていない言語を使用する場合、「独自prism.js」設定と併用してください。"],"Original coloring file":["独自カラーリングファイル"],"Load your own CSS file for code coloring.":["あなたが用意したコードカラーリング用のCSSファイルを読み込みます。"],"Original prism.js":["独自prism.js"],"You can use the prism.js file corresponding to your own language set.":["自分専用の言語セットに対応したprism.jsファイルを使用できます。"],"help":["ヘルプ"],"Highlighting Code Block settings":["Highlighting Code Block 設定"],"Copy code to clipboard":["コードをクリップボードにコピーする"],"Highlighting Code Block":["Highlighting Code Block"],"https://wordpress.org/plugins/highlighting-code-block/":["https://wordpress.org/plugins/highlighting-code-block/"],"Add code block with syntax highlighting using prism.js. (Available for Gutenberg and Classic Editor)":["prism.js を使用したシンタックスハイライト機能付きのコードブロックを追加します。(Gutenbergとクラシックエディター共に��用可能)"],"LOOS, Inc.":["LOOS, Inc."],"https://loos-web-studio.com/":["https://loos-web-studio.com/"]}}}
     1{"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0;","lang":"ja_JP"},"s":["行数の表示"],"Do not set individually":["個別で設定はしない"],"Display row count":["行数を表示する"],"Do not display row count":["行数を表示しない"],"Display language name":["言語の表示"],"Display language":["言語を表示する"],"Do not display language":["言語を表示しない"],"File name":["ファイル名"],"Highlight Number":["ハイライトする行番号"],"First line number":["開始行番号"],"[HCB] Settings":["[HCB] 設定"],"Basic settings":["基本設定"],"Display language name in code block":["コードブロックに言語名を表示する"],"If checked, the language type is displayed in the code on the site display side.":["チェックすると、サイト表示側のコードに言語の種類が表示されます。"],"Display settings for the number of rows":["行数の表示設定"],"Show line count in code block":["コードブロックに行数を表示する"],"If checked, the number of lines will be displayed on the left end of the code on the site display side.":["チェックすると、サイト表示側のコードの左端に行数が表示されます。"],"Copy button":["コピーボタン"],"Show copy button in code block":["コードブロックにコピーボタンを表示する"],"Font smoothing":["フォントスムージング"],"Turn on font smoothing":["フォントスムージングをオンにする"],"Add %s and %s to the code block.":["コードブロックに %s と %s が追加されます。"],"Cord coloring (front side)":["コードカラーリング(フロント側)"],"Code coloring (editor side)":["コードカラーリング(エディター側)"],"Font Size":["フォントサイズ"],"\"Font-family\" in code":["コードの “font-family”"],"Advanced settings":["高度な設定"],"When you use each original file, please upload it in the theme folder.":["各独自ファイルを使用する場合は、テーマフォルダの中にアップロードしてください。"],"If you set the path to your own file, the default coloring file and prism.js file will not be loaded..":["独自ファイルへのパスを設定すると、デフォルトのカラーリングファイルやprism.jsファイルは読み込まれなくなります。"],"* The currently loaded prism.js file can be downloaded at %s.":["※ 現在読み込んでいるprism.jsファイルは、 %s でダウンロードできます。"],"Here":["こちら"],"Language set to use":["使用する言語セット"],"Write in the format of %s, separated by \",\" (comma).":["%s の形式で、”,”(カンマ)区切りで記述してください。"],"class-key:\"language-name\"":["クラスキー:”言語名”"],"\"class-key\" is the class name used in prism.js (the part corresponding to \"◯◯\" in \"lang- ◯◯\")":["「クラスキー」は、prism.jsで使用されるクラス名(「lang-◯◯」の「◯◯」に該当する部分)です。"],"* If you use a language that is not supported by default, please use it together with \"Original prism.js\" setting.":["※ デフォルトでサポートされていない言語を使用する場合、「独自prism.js」設定と併用してください。"],"Original coloring file":["独自カラーリングファイル"],"Load your own CSS file for code coloring.":["あなたが用意したコードカラーリング用のCSSファイルを読み込みます。"],"Original prism.js":["独自prism.js"],"You can use the prism.js file corresponding to your own language set.":["自分専用の言語セットに対応したprism.jsファイルを使用できます。"],"help":["ヘルプ"],"Highlighting Code Block settings":["Highlighting Code Block 設定"],"Copy code to clipboard":["コードをクリップボードにコピーする"],"Highlighting Code Block":["Highlighting Code Block"],"https://wordpress.org/plugins/highlighting-code-block/":["https://wordpress.org/plugins/highlighting-code-block/"],"Add code block with syntax highlighting using prism.js. (Available for Gutenberg and Classic Editor)":["prism.js を使用したシンタックスハイライト機能付きのコードブロックを追加します。(Gutenbergとクラシックエディター共に利用可能)"],"LOOS, Inc.":["LOOS, Inc."],"https://loos-web-studio.com/":["https://loos-web-studio.com/"]}}}
  • highlighting-code-block/tags/2.0.1/languages/loos-hcb-ja.po

    r2994656 r2994709  
    22msgstr ""
    33"Project-Id-Version: Highlighting Code Block\n"
    4 "POT-Creation-Date: 2023-11-10 00:11+0900\n"
    5 "PO-Revision-Date: 2023-11-10 00:12+0900\n"
     4"POT-Creation-Date: 2023-11-1+0900\n"
     5"PO-Revision-Date: 2023-11-1+0900\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    1111"Content-Transfer-Encoding: 8bit\n"
    1212"Plural-Forms: nplurals=1; plural=0;\n"
    13 "X-Generator: Poedit 3.2.2\n"
     13"X-Generator: Poedit 3.\n"
    1414"X-Poedit-Basepath: ..\n"
    1515"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
     
    2626"X-Poedit-SearchPathExcluded-4: vendor\n"
    2727
    28 #: src/js/code-block/edit.js:172
     28#: src/js/code-block/edit.js:168 src/js/code-block/edit.js:190
     29msgid "Language"
     30msgstr "言語"
     31
     32#: src/js/code-block/edit.js:188
    2933msgid "HCB settings"
    3034msgstr "HCB設定"
    3135
    32 #: src/js/code-block/edit.js:174
    33 msgid "Language"
    34 msgstr "言語"
    35 
    36 #: src/js/code-block/edit.js:186
    37 msgid "Display number of rows"
     36#: src/js/code-block/edit.js:202
     37msgid "Display line numbers"
    3838msgstr "行数の表示"
    3939
    40 #: src/js/code-block/edit.js:190 src/js/code-block/edit.js:211
     40#: src/js/code-block/edit.js:
    4141msgid "Do not set individually"
    4242msgstr "個別で設定はしない"
    4343
    44 #: src/js/code-block/edit.js:194
     44#: src/js/code-block/edit.js:
    4545msgid "Display row count"
    4646msgstr "行数を表示する"
    4747
    48 #: src/js/code-block/edit.js:198
     48#: src/js/code-block/edit.js:
    4949msgid "Do not display row count"
    5050msgstr "行数を表示しない"
    5151
    52 #: src/js/code-block/edit.js:207 class/loos_hcb_menu.php:35
     52#: src/js/code-block/edit.js:2 class/loos_hcb_menu.php:35
    5353msgid "Display language name"
    5454msgstr "言語の表示"
    5555
    56 #: src/js/code-block/edit.js:215
     56#: src/js/code-block/edit.js:2
    5757msgid "Display language"
    5858msgstr "言語を表示する"
    5959
    60 #: src/js/code-block/edit.js:219
     60#: src/js/code-block/edit.js:2
    6161msgid "Do not display language"
    6262msgstr "言語を表示しない"
    6363
    64 #: src/js/code-block/edit.js:228
     64#: src/js/code-block/edit.js:2
    6565msgid "File name"
    6666msgstr "ファイル名"
    6767
    68 #: src/js/code-block/edit.js:238
     68#: src/js/code-block/edit.js:2
    6969msgid "Highlight Number"
    7070msgstr "ハイライトする行番号"
    7171
    72 #: src/js/code-block/edit.js:254
     72#: src/js/code-block/edit.js:2
    7373msgid "First line number"
    7474msgstr "開始行番号"
     
    251251msgstr "https://loos-web-studio.com/"
    252252
     253
     254
     255
    253256#~ msgid "\"data-line\" value"
    254257#~ msgstr "data-line属性値"
  • highlighting-code-block/tags/2.0.1/readme.txt

    r2994656 r2994709  
    55Requires at least: 5.6
    66Tested up to: 6.4
    7 Stable tag: 2.0.0
     7Stable tag: 2.0.
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    106106== Changelog ==
    107107
     108
     109
     110
    108111= 2.0.0 =
    109112- Support for WordPress 6.4.
  • highlighting-code-block/tags/2.0.1/src/js/code-block/edit.js

    r2994656 r2994709  
    200200                    />
    201201                    <SelectControl
    202                         label={__('Display number of rows', 'loos-hcb')} // 行数の表示
     202                        label={__('Display s', 'loos-hcb')} // 行数の表示
    203203                        value={isLineShow}
    204204                        options={[
  • highlighting-code-block/trunk/build/js/code-block/index.asset.php

    r2994656 r2994709  
    1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'eee4433c3b38834bd373');
     1<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '');
  • highlighting-code-block/trunk/build/js/code-block/index.js

    r2994656 r2994709  
    1 (()=>{var e={184:(e,t)=>{var a;!function(){"use strict";var l={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var r=n.apply(null,a);r&&e.push(r)}}else if("object"===o){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var c in a)l.call(a,c)&&a[c]&&e.push(c)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()}},t={};function a(l){var n=t[l];if(void 0!==n)return n.exports;var o=t[l]={exports:{}};return e[l](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.React,l=window.wp.i18n,n=window.wp.blockEditor,o=window.wp.components,r=window.wp.element;var c=a(184),s=a.n(c);const i=window.hcbVars?.showLang,u=window.hcbVars?.showLinenum;let d=window?.hcbLangs||null;const p=[["plain","Plain"],...Object.entries(d)],m=[{value:"",label:"Plain"},...Object.entries(d).map((([e,t])=>({value:e,label:t})))],g=(e="")=>{const t=e.match(/\r\n|\n/g);return null!==t?t.length+1:1};function h(e){return e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):e}const b=JSON.parse('{"u2":"loos-hcb/code-block"}'),f=(0,t.createElement)("svg",{x:"0px",y:"0px",viewBox:"0 0 512 512"},(0,t.createElement)("g",null,(0,t.createElement)("path",{d:"M54.4,348.2H89v51h31.2v-51h34.6V484h-34.6v-54.6H89v54.5H54.4V348.2z"}),(0,t.createElement)("path",{d:"M267.5,345.7c17.5,0,31.6,8.3,41,17.3l-19,21.6c-6.2-5.6-12.8-9.2-22-9.2c-17.3,0-30.5,15.2-30.5,40.4 c0,26.1,13.2,40.6,32,40.6c9,0,16.4-4.5,22.4-11.1l19,21.1c-11.5,13.4-26.7,19.9-43.4,19.9c-35.3,0-65.4-23.1-65.4-69.4 C201.6,371.7,230.9,345.7,267.5,345.7z"}),(0,t.createElement)("path",{d:"M356.5,348.2h44.4c28.2,0,50.6,7.1,50.6,33.7c0,11.8-7.1,25.4-22.9,29.5v0.8c19.2,3.6,29,13.7,29,31.8 c0,28-23.1,40-52.6,40h-48.5V348.2z M399.8,402c12.6,0,17.7-6,17.7-14.9c0-8.6-5.3-12.2-17.7-12.2h-8.5V402H399.8z M402.3,457.2 c14.7,0,21.1-5.5,21.1-16.2c0-10.5-6.4-14.9-21.1-14.9h-11.1v31h11.1V457.2z"})),(0,t.createElement)("polygon",{points:"172,311.6 195,288.6 76.2,165.7 195,42.9 172,19.8 30.1,165.7 "}),(0,t.createElement)("polygon",{points:"340,19.8 317,42.9 435.8,165.7 317,288.6 340,311.6 481.9,165.7 "})),y=[{supports:{className:!1},attributes:{code:{type:"string",source:"text",selector:"code"},className:{type:"string",default:""},langType:{type:"string",default:""},langName:{type:"string",default:""},fileName:{type:"string",default:""},dataLineNum:{type:"string",default:""},isLineShow:{type:"string",default:"undefined"},isShowLang:{type:"string",default:""}},save:({attributes:e})=>{const{code:a,fileName:l,langName:o,dataLineNum:r,isLineShow:c,isShowLang:i}=e,u=e.langType||"plain";let d=s()("prism",`lang-${u}`);return"undefined"!==c&&(d=s()(d,`${c}-numbers`)),(0,t.createElement)("div",{className:"hcb_wrap"},(0,t.createElement)("pre",{className:d,"data-file":l||null,"data-lang":o||null,"data-line":r||null,"data-show-lang":i||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))}},{supports:{className:!1},attributes:{code:{type:"string",source:"text",selector:"code"},className:{type:"string",default:""},langType:{type:"string",default:"plane"},langName:{type:"string",default:""},fileName:{type:"string",default:""},dataLineNum:{type:"string",default:""},isLineShow:{type:"string",default:"undefined"},isShowLang:{type:"string",default:""}},migrate:e=>("plane"===e.langType&&(e.langType=""),e),save:({attributes:e})=>{const{code:a,langType:l,fileName:o,langName:r,dataLineNum:c,isLineShow:s,isShowLang:i}=e,u="prism "+s+"-numbers lang-"+l;return(0,t.createElement)("div",{className:"hcb_wrap"},(0,t.createElement)("pre",{className:u,"data-file":o||null,"data-lang":r||null,"data-line":c||null,"data-show-lang":i||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))}}];(0,e.registerBlockType)(b.u2,{icon:f,transforms:{from:[{type:"block",blocks:["core/code"],transform:t=>(0,e.createBlock)("loos-hcb/code-block",{code:t.content})}],to:[{type:"block",blocks:["core/code"],transform:t=>(0,e.createBlock)("core/code",{content:t.code})}]},edit:({attributes:e,setAttributes:a,clientId:c})=>{const h=(0,r.useRef)(),{className:b,code:f="",langType:y,fileName:v,langName:w,dataLineNum:N,dataStart:E,isShowLang:_,isLineShow:S}=e,[L,x]=(0,r.useState)(g(f)),C=s()("hcb-block","hcb_wrap");(0,r.useEffect)((()=>{const e=b||"";if(!e)return;const t=e.split(" "),l=[...new Set(t)];a({className:s()(l)})}),[b,a]),(0,r.useEffect)((()=>{const{ownerDocument:e}=h.current;if(e){const t=e.querySelector(`#block-${c}`),a=t.querySelector(".hcb_textarea");if(t.style.setProperty("--hcb--code-linenum",L),a.scrollWidth>a.offsetWidth){const e=a.offsetHeight-a.clientHeight;t.style.setProperty("--hcb--scbarH",e+"px")}}}),[c,L]);let T="0";("1"===_||""===_&&"on"===i)&&(T="1");let k=null;("on"===S||"undefined"===S&&"on"===u)&&(k="1");const P=(0,n.useBlockProps)({ref:h,className:C,"data-file":v||null,"data-lang":w||null,"data-show-lang":T,"data-show-linenum":k}),B=[...p];return y||B.shift(),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.BlockControls,null,(0,t.createElement)(o.ToolbarGroup,{isCollapsed:!0,icon:(0,t.createElement)(t.Fragment,null,w||(0,l.__)("Language","loos-hcb")),title:"Lnaguage",controls:B.map((([e,t])=>({key:e,isActive:e===y,title:t,onClick:()=>{a("plain"===e?{langType:"",langName:""}:{langType:e,langName:t})}})))})),(0,t.createElement)(n.InspectorControls,null,(0,t.createElement)(o.PanelBody,{title:(0,l.__)("HCB settings","loos-hcb"),initialOpen:!0},(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Language","loos-hcb"),value:e.langType,options:m,onChange:e=>{a(""===e?{langType:"",langName:""}:{langType:e,langName:d[e]})}}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Display number of rows","loos-hcb"),value:S,options:[{label:(0,l.__)("Do not set individually","loos-hcb"),value:"undefined"},{label:(0,l.__)("Display row count","loos-hcb"),value:"on"},{label:(0,l.__)("Do not display row count","loos-hcb"),value:"off"}],onChange:e=>{a({isLineShow:e})}}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Display language name","loos-hcb"),value:_,options:[{label:(0,l.__)("Do not set individually","loos-hcb"),value:""},{label:(0,l.__)("Display language","loos-hcb"),value:"1"},{label:(0,l.__)("Do not display language","loos-hcb"),value:"0"}],onChange:e=>{a({isShowLang:e})}}),(0,t.createElement)(o.TextControl,{label:(0,l.__)("File name","loos-hcb"),value:v,onChange:e=>{a({fileName:e})}}),(0,t.createElement)(o.TextControl,{label:(0,t.createElement)(t.Fragment,null,(0,l.__)("Highlight Number","loos-hcb")+" ( ",(0,t.createElement)("code",{className:"hcb-code-in-label"},"[data-line]")," )"),value:N,onChange:e=>{a({dataLineNum:e})}}),(0,t.createElement)(o.TextControl,{type:"number",label:(0,t.createElement)(t.Fragment,null,(0,l.__)("First line number","loos-hcb")+" ( ",(0,t.createElement)("code",{className:"hcb-code-in-label"},"[data-start]")," )"),value:E||1,onChange:e=>{a({dataStart:parseInt(e||1)})},style:{opacity:k?1:.5},disabled:!k}))),(0,t.createElement)("div",{...P},(0,t.createElement)("div",{className:"hcb_codewrap"},k&&(0,t.createElement)("div",{className:"hcb_linenum"},(0,t.createElement)("div",{className:"hcb-startNum"},E)),(0,t.createElement)("textarea",{className:"hcb_textarea",placeholder:"Your Code...",value:f,onChange:e=>{const t=e.target.value;a({code:t});const l=g(t);L!==l&&x(l)}}),N&&(0,t.createElement)("div",{className:"hcb-datapreview"},(0,t.createElement)("div",{className:"hcb-datapreview__items"},`{${N}}`)))))},save:({attributes:e})=>{const{code:a,fileName:l,langName:o,dataLineNum:r,dataStart:c,isLineShow:i,isShowLang:u}=e,d=e.langType||"plain",p=s()("prism",`${i}-numbers`,`lang-${d}`),m=n.useBlockProps.save({className:"hcb_wrap"});return(0,t.createElement)("div",{...m},(0,t.createElement)("pre",{className:p,"data-file":l||null,"data-lang":o||null,"data-line":r||null,"data-start":1===c?null:c,"data-show-lang":u||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))},deprecated:y})})()})();
     1(()=>{var e={184:(e,t)=>{var a;!function(){"use strict";var l={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var r=n.apply(null,a);r&&e.push(r)}}else if("object"===o){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var c in a)l.call(a,c)&&a[c]&&e.push(c)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()}},t={};function a(l){var n=t[l];if(void 0!==n)return n.exports;var o=t[l]={exports:{}};return e[l](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.React,l=window.wp.i18n,n=window.wp.blockEditor,o=window.wp.components,r=window.wp.element;var c=a(184),s=a.n(c);const i=window.hcbVars?.showLang,u=window.hcbVars?.showLinenum;let d=window?.hcbLangs||null;const p=[["plain","Plain"],...Object.entries(d)],m=[{value:"",label:"Plain"},...Object.entries(d).map((([e,t])=>({value:e,label:t})))],g=(e="")=>{const t=e.match(/\r\n|\n/g);return null!==t?t.length+1:1};function h(e){return e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):e}const b=JSON.parse('{"u2":"loos-hcb/code-block"}'),f=(0,t.createElement)("svg",{x:"0px",y:"0px",viewBox:"0 0 512 512"},(0,t.createElement)("g",null,(0,t.createElement)("path",{d:"M54.4,348.2H89v51h31.2v-51h34.6V484h-34.6v-54.6H89v54.5H54.4V348.2z"}),(0,t.createElement)("path",{d:"M267.5,345.7c17.5,0,31.6,8.3,41,17.3l-19,21.6c-6.2-5.6-12.8-9.2-22-9.2c-17.3,0-30.5,15.2-30.5,40.4 c0,26.1,13.2,40.6,32,40.6c9,0,16.4-4.5,22.4-11.1l19,21.1c-11.5,13.4-26.7,19.9-43.4,19.9c-35.3,0-65.4-23.1-65.4-69.4 C201.6,371.7,230.9,345.7,267.5,345.7z"}),(0,t.createElement)("path",{d:"M356.5,348.2h44.4c28.2,0,50.6,7.1,50.6,33.7c0,11.8-7.1,25.4-22.9,29.5v0.8c19.2,3.6,29,13.7,29,31.8 c0,28-23.1,40-52.6,40h-48.5V348.2z M399.8,402c12.6,0,17.7-6,17.7-14.9c0-8.6-5.3-12.2-17.7-12.2h-8.5V402H399.8z M402.3,457.2 c14.7,0,21.1-5.5,21.1-16.2c0-10.5-6.4-14.9-21.1-14.9h-11.1v31h11.1V457.2z"})),(0,t.createElement)("polygon",{points:"172,311.6 195,288.6 76.2,165.7 195,42.9 172,19.8 30.1,165.7 "}),(0,t.createElement)("polygon",{points:"340,19.8 317,42.9 435.8,165.7 317,288.6 340,311.6 481.9,165.7 "})),y=[{supports:{className:!1},attributes:{code:{type:"string",source:"text",selector:"code"},className:{type:"string",default:""},langType:{type:"string",default:""},langName:{type:"string",default:""},fileName:{type:"string",default:""},dataLineNum:{type:"string",default:""},isLineShow:{type:"string",default:"undefined"},isShowLang:{type:"string",default:""}},save:({attributes:e})=>{const{code:a,fileName:l,langName:o,dataLineNum:r,isLineShow:c,isShowLang:i}=e,u=e.langType||"plain";let d=s()("prism",`lang-${u}`);return"undefined"!==c&&(d=s()(d,`${c}-numbers`)),(0,t.createElement)("div",{className:"hcb_wrap"},(0,t.createElement)("pre",{className:d,"data-file":l||null,"data-lang":o||null,"data-line":r||null,"data-show-lang":i||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))}},{supports:{className:!1},attributes:{code:{type:"string",source:"text",selector:"code"},className:{type:"string",default:""},langType:{type:"string",default:"plane"},langName:{type:"string",default:""},fileName:{type:"string",default:""},dataLineNum:{type:"string",default:""},isLineShow:{type:"string",default:"undefined"},isShowLang:{type:"string",default:""}},migrate:e=>("plane"===e.langType&&(e.langType=""),e),save:({attributes:e})=>{const{code:a,langType:l,fileName:o,langName:r,dataLineNum:c,isLineShow:s,isShowLang:i}=e,u="prism "+s+"-numbers lang-"+l;return(0,t.createElement)("div",{className:"hcb_wrap"},(0,t.createElement)("pre",{className:u,"data-file":o||null,"data-lang":r||null,"data-line":c||null,"data-show-lang":i||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))}}];(0,e.registerBlockType)(b.u2,{icon:f,transforms:{from:[{type:"block",blocks:["core/code"],transform:t=>(0,e.createBlock)("loos-hcb/code-block",{code:t.content})}],to:[{type:"block",blocks:["core/code"],transform:t=>(0,e.createBlock)("core/code",{content:t.code})}]},edit:({attributes:e,setAttributes:a,clientId:c})=>{const h=(0,r.useRef)(),{className:b,code:f="",langType:y,fileName:v,langName:w,dataLineNum:N,dataStart:E,isShowLang:_,isLineShow:S}=e,[L,x]=(0,r.useState)(g(f)),C=s()("hcb-block","hcb_wrap");(0,r.useEffect)((()=>{const e=b||"";if(!e)return;const t=e.split(" "),l=[...new Set(t)];a({className:s()(l)})}),[b,a]),(0,r.useEffect)((()=>{const{ownerDocument:e}=h.current;if(e){const t=e.querySelector(`#block-${c}`),a=t.querySelector(".hcb_textarea");if(t.style.setProperty("--hcb--code-linenum",L),a.scrollWidth>a.offsetWidth){const e=a.offsetHeight-a.clientHeight;t.style.setProperty("--hcb--scbarH",e+"px")}}}),[c,L]);let T="0";("1"===_||""===_&&"on"===i)&&(T="1");let k=null;("on"===S||"undefined"===S&&"on"===u)&&(k="1");const P=(0,n.useBlockProps)({ref:h,className:C,"data-file":v||null,"data-lang":w||null,"data-show-lang":T,"data-show-linenum":k}),B=[...p];return y||B.shift(),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.BlockControls,null,(0,t.createElement)(o.ToolbarGroup,{isCollapsed:!0,icon:(0,t.createElement)(t.Fragment,null,w||(0,l.__)("Language","loos-hcb")),title:"Lnaguage",controls:B.map((([e,t])=>({key:e,isActive:e===y,title:t,onClick:()=>{a("plain"===e?{langType:"",langName:""}:{langType:e,langName:t})}})))})),(0,t.createElement)(n.InspectorControls,null,(0,t.createElement)(o.PanelBody,{title:(0,l.__)("HCB settings","loos-hcb"),initialOpen:!0},(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Language","loos-hcb"),value:e.langType,options:m,onChange:e=>{a(""===e?{langType:"",langName:""}:{langType:e,langName:d[e]})}}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Display s","loos-hcb"),value:S,options:[{label:(0,l.__)("Do not set individually","loos-hcb"),value:"undefined"},{label:(0,l.__)("Display row count","loos-hcb"),value:"on"},{label:(0,l.__)("Do not display row count","loos-hcb"),value:"off"}],onChange:e=>{a({isLineShow:e})}}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Display language name","loos-hcb"),value:_,options:[{label:(0,l.__)("Do not set individually","loos-hcb"),value:""},{label:(0,l.__)("Display language","loos-hcb"),value:"1"},{label:(0,l.__)("Do not display language","loos-hcb"),value:"0"}],onChange:e=>{a({isShowLang:e})}}),(0,t.createElement)(o.TextControl,{label:(0,l.__)("File name","loos-hcb"),value:v,onChange:e=>{a({fileName:e})}}),(0,t.createElement)(o.TextControl,{label:(0,t.createElement)(t.Fragment,null,(0,l.__)("Highlight Number","loos-hcb")+" ( ",(0,t.createElement)("code",{className:"hcb-code-in-label"},"[data-line]")," )"),value:N,onChange:e=>{a({dataLineNum:e})}}),(0,t.createElement)(o.TextControl,{type:"number",label:(0,t.createElement)(t.Fragment,null,(0,l.__)("First line number","loos-hcb")+" ( ",(0,t.createElement)("code",{className:"hcb-code-in-label"},"[data-start]")," )"),value:E||1,onChange:e=>{a({dataStart:parseInt(e||1)})},style:{opacity:k?1:.5},disabled:!k}))),(0,t.createElement)("div",{...P},(0,t.createElement)("div",{className:"hcb_codewrap"},k&&(0,t.createElement)("div",{className:"hcb_linenum"},(0,t.createElement)("div",{className:"hcb-startNum"},E)),(0,t.createElement)("textarea",{className:"hcb_textarea",placeholder:"Your Code...",value:f,onChange:e=>{const t=e.target.value;a({code:t});const l=g(t);L!==l&&x(l)}}),N&&(0,t.createElement)("div",{className:"hcb-datapreview"},(0,t.createElement)("div",{className:"hcb-datapreview__items"},`{${N}}`)))))},save:({attributes:e})=>{const{code:a,fileName:l,langName:o,dataLineNum:r,dataStart:c,isLineShow:i,isShowLang:u}=e,d=e.langType||"plain",p=s()("prism",`${i}-numbers`,`lang-${d}`),m=n.useBlockProps.save({className:"hcb_wrap"});return(0,t.createElement)("div",{...m},(0,t.createElement)("pre",{className:p,"data-file":l||null,"data-lang":o||null,"data-line":r||null,"data-start":1===c?null:c,"data-show-lang":u||null},(0,t.createElement)(n.RichText.Content,{tagName:"code",value:h(a)})))},deprecated:y})})()})();
  • highlighting-code-block/trunk/highlighting-code-block.php

    r2994656 r2994709  
    44 * Plugin URI: https://wordpress.org/plugins/highlighting-code-block/
    55 * Description: Add code block with syntax highlighting using prism.js. (Available for Gutenberg and Classic Editor)
    6  * Version: 2.0.0
     6 * Version: 2.0.
    77 * Requires at least: 5.6
    88 * Author: LOOS, Inc.
  • highlighting-code-block/trunk/languages/loos-hcb-ja-hcb-blocks.json

    r2994656 r2994709  
    1 {"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0;","lang":"ja_JP"},"HCB settings":["HCB設定"],"Language":["言語"],"Display number of rows":["行数の表示"],"Do not set individually":["個別で設定はしない"],"Display row count":["行数を表示する"],"Do not display row count":["行数を表示しない"],"Display language name":["言語の表示"],"Display language":["言語を表示する"],"Do not display language":["言語を表示しない"],"File name":["ファイル名"],"Highlight Number":["ハイライトする行番号"],"First line number":["開始行番号"],"[HCB] Settings":["[HCB] 設定"],"Basic settings":["基本設定"],"Display language name in code block":["コードブロックに言語名を表示する"],"If checked, the language type is displayed in the code on the site display side.":["チェックすると、サイト表示側のコードに言語の種類が表示されます。"],"Display settings for the number of rows":["行数の表示設定"],"Show line count in code block":["コードブロックに行数を表示する"],"If checked, the number of lines will be displayed on the left end of the code on the site display side.":["チェックすると、サイト表示側のコードの左端に行数が表示されます。"],"Copy button":["コピーボタン"],"Show copy button in code block":["コードブロックにコピーボタンを表示する"],"Font smoothing":["フォントスムージング"],"Turn on font smoothing":["フォントスムージングをオンにする"],"Add %s and %s to the code block.":["コードブロックに %s と %s が追加されます。"],"Cord coloring (front side)":["コードカラーリング(フロント側)"],"Code coloring (editor side)":["コードカラーリング(エディター側)"],"Font Size":["フォントサイズ"],"\"Font-family\" in code":["コードの “font-family”"],"Advanced settings":["高度な設定"],"When you use each original file, please upload it in the theme folder.":["各独自ファイルを使用する場合は、テーマフォルダの中にアップロードしてください。"],"If you set the path to your own file, the default coloring file and prism.js file will not be loaded..":["独自ファイルへのパス��設定すると、デフォルトのカラーリングファイルやprism.jsファイルは読み込まれなくなります。"],"* The currently loaded prism.js file can be downloaded at %s.":["※ 現在読み込んでいるprism.jsファイルは、 %s でダウンロードできます。"],"Here":["こちら"],"Language set to use":["使用する言語セット"],"Write in the format of %s, separated by \",\" (comma).":["%s の形式で、”,”(カンマ)区切りで記述してください。"],"class-key:\"language-name\"":["クラスキー:”言語名”"],"\"class-key\" is the class name used in prism.js (the part corresponding to \"◯◯\" in \"lang- ◯◯\")":["「クラスキー」は、prism.jsで使用されるクラス名(「lang-◯◯」の「◯◯」に該当する部分)です。"],"* If you use a language that is not supported by default, please use it together with \"Original prism.js\" setting.":["※ デフォルトでサポートされていない言語を使用する場合、「独自prism.js」設定と併用してください。"],"Original coloring file":["独自カラーリングファイル"],"Load your own CSS file for code coloring.":["あなたが用意したコードカラーリング用のCSSファイルを読み込みます。"],"Original prism.js":["独自prism.js"],"You can use the prism.js file corresponding to your own language set.":["自分専用の言語セットに対応したprism.jsファイルを使用できます。"],"help":["ヘルプ"],"Highlighting Code Block settings":["Highlighting Code Block 設定"],"Copy code to clipboard":["コードをクリップボードにコピーする"],"Highlighting Code Block":["Highlighting Code Block"],"https://wordpress.org/plugins/highlighting-code-block/":["https://wordpress.org/plugins/highlighting-code-block/"],"Add code block with syntax highlighting using prism.js. (Available for Gutenberg and Classic Editor)":["prism.js を使用したシンタックスハイライト機能付きのコードブロックを追加します。(Gutenbergとクラシックエディター共に利用可能)"],"LOOS, Inc.":["LOOS, Inc."],"https://loos-web-studio.com/":["https://loos-web-studio.com/"]}}}
     1{"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0;","lang":"ja_JP"},"s":["行数の表示"],"Do not set individually":["個別で設定はしない"],"Display row count":["行数を表示する"],"Do not display row count":["行数を表示しない"],"Display language name":["言語の表示"],"Display language":["言語を表示する"],"Do not display language":["言語を表示しない"],"File name":["ファイル名"],"Highlight Number":["ハイライトする行番号"],"First line number":["開始行番号"],"[HCB] Settings":["[HCB] 設定"],"Basic settings":["基本設定"],"Display language name in code block":["コードブロックに言語名を表示する"],"If checked, the language type is displayed in the code on the site display side.":["チェックすると、サイト表示側のコードに言語の種類が表示されます。"],"Display settings for the number of rows":["行数の表示設定"],"Show line count in code block":["コードブロックに行数を表示する"],"If checked, the number of lines will be displayed on the left end of the code on the site display side.":["チェックすると、サイト表示側のコードの左端に行数が表示されます。"],"Copy button":["コピーボタン"],"Show copy button in code block":["コードブロックにコピーボタンを表示する"],"Font smoothing":["フォントスムージング"],"Turn on font smoothing":["フォントスムージングをオンにする"],"Add %s and %s to the code block.":["コードブロックに %s と %s が追加されます。"],"Cord coloring (front side)":["コードカラーリング(フロント側)"],"Code coloring (editor side)":["コードカラーリング(エディター側)"],"Font Size":["フォントサイズ"],"\"Font-family\" in code":["コードの “font-family”"],"Advanced settings":["高度な設定"],"When you use each original file, please upload it in the theme folder.":["各独自ファイルを使用する場合は、テーマフォルダの中にアップロードしてください。"],"If you set the path to your own file, the default coloring file and prism.js file will not be loaded..":["独自ファイルへのパスを設定すると、デフォルトのカラーリングファイルやprism.jsファイルは読み込まれなくなります。"],"* The currently loaded prism.js file can be downloaded at %s.":["※ 現在読み込んでいるprism.jsファイルは、 %s でダウンロードできます。"],"Here":["こちら"],"Language set to use":["使用する言語セット"],"Write in the format of %s, separated by \",\" (comma).":["%s の形式で、”,”(カンマ)区切りで記述してください。"],"class-key:\"language-name\"":["クラスキー:”言語名”"],"\"class-key\" is the class name used in prism.js (the part corresponding to \"◯◯\" in \"lang- ◯◯\")":["「クラスキー」は、prism.jsで使用されるクラス名(「lang-◯◯」の「◯◯」に該当する部分)です。"],"* If you use a language that is not supported by default, please use it together with \"Original prism.js\" setting.":["※ デフォルトでサポートされていない言語を使用する場合、「独自prism.js」設定と併用してください。"],"Original coloring file":["独自カラーリングファイル"],"Load your own CSS file for code coloring.":["あなたが用意したコードカラーリング用のCSSファイルを読み込みます。"],"Original prism.js":["独自prism.js"],"You can use the prism.js file corresponding to your own language set.":["自分専用の言語セットに対応したprism.jsファイルを使用できます。"],"help":["ヘルプ"],"Highlighting Code Block settings":["Highlighting Code Block 設定"],"Copy code to clipboard":["コードをクリップボードにコピーする"],"Highlighting Code Block":["Highlighting Code Block"],"https://wordpress.org/plugins/highlighting-code-block/":["https://wordpress.org/plugins/highlighting-code-block/"],"Add code block with syntax highlighting using prism.js. (Available for Gutenberg and Classic Editor)":["prism.js を使用したシンタックスハイライト機能付きのコードブロックを追加します。(Gutenbergとクラシックエディター共に利用可能)"],"LOOS, Inc.":["LOOS, Inc."],"https://loos-web-studio.com/":["https://loos-web-studio.com/"]}}}
  • highlighting-code-block/trunk/languages/loos-hcb-ja.po

    r2994656 r2994709  
    22msgstr ""
    33"Project-Id-Version: Highlighting Code Block\n"
    4 "POT-Creation-Date: 2023-11-10 00:11+0900\n"
    5 "PO-Revision-Date: 2023-11-10 00:12+0900\n"
     4"POT-Creation-Date: 2023-11-1+0900\n"
     5"PO-Revision-Date: 2023-11-1+0900\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    1111"Content-Transfer-Encoding: 8bit\n"
    1212"Plural-Forms: nplurals=1; plural=0;\n"
    13 "X-Generator: Poedit 3.2.2\n"
     13"X-Generator: Poedit 3.\n"
    1414"X-Poedit-Basepath: ..\n"
    1515"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
     
    2626"X-Poedit-SearchPathExcluded-4: vendor\n"
    2727
    28 #: src/js/code-block/edit.js:172
     28#: src/js/code-block/edit.js:168 src/js/code-block/edit.js:190
     29msgid "Language"
     30msgstr "言語"
     31
     32#: src/js/code-block/edit.js:188
    2933msgid "HCB settings"
    3034msgstr "HCB設定"
    3135
    32 #: src/js/code-block/edit.js:174
    33 msgid "Language"
    34 msgstr "言語"
    35 
    36 #: src/js/code-block/edit.js:186
    37 msgid "Display number of rows"
     36#: src/js/code-block/edit.js:202
     37msgid "Display line numbers"
    3838msgstr "行数の表示"
    3939
    40 #: src/js/code-block/edit.js:190 src/js/code-block/edit.js:211
     40#: src/js/code-block/edit.js:
    4141msgid "Do not set individually"
    4242msgstr "個別で設定はしない"
    4343
    44 #: src/js/code-block/edit.js:194
     44#: src/js/code-block/edit.js:
    4545msgid "Display row count"
    4646msgstr "行数を表示する"
    4747
    48 #: src/js/code-block/edit.js:198
     48#: src/js/code-block/edit.js:
    4949msgid "Do not display row count"
    5050msgstr "行数を表示しない"
    5151
    52 #: src/js/code-block/edit.js:207 class/loos_hcb_menu.php:35
     52#: src/js/code-block/edit.js:2 class/loos_hcb_menu.php:35
    5353msgid "Display language name"
    5454msgstr "言語の表示"
    5555
    56 #: src/js/code-block/edit.js:215
     56#: src/js/code-block/edit.js:2
    5757msgid "Display language"
    5858msgstr "言語を表示する"
    5959
    60 #: src/js/code-block/edit.js:219
     60#: src/js/code-block/edit.js:2
    6161msgid "Do not display language"
    6262msgstr "言語を表示しない"
    6363
    64 #: src/js/code-block/edit.js:228
     64#: src/js/code-block/edit.js:2
    6565msgid "File name"
    6666msgstr "ファイル名"
    6767
    68 #: src/js/code-block/edit.js:238
     68#: src/js/code-block/edit.js:2
    6969msgid "Highlight Number"
    7070msgstr "ハイライトする行番号"
    7171
    72 #: src/js/code-block/edit.js:254
     72#: src/js/code-block/edit.js:2
    7373msgid "First line number"
    7474msgstr "開始行番号"
     
    251251msgstr "https://loos-web-studio.com/"
    252252
     253
     254
     255
    253256#~ msgid "\"data-line\" value"
    254257#~ msgstr "data-line属性値"
  • highlighting-code-block/trunk/readme.txt

    r2994656 r2994709  
    55Requires at least: 5.6
    66Tested up to: 6.4
    7 Stable tag: 2.0.0
     7Stable tag: 2.0.
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    106106== Changelog ==
    107107
     108
     109
     110
    108111= 2.0.0 =
    109112- Support for WordPress 6.4.
  • highlighting-code-block/trunk/src/js/code-block/edit.js

    r2994656 r2994709  
    200200                    />
    201201                    <SelectControl
    202                         label={__('Display number of rows', 'loos-hcb')} // 行数の表示
     202                        label={__('Display s', 'loos-hcb')} // 行数の表示
    203203                        value={isLineShow}
    204204                        options={[
Note: See TracChangeset for help on using the changeset viewer.