wp-typia 0.20.0 → 0.20.1

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.
@@ -11672,7 +11672,39 @@ function buildTemplateVariablesFromBlockSpec(spec) {
11672
11672
  }
11673
11673
  }
11674
11674
  }
11675
- // ../wp-typia-project-tools/src/runtime/built-in-block-non-ts-artifacts.ts
11675
+ // ../wp-typia-project-tools/src/runtime/built-in-block-non-ts-render-utils.ts
11676
+ function renderArtifact(relativePath, template, view) {
11677
+ const source = renderMustacheTemplateString(template, view);
11678
+ return {
11679
+ relativePath,
11680
+ source: source.endsWith(`
11681
+ `) ? source : `${source}
11682
+ `
11683
+ };
11684
+ }
11685
+ function buildAlternateRenderEntryArtifact(relativePath, target, variables) {
11686
+ const template = `<?php
11687
+ /**
11688
+ * Alternate ${target} render entry for {{title}}.
11689
+ *
11690
+ * @package {{pascalCase}}
11691
+ */
11692
+
11693
+ if ( ! defined( 'ABSPATH' ) ) {
11694
+ exit;
11695
+ }
11696
+
11697
+ require_once __DIR__ . '/render-targets.php';
11698
+
11699
+ return {{phpPrefix}}_{{slugSnakeCase}}_render_target( '${target}', $attributes, $content ?? '', $block ?? null );
11700
+ `;
11701
+ return renderArtifact(relativePath, template, variables);
11702
+ }
11703
+ function toPhpSingleQuotedString(value) {
11704
+ return `'${value.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
11705
+ }
11706
+
11707
+ // ../wp-typia-project-tools/src/runtime/built-in-block-non-ts-family-artifacts.ts
11676
11708
  var BASIC_STYLE_TEMPLATE = `/**
11677
11709
  * {{title}} Block Styles
11678
11710
  */
@@ -12225,12 +12257,6 @@ if ( ! function_exists( '{{phpPrefix}}_{{slugSnakeCase}}_build_render_context' )
12225
12257
  $storage_mode = '{{dataStorageMode}}';
12226
12258
  $persistence_policy = '{{persistencePolicy}}';
12227
12259
 
12228
- {{phpPrefix}}_record_rendered_block_instance(
12229
- (int) $post_id,
12230
- '{{namespace}}/{{slugKebabCase}}',
12231
- $resource_key
12232
- );
12233
-
12234
12260
  $notice_message = 'authenticated' === $persistence_policy
12235
12261
  ? __( 'Sign in to persist this counter.', '{{textDomain}}' )
12236
12262
  : __( 'Public writes are temporarily unavailable.', '{{textDomain}}' );
@@ -12239,6 +12265,12 @@ if ( ! function_exists( '{{phpPrefix}}_{{slugSnakeCase}}_build_render_context' )
12239
12265
  return null;
12240
12266
  }
12241
12267
 
12268
+ {{phpPrefix}}_record_rendered_block_instance(
12269
+ (int) $post_id,
12270
+ '{{namespace}}/{{slugKebabCase}}',
12271
+ $resource_key
12272
+ );
12273
+
12242
12274
  $web_context = array(
12243
12275
  'bootstrapReady' => false,
12244
12276
  'buttonLabel' => $button_label,
@@ -12468,36 +12500,6 @@ var COMPOUND_STYLE_TEMPLATE = `.{{cssClassName}} {
12468
12500
  padding-top: 0;
12469
12501
  }
12470
12502
  `;
12471
- function renderArtifact(relativePath, template, view) {
12472
- const source = renderMustacheTemplateString(template, view);
12473
- return {
12474
- relativePath,
12475
- source: source.endsWith(`
12476
- `) ? source : `${source}
12477
- `
12478
- };
12479
- }
12480
- function buildAlternateRenderEntryArtifact(relativePath, target, variables) {
12481
- const template = `<?php
12482
- /**
12483
- * Alternate ${target} render entry for {{title}}.
12484
- *
12485
- * @package {{pascalCase}}
12486
- */
12487
-
12488
- if ( ! defined( 'ABSPATH' ) ) {
12489
- exit;
12490
- }
12491
-
12492
- require_once __DIR__ . '/render-targets.php';
12493
-
12494
- return {{phpPrefix}}_{{slugSnakeCase}}_render_target( '${target}', $attributes, $content ?? '', $block ?? null );
12495
- `;
12496
- return renderArtifact(relativePath, template, variables);
12497
- }
12498
- function toPhpSingleQuotedString(value) {
12499
- return `'${value.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
12500
- }
12501
12503
  function buildBasicArtifacts(variables) {
12502
12504
  return [
12503
12505
  renderArtifact("src/editor.scss", BASIC_EDITOR_STYLE_TEMPLATE, variables),
@@ -12591,12 +12593,6 @@ $post_id = is_object( $block ) && isset( $block->context['postId'] )
12591
12593
  $storage_mode = '{{dataStorageMode}}';
12592
12594
  $persistence_policy = '{{persistencePolicy}}';
12593
12595
 
12594
- {{phpPrefix}}_record_rendered_block_instance(
12595
- (int) $post_id,
12596
- '{{namespace}}/{{slugKebabCase}}',
12597
- $resource_key
12598
- );
12599
-
12600
12596
  $notice_message = 'authenticated' === $persistence_policy
12601
12597
  ? __( 'Sign in to persist this counter.', '{{textDomain}}' )
12602
12598
  : __( 'Public writes are temporarily unavailable.', '{{textDomain}}' );
@@ -12605,6 +12601,12 @@ if ( empty( $validation['valid'] ) || '' === $resource_key ) {
12605
12601
  return '';
12606
12602
  }
12607
12603
 
12604
+ {{phpPrefix}}_record_rendered_block_instance(
12605
+ (int) $post_id,
12606
+ '{{namespace}}/{{slugKebabCase}}',
12607
+ $resource_key
12608
+ );
12609
+
12608
12610
  $context = array(
12609
12611
  'bootstrapReady' => false,
12610
12612
  'buttonLabel' => $button_label,
@@ -12713,6 +12715,8 @@ $wrapper_attributes = get_block_wrapper_attributes(
12713
12715
  }
12714
12716
  return artifacts;
12715
12717
  }
12718
+
12719
+ // ../wp-typia-project-tools/src/runtime/built-in-block-non-ts-artifacts.ts
12716
12720
  function buildBuiltInNonTsArtifacts({
12717
12721
  templateId,
12718
12722
  variables
@@ -16139,4 +16143,4 @@ async function resolveOptionalInteractiveExternalLayerId({
16139
16143
 
16140
16144
  export { syncPersistenceRestArtifacts, copyInterpolatedDirectory, listInterpolatedDirectoryOutputs, getPrimaryDevelopmentScript, getOptionalOnboardingSteps, getOptionalOnboardingNote, formatNonEmptyTargetDirectoryError, parseTemplateLocator, resolveExternalTemplateLayers, resolveTemplateSeed, normalizeOptionalCliString, resolveLocalCliPathOption, assertExternalLayerCompositionOptions, assertBuiltInTemplateVariantAllowed, parseAlternateRenderTargets, parseCompoundInnerBlocksPreset, getDefaultAnswers, resolveTemplateId, resolvePackageManagerId, collectScaffoldAnswers, DATA_STORAGE_MODES, PERSISTENCE_POLICIES, isDataStorageMode, isPersistencePolicy, scaffoldProject, resolveOptionalInteractiveExternalLayerId };
16141
16145
 
16142
- //# debugId=95394D76AFA9A70D64756E2164756E21
16146
+ //# debugId=91CDBEC7FE018E1B64756E2164756E21