first commit after npx @wordpress/create-block@latest

This commit is contained in:
vdv committed 2025-03-28 14:39:56 +01:00
commit e4ed3d3dcb
25 files changed
+20746

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<?php
// This file is generated. Do not modify it manually.
return array(
'wp-printable-qrcode' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'wppqr/wp-printable-qrcode',
'version' => '0.1.0',
'title' => 'Printable QR code',
'category' => 'widgets',
'icon' => 'smiley',
'description' => 'Print a QR code to the web view',
'example' => array(
),
'supports' => array(
'html' => false
),
'textdomain' => 'wp-printable-qrcode',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'render' => 'file:./render.php',
'viewScript' => 'file:./view.js'
)
);
+20
View File
@@ -0,0 +1,20 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "wppqr/wp-printable-qrcode",
"version": "0.1.0",
"title": "Printable QR code",
"category": "widgets",
"icon": "smiley",
"description": "Print a QR code to the web view",
"example": {},
"supports": {
"html": false
},
"textdomain": "wp-printable-qrcode",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"render": "file:./render.php",
"viewScript": "file:./view.js"
}
+1
View File
@@ -0,0 +1 @@
.wp-block-wppqr-wp-printable-qrcode{border:1px dotted red}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'c9aefbfb813ae2ba43ca');
+1
View File
@@ -0,0 +1 @@
.wp-block-wppqr-wp-printable-qrcode{border:1px dotted red}
+1
View File
@@ -0,0 +1 @@
(()=>{"use strict";var r,e={247:()=>{const r=window.wp.blocks,e=window.wp.i18n,o=window.wp.blockEditor,i=window.ReactJSXRuntime,n=JSON.parse('{"UU":"wppqr/wp-printable-qrcode"}');(0,r.registerBlockType)(n.UU,{edit:function(){return(0,i.jsx)("p",{...(0,o.useBlockProps)(),children:(0,e.__)("Printable QR code – hello from the editor!","wp-printable-qrcode")})}})}},o={};function i(r){var n=o[r];if(void 0!==n)return n.exports;var t=o[r]={exports:{}};return e[r](t,t.exports,i),t.exports}i.m=e,r=[],i.O=(e,o,n,t)=>{if(!o){var p=1/0;for(s=0;s<r.length;s++){for(var[o,n,t]=r[s],l=!0,a=0;a<o.length;a++)(!1&t||p>=t)&&Object.keys(i.O).every((r=>i.O[r](o[a])))?o.splice(a--,1):(l=!1,t<p&&(p=t));if(l){r.splice(s--,1);var c=n();void 0!==c&&(e=c)}}return e}t=t||0;for(var s=r.length;s>0&&r[s-1][2]>t;s--)r[s]=r[s-1];r[s]=[o,n,t]},i.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={350:0,994:0};i.O.j=e=>0===r[e];var e=(e,o)=>{var n,t,[p,l,a]=o,c=0;if(p.some((e=>0!==r[e]))){for(n in l)i.o(l,n)&&(i.m[n]=l[n]);if(a)var s=a(i)}for(e&&e(o);c<p.length;c++)t=p[c],i.o(r,t)&&r[t]&&r[t][0](),r[t]=0;return i.O(s)},o=globalThis.webpackChunkwp_printable_qrcode=globalThis.webpackChunkwp_printable_qrcode||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var n=i.O(void 0,[994],(()=>i(247)));n=i.O(n)})();
+8
View File
@@ -0,0 +1,8 @@
<?php
/**
* @see https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#render
*/
?>
<p <?php echo get_block_wrapper_attributes(); ?>>
<?php esc_html_e( 'Printable QR code – hello from a dynamic block!', 'wp-printable-qrcode' ); ?>
</p>
@@ -0,0 +1 @@
.wp-block-wppqr-wp-printable-qrcode{background-color:#21759b;color:#fff;padding:2px}
@@ -0,0 +1 @@
.wp-block-wppqr-wp-printable-qrcode{background-color:#21759b;color:#fff;padding:2px}
+1
View File
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '96b8a0b5a958166fdbb4');
+1
View File
@@ -0,0 +1 @@
console.log("Hello World! (from wppqr-wp-printable-qrcode block)");