feat(printkit): 增强 IPP 打印与表格排版,发布 0.1.2

This commit is contained in:
2026-11-27 17:18:31 +08:00
parent d54e4f7676
commit 24aee84953
8 changed files with 222 additions and 30 deletions
+10 -5
View File
@@ -1,7 +1,7 @@
{
"schema_version": 1,
"sdk_id": "printkit",
"version": "0.1.1",
"version": "0.1.2",
"modules": {
"printkit": {
"exports": [
@@ -54,7 +54,7 @@
],
"signatures": {
"IppError": "(status_code: 'int', status_text: 'str', operation: 'str' = '')",
"Printer": "(target: 'str | None' = None, *, timeout: 'float' = 30.0, log=None, info: 'PrinterInfo | None' = None)",
"Printer": "(target: 'str | None' = None, *, timeout: 'float' = 30.0, log=None, info: 'PrinterInfo | None' = None, busy_retries: 'int' = 4, busy_wait: 'float' = 8.0, page_wait: 'float' = 120.0, page_interval: 'float' = 2.0)",
"PrinterInfo": "(id: 'str', ip: 'str', name: 'str' = '', port: 'int' = 631, path: 'str' = '/ipp/print', secure: 'bool' = True, note: 'str' = '', extra: 'dict' = <factory>) -> None",
"configure": "(path: 'str | os.PathLike | None' = None, printers: 'list[dict] | None' = None, default: 'str | None' = None) -> 'list[dict]'",
"default_id": "() -> 'str'",
@@ -80,7 +80,7 @@
],
"all": [],
"signatures": {
"Printer": "(target: 'str | None' = None, *, timeout: 'float' = 30.0, log=None, info: 'PrinterInfo | None' = None)",
"Printer": "(target: 'str | None' = None, *, timeout: 'float' = 30.0, log=None, info: 'PrinterInfo | None' = None, busy_retries: 'int' = 4, busy_wait: 'float' = 8.0, page_wait: 'float' = 120.0, page_interval: 'float' = 2.0)",
"cmd_info": "(args) -> 'int'",
"cmd_list": "(args) -> 'int'",
"cmd_send": "(args, use_sheet: 'bool') -> 'int'",
@@ -126,7 +126,7 @@
"signatures": {
"IppError": "(status_code: 'int', status_text: 'str', operation: 'str' = '')",
"Path": "(*args, **kwargs)",
"Printer": "(target: 'str | None' = None, *, timeout: 'float' = 30.0, log=None, info: 'PrinterInfo | None' = None)",
"Printer": "(target: 'str | None' = None, *, timeout: 'float' = 30.0, log=None, info: 'PrinterInfo | None' = None, busy_retries: 'int' = 4, busy_wait: 'float' = 8.0, page_wait: 'float' = 120.0, page_interval: 'float' = 2.0)",
"PrinterInfo": "(id: 'str', ip: 'str', name: 'str' = '', port: 'int' = 631, path: 'str' = '/ipp/print', secure: 'bool' = True, note: 'str' = '', extra: 'dict' = <factory>) -> None",
"default_printer": "(**kw) -> 'Printer'"
}
@@ -156,6 +156,7 @@
"OP_PRINT_JOB",
"OP_SEND_DOCUMENT",
"OP_VALIDATE_JOB",
"RETRYABLE_CODES",
"STATUS_TEXT",
"SUCCESS_CODES",
"T_BOOLEAN",
@@ -177,10 +178,12 @@
"build_request",
"decode_value",
"flatten",
"is_retryable",
"parse_response",
"post",
"socket",
"ssl",
"status_text",
"struct"
],
"all": [],
@@ -189,8 +192,10 @@
"build_request": "(op: 'int', uri: 'str', operation_attrs: 'list[bytes] | None' = None, job_attrs: 'list[bytes] | None' = None, req_id: 'int' = 1, user: 'str' = '37du-plugin') -> 'bytes'",
"decode_value": "(tag: 'int', raw: 'bytes')",
"flatten": "(attrs: 'dict[str, list[tuple[int, bytes]]]') -> 'dict[str, list]'",
"is_retryable": "(status: 'int') -> 'bool'",
"parse_response": "(payload: 'bytes') -> 'tuple[int, dict[str, list[tuple[int, bytes]]]]'",
"post": "(host: 'str', port: 'int', path: 'str', body: 'bytes', document: 'bytes' = b'', secure: 'bool' = True, timeout: 'float' = 30.0) -> 'tuple[int, bytes]'"
"post": "(host: 'str', port: 'int', path: 'str', body: 'bytes', document: 'bytes' = b'', secure: 'bool' = True, timeout: 'float' = 30.0) -> 'tuple[int, bytes]'",
"status_text": "(status: 'int') -> 'str'"
}
},
"printkit.registry": {